Purpose
This task is used to send a prompt to an AI service and receive the results.
Category Location: All, Data Services/Enrichment
Prerequisites
This task needs to be enabled in Openprise to be available to use.
Navigate to Administration and select System Settings
Select the Features tab
Click on the AskAI feature to turn it on and Click Save
Field Description
-
Select data service: Select the data service you've created in Openprise. To learn how to create an OpenAI data service, click HERE.
-
Construct prompt string: Use a combination of job attributes and text to construct a prompt to send to the AI service. Select attributes by typing @ in the box, and then select the attribute from the pick-list provided. You must include an attribute in the prompt string to get results.
-
Prompt string attribute: Select the attribute that will be populated with the prompt string constructed above.
-
Add Attribute: Optional: you can add new attributes to be used in the Prompt string attribute or the results attribute sections.
-
Results attribute: Select the attribute that will contain the results.
-
Advanced Configurations: Max Tokens and Temperature
- Max tokens: Specify the maximum tokens to include in the response. Any response longer than the maximum will result in an error. The largest value accepted is 2000.
- Temperature: Specify a value: Acceptable values are from 0 (default) to 1. The lower the number, the more consistent the responses will be when given the same prompt.
Notes:
- We suggest you use a chatbot to construct a prompt outside of Openprise before configuring this task. When constructing the prompt, try to provide specific instructions on how the LLM should format its response. Doing so means you'll have an easier time processing the response from this task template.
Example Use Cases:
- The AskAI template is helpful when you have unstructured data that you want to summarize. An example is to send AskAI the notes from a meeting or task and summarize the outcome or next steps.
- The AskAI template is helpful when you have data values in an inconsistent format and want to extract specific values from the data. An example is to use AskAI to pull specific information from the response of a Google Search query.
- Another example is to process job titles that can't be segmented using Openprise's Open Data. These titles may be in a language that isn't easily translated, or has terms that are not in the Open Data files. In this case, construct your prompt to AskAI to classify the title and assign it the best category for job level, and provide the specific levels you need. For these prompts, it is often helpful to include a category of Other so titles containing junk data can be categorized as best as possible.
Promp Construction Best Practices
To promote consistency and accuracy of the responses returned, there are several best practices you should consider following:
- Include clear, detailed instructions and examples of what information you expect the model will ingest and what it should return in response.
- Examples provide the model with additional context with which to understand what is being asked. This is referred to as multi-shot prompting. Please refer to the articles linked below to get a better understanding of how this works and how it can be used in practice:
- Outline in detail (or in your examples) exactly how you expect the response to look for the given input.
- It can be beneficial to include words such as “please” in your prompt.
Examples of Effective Prompts:
- Add 2 days to the following date in the format MM-DD-YYY: {{Date}}. For example, if the given date is 01-01-2102, the response you return should be 01-03-2102. Do not include any additional text in the response, only the date value.
- If the word or phrase after the ':' can be found within the following list ['Hello', 'Goodbye', 'What's up?'], return TRUE and if not return FALSE: {{String}}. For example, if the phrase is 'This is a string!', return FALSE. Please only return the boolean value TRUE or FALSE with no additional text.
- Change the digits before the first '.' in this IP to be '000'. This is the IP you need to change {{IP String}}. For example, if the IP is 0.0.0.0, the result you return should be 000.0.0.0 Do not return anything other than the modified IP value. Only return the IP address with no additional text.