Automation
The Automation category of plugins and agents is designed to help you automate business processes. These plugins and agents are designed to help you with repetitive tasks, data processing, and much more. In this section, you will find information on the plugins and agents available in the Automation category and how to use them to enhance your experience with the Ask Sage platform.
Table of contents
List of Automation Plugins & Agents
Index | Title | Access | Description of the Plugin/Agent | Category |
---|---|---|---|---|
1 | Iterative CSV Prompting | Paid users only | Loop through each line in the CSV and execute prompt against it iteratively | Automation |
2 | Iterative ZIP Prompting | Paid users only | Loop through each file in the ZIP and execute prompt against each file iteratively | Automation |
Iterative CSV Prompting
This plugin lets you loop through each line in a CSV file and executes the prompt defined by a user against each line iteratively.
This plugin and the
Iterative ZIP Prompting
plugin both treat each iteration as it’s own instance and do not share data between iterations.
Therefore we will demonstrate how the Iterative CSV Prompting plugin
works to process multiple rows of data.
Step 1 - Navigate to the Ask Sage Prompt Settings
section and select Prompt Templates
. Followed by then selecting the Iterative CSV Prompting
.
Step 2 - Upload the CSV file and define the prompt you want to execute against each line in the CSV.
Example: A CSV containing purchase order data with the following columns:
Purchase Order ID | Item Description | Quantity | Unit Price | Total Price | Supplier | Purchase Date | Delivery Date | Contract Number | Department |
---|---|---|---|---|---|---|---|---|---|
PO12345 | Laptops | 50 | 1200.00 | 60000.00 | Tech Solutions Inc. | 2024-07-01 | 2024-07-15 | CN98765 | IT Department |
PO12346 | Office Chairs | 100 | 150.00 | 15000.00 | Office Supplies Co. | 2024-07-02 | 2024-07-16 | CN98766 | Facilities |
PO12347 | Printer Paper | 500 | 5.00 | 2500.00 | Paper Goods Ltd. | 2024-07-03 | 2024-07-17 | CN98767 | Admin Department |
PO12348 | Desktop Computers | 30 | 800.00 | 24000.00 | Computers R Us | 2024-07-04 | 2024-07-18 | CN98768 | IT Department |
PO12349 | Projectors | 10 | 500.00 | 5000.00 | AV Equipment Inc. | 2024-07-05 | 2024-07-19 | CN98769 | Training Department |
PO12350 | Conference Tables | 5 | 1000.00 | 5000.00 | Furniture World | 2024-07-06 | 2024-07-20 | CN98770 | Facilities |
PO12351 | Network Routers | 20 | 300.00 | 6000.00 | Network Solutions | 2024-07-07 | 2024-07-21 | CN98771 | IT Department |
PO12352 | Whiteboards | 15 | 200.00 | 3000.00 | Office Supplies Co. | 2024-07-08 | 2024-07-22 | CN98772 | Training Department |
PO12353 | Software Licenses | 100 | 100.00 | 10000.00 | Software Hub | 2024-07-09 | 2024-07-23 | CN98773 | IT Department |
Example: A prompt to execute against each line in the example CSV file.
Evaluate and check if the purchase was greater than $5,000.
{csv_line}
If the purchase order was greater than $5,000,
provide the PO ID, contract used, and the affiliated organization.
Additionally, if the PO was less than $5,000, do not return any information and print 'done'.
Intentionally did not spell out
Purchasing Order
, or distinctly call outcolumn headers
to show the flexibility of GenAI to understand the context.
In instances like this when GenAI is not provided with explicit information and still able to generate the correct result is calledZero-shot learning
.
Step 3 - After the information is filled in, click on the Submit
button to execute the plugin which will generate a prompt for each line in the CSV.
Step 4 - Execute the prefilled prompt generated by the plugin, which will loop through each line in the CSV.
Step 5 - Review the results of the prompt execution against each line in the CSV.
In example provided the plugin resulted in results for each line in the CSV file similar to the following: (Based on the example mock data and prompt provided)
Prompt 1: Evaluate and check if the purchase over was greater than $5,000.
{"asksage_metadata": {"filename": "csv-file-test.csv"}}
Purchase Order ID: PO12345; Item Description: Laptops; Quantity: 50; Unit Price: 1200.0;
Total Price: 60000; Supplier: Tech Solutions Inc.; Purchase Date: 7/1/24;
Delivery Date: 7/15/24; Contract Number: CN98765; Department: IT Department;
If the purchase order was greater than $5,000,
provide the PO ID, contract used, and the affiliated organization.
Additionally, if the PO was less than $5,000, donot provide anything.
To evaluate if the purchase order was greater than $5,000, we need to check the
total price of the purchase order.
In this case, the total price is $60,000, which is greater than $5,000. Therefore, I will
provide the PO ID, contract used, and the affiliated organization.
Purchase Order ID: PO12345
Contract Number: CN98765
Affiliated Organization: IT Department
--------------------------------------------
Prompt 3: Evaluate and check if the purchase over was greater than $5,000.
Purchase Order ID: PO12347; Item Description: Printer Paper; Quantity: 500; Unit Price: 5.0;
Total Price: 2500; Supplier: Paper Goods Ltd.; Purchase Date: 7/3/24; Delivery Date: 7/17/24;
Contract Number: CN98767; Department: Admin Department;
If the purchase order was greater than $5,000,
provide the PO ID, contract used, and the affiliated organization.
Additionally, if the PO was less than $5,000, donot provide anything.
The total price of the purchase order you provided is $2,500, which is less than $5,000.
Therefore, I cannot provide any additional information as per your request.
Ask Sage was able to understand the context of the prompt and provide the necessary information in the result.
It identified:
- PO ID,
- Contract Number,
- Affiliated Organization
Although not explicitly mentioned in the prompt.
Iterative ZIP Prompting
This plugin lets you loop through each file in a ZIP file and executes the prompt defined by a user against each file iteratively.
Here is a workflow of how the Iterative ZIP Prompting
plugin works:
Therefore we will demonstrate how the Iterative ZIP Prompting plugin
works to process multiple markdown files.
You can ZIP any type of text📄 related files and process them using the
Iterative ZIP Prompting
plugin. Images🌉, audio🎧, and video🎥 files are not supported.
Step 1 - Create a ZIP file with multiple files.
Step 2 - Navigate to the Ask Sage Prompt Settings
section and select Prompt Templates
. Followed by then selecting the Iterative ZIP Prompting
.
The zip files cannot exceed 25MB in size.
Step 3 - Upload the ZIP file and define the prompt you want to execute against each file in the ZIP.
In this example we wanted to check if our code documentation files are well written and have a good flow.
Evaluate the context in the file by grading the following Criteria: (1 = Poor, 10 = Excellent)
1. Context
2. Organization (Flow of the writing)
3. Misspellings (Identify any if they are present)
4. Tone
5. Engaging
Lastly, provide details on how to make the document better.
Step 4 - Click on the Run
button to execute the prompt against each file in the ZIP.
Allow some time for the Ask Sage plugin to process each file in the ZIP. The processing time depends on the number of files in the ZIP and the complexity of the prompt.
Step 5 - Review the results and make necessary changes to the files based on the feedback provided by the plugin.
{"asksage_metadata": {"filename": "README.md",
"model_used": "gpt35-16k", "token_content_count": 5754}}
Criteria Evaluation:
1. Context: 9
2. Organization: 8
3. Misspellings: 10
4. Tone: 9
5. Engaging: 8
Overall, the context of the document is clear and provides a comprehensive
overview of the Ask Sage platform and API. The organization of the document is
generally good, with clear headings and subheadings. There are no misspellings
in the document. The tone is professional and informative. The document is engaging,
but could benefit from more examples and visuals to illustrate the concepts being discussed.
To make the document better, I would suggest adding more
examples and visuals to demonstrate the concepts being discussed.
This could include code snippets, diagrams, or screenshots of
the Ask Sage platform. Additionally, providing more specific details
and explanations for each section would help improve the clarity and depth of the document.
The results will provide metadata to clarify the file name, model used and token consumption.
{“asksage_metadata”:
{
“filename”: “README.md”,
“model_used”: “gpt35-16k”,
“token_content_count”: 5754}
}
The
Iterative CSV Prompting
andIterative ZIP Prompting
plugins are great tools to help you automate repetitive tasks and process data efficiently. However, it is important to take into consideration the volume of data (Tokens) being processed and the complexity of the prompt. You may need to adjust the prompt or break down the data into smaller chunks to ensure optimal performance and not exceed your token limit.
We do have other plugins and agents that can summarize (Summarize Text
,Summarize Website
, andSummarize File
) data prior to processing, which can help reduce the token consumption and improve the results of the prompt execution.