Generation Task

Generation Task Properties

Required Properties

prompt
string
The input prompt for generation.
model
string
The model to use for generation.Allowed values:
  • "gpt-4": GPT-4 model
  • "gpt-4o-mini": GPT-4O Mini model
api_key
string
API key for authentication.

Optional Properties

max_epochs
integer
default:"100"
Maximum number of epochs for reference free generation.
response_format
string
Desired format of the response. Reference the type_id present in the types section of the schema.

OpenAI API Properties

In addition to the above properties, the generation task supports all OpenAI API call properties. Some commonly used properties include:
temperature
float
Controls randomness in output (0.0 to 2.0).
max_tokens
integer
Maximum number of tokens to generate.
top_p
float
Controls diversity via nucleus sampling.
frequency_penalty
float
Reduces repetition of token sequences.
presence_penalty
float
Encourages the model to talk about new topics.
stop
string or array
Sequences where the API will stop generating further tokens.
For a complete list of OpenAI API properties, please refer to the OpenAI API documentation.

Usage Examples

types:
    customer_info: # This gets referenced in the response_format field
        type: object
        properties:
        customer_name:
            type: string
        customer_address:
            type: string
tasks:
    extract_customer_info:
        task_type: generation
        task_properties:
        model: gpt-4o-mini
        prompt: Extract customer info from the given invoice
        response_format: customer_info # Specify the response format, if needed
        api_key: $OPENAI_API_KEY
It’s currently work in progress. If there something else you’d like to see, we’d love to know.