Start Job
Starts a Prompt Optimization job
Authorizations
Body
The examples (input-response pairs) to train and validate on
An example for training or evaluation
The initial system instruction
"Write a great story around the given topic."
The model to use for generating responses
gpt-4o-mini
, llama-3.1-8b
, mock-llm
The scoring spec to optimize
The tuning algorithm to use
DSPY
, PI
The DSPY teleprompter/optimizer to use. This only applies for the DSPY. Leave it as None if tuning_algorithm != DSPY.
BOOTSTRAP_FEW_SHOT
, COPRO
, MIPROv2
"COPRO"
Decides if to use chain of thought or not. This only applies for the DSPY. Leave it as None if tuning_algorithm != DSPY.
false
Response
The optimized_prompt_messages field is an empty list unless the state is done.
Detailed status of the job
["Downloading model", "Tuning prompt"]
The job id
"1234abcd"
Current state of the job
QUEUED
, RUNNING
, DONE
, ERROR
, CANCELLED
The optimized prompt messages in the OpenAI message format with the jinja {{ input }} variable for the next user prompt
[
{
"content": "Write a great story around the given topic.",
"role": "system"
},
{ "content": "{{ input }}", "role": "user" }
]