GPT enrichment setup
This page describes how you can setup a GPT enrichment in a few steps using the Metamaze endpoint.
Last updated
This page describes how you can setup a GPT enrichment in a few steps using the Metamaze endpoint.
Last updated
Follow these easy steps to set up an enrichment to use OpenAI's GPT.
You will need the following OpenAI credentials:
API Key
Organisation ID
You can find and generate these in the OpenAI platform:
For the metadata there are 2 different configurations: one on the entity level and the other document level.
enrichment_name
has to be exactly the same as the name of the enrichment in project settings
enrichment_type
fixed value: 'entity'
entity_names
names of the entity to enrich
prompt
Prompt for GPT. The task to send as instruction to GPT model.
answers
[Optional] It’s an optional field (you can skip it) to define the exact answers with which GPT can answer. However, we would recommend defining short, clear answers like "Yes", "No" for 3 reasons. Mainly, it allows for a bigger chance that GPT will respond correctly with the exact desired answer and also ensures easier automatic processing. It is also cheaper since fewer tokens are used.
OPENAI_API_KEY
API Key (see Prerequisites: OpenAI credentials)
OPENAI_API_ORG
Organisation ID (see Prerequisites: OpenAI credentials)
enrichment_name
has to be exactly the same as the name of the enrichment in project settings
enrichment_type
fixed value: 'document'
prompt
Prompt for GPT. The task to send as instruction to GPT model.
answers
[Optional] It’s an optional field (you can skip it) to define the exact answers with which GPT can answer. However, we would recommend defining short, clear answers like "Yes", "No" for 3 reasons. Mainly, it allows for a bigger chance that GPT will respond correctly with the exact desired answer and also ensures easier automatic processing. It is also cheaper since fewer tokens are used.
OPENAI_API_KEY
API Key (see Prerequisites: OpenAI credentials)
OPENAI_API_ORG
Organisation ID (see Prerequisites: OpenAI credentials)
Nothing special here, just fill in when you want the GPT enrichment to be triggered.
Choose the "String" value type.
Congratulations, you have now configured your GPT enrichment! You can now start processing documents powered by Open AI's GPT.