The Run Prompts App allows you to create prompts to query your text data at scale using a large language model (LLM), through the app you can test out various prompts to see potential results, refine until you have the results you are looking for and then apply that prompt to all of your data.
The prompt app be used for many different purposes from summarising collections of fields, generating text such as blog posts, topic lists & Key actions.
Note that Run Prompts app will generate an output for each item of data - ie each row in a data set, rather than a single answer based on the total dataset
Third party API key required
The Run Prompts app uses functionality from a third party LLM such as OpenAI, you will need your own OpenAI account to access this app (it is greyed out with a banner unless an OpenAI API key is added) and costs associated with the use of the Graft app will appear on your OpenAI account. |
- Select the App type you would like to create from the App Library template tab
- Mousing over the App tile will display a short description of the App and its applications
Select which of the methods you would like to create the App if you have your own data ready to go
Alternatively use the Graft Demo data source
Prompt Configuration & Testing
Ahead of creating your App, Graft allows you to experiment with your prompt (request to the LLM) to see that it is returning sensible results.
Graft will display the available fields from your selected data source, this will include any new fields generated through other Apps within the same Entity.
|
|
Write a query prompt using one or more of those fields using the { key to provide the field list to select from to insert into your prompt |
|
Selected fields will appear in bold at the top of the window |
|
Select the maximum size of the response to your prompt in tokens (Default is 200), expand this number if your use case requires a more complex response. |
|
You are able to select which Model to use from the right hand drop down. The default is GPT-3.5 Turbo. You are able to select any model you have an API key for.
Useful info |
|
Mousing over the X button in the prompt window will show the |
|
Click on
Graft will display the response in the preview window |
|
To toggle between the generated response and the submitted text to the model click on Click here |
|
Graft provides samples of your data which can be navigated through using the |
|
Revise your prompt as necessary to optimize your results |
Creating your App
Once you are satisfied with your results
|
Processing your Data
Graft will now process your data, a sample of 100 entries will be created initially.
Note: if one of the fields used to build a prompt is empty for a given entry, no output can be generated
TRY IT
The TRY IT tab allows you to review prompts generated with your new app. Graft will display the unique ID for each entry, the output from your prompt app and then the fields used in the Prompt itself
The right hand panel shows the current configuration, the name of the entity which holds your data
The fields to be used in the prompt used to generate the new output
The current status of the data set with options to sync or export data
|
- Clicking on the EXPORT DATA button will jump to the Project SQL tab allowing the user to export their generated data, further details below.
- Clicking on the SYNC DATA button will ingest and process all the items associated with the data source and will remove this warning bar.
- Clicking on the
icon will schedule daily ingestion and processing of your data source. If you would like to configure more frequent data processing you can enable a processing workflow.
Exporting your Generated Output
Clicking on the EXPORT DATA button will jump to an automatic SQL query of your prediction results
By Default the SQL will include the fields of your data source in order and additional fields related to Generated output. You are able to tweak the SQL as much as you require.
The additional fields included are...
- run_prompts_prediction: the generated output from your prompt
- target_run_prompts: currently not used
- run_prompts_pred_prob: always 1 where generation has been successful
Once satisfied click RUN QUERY to generate your results which can be exported. Further details on the Managing Results can be found here.
Settings tab
This tab allows you manage the settings for your new Prompt App. |
Renaming your App instance
To rename your App click on the current name hyperlink.
Type in your new name
Click
|
Copying your Prompt
- Click on
to copy the prompt
Changing your LLM
To change the LLM used for your App after the App has been instantiated click on the |
|
Select the model you require from the list. |
|
Click SAVE to save the change, with the model changed Graft will reprocess your data. | |
Note this process will only process a sample of your data. Ensure you click on SYNC DATA to process your complete data set. |
Deleting your App
If you would like to delete your app, this is done from your App library
For any changes made to your settings ensure that you click SAVE to confirm your changes