Datasaur
Search
⌃K

OpenAI (beta)

Now, we allow you to integrate OpenAI as an assisted labeling tool for your projects. With this integration, you can easily select OpenAI from the provider dropdown menu.

Sample Data

We also provide a sample for you to try on your own project. You can simply upload the document as your input data and the question set as your question to be answered.
OpenAI.csv
804B
Binary
sample dataset
OpenAI - Question Set.json
600B
Code
sample question set
After successfully creating the project, you need to activate the ML-assisted labeling extension and select OpenAI as the provider. Once you have chosen OpenAI, you can access several fields under the OpenAI extension. These fields include:
Sample project with OpenAI integration
  1. 1.
    Target text: define your text column that is going to be treated as input
  2. 2.
    Target question: your selected question to be answered
  3. 3.
    API token: the OpenAI secret key
  4. 4.
    System prompt: introduction prompt to define the OpenAI agent role
  5. 5.
    User prompt: user definition of a task to be completed in a specific labeling workflow.
For the token-based, we have only three fields, API token, system prompt, and user prompt (more details on Token-based prompt).
In addition, you can specify your desired output through instructions or examples, or a combination of both.
Once all fields have been filled, you can predict the label by clicking “Predict label”.
The labels will then be automatically applied to the corresponding line.

Row-based Prompt

We have several attributes that can be used to define your input and expected output.
  1. 1.
    {targetText} represents input text from your selected column in the uploaded data.
  2. 2.
    {targetOptions} represents question set options or answers from your selected target questions in the previous field.
You can always change the target text and options to your sample. We enable you to do one or a few shots through the extension. Below is an example of the user prompt.
Article: With the weeks dwindling until Jason Yaritek enters free agency, the Red Sox continue to carefully monitor Kelly Shoppach, their catcher of the future, in his climb toward the majors. The Sox like most of what they have seen at Triple A Parfucket from Shoppach, though it remains highly uncertain whether he can make the adjustments at the plate
Generate question and answer from this article
[targetOptions)
Answer:
Question: Who is "the catcher of the future?
Answer: Kelly Shoppach
Article: (targetText]
Generate guestion and answer from this article
[targetOptions)
Answer:

Token-based Prompt

For Token-based, we can change the label set by changing the active label set from the upper left corner.
We have several attributes that can be used to define your input and expected output.
  1. 1.
    {targetText} represents input text from your selected column in the uploaded data.
  2. 2.
    {targetLabelSet} represents label set options from your active label set selection in the upper left corner.
Below is an example of the user prompt to do NER labeling.
Notes:
Please provide the token of the labeled entities in object format, where the LabelSet is the key and the array of token is the value. No need explanation.
LabelSet:
{targetLabelSet}
Sentence:
{targetText}
If you are experiencing the 429 error, the limitation came from the OpenAI package. Please take a look at your current usage of OpenAI API.