Skip to main content
PATCH
Update an agent optimization

Authorizations

Authorization
string
header
required

Path Parameters

projectKey
string
required

The project key

optimizationKey
string
required

The agent optimization key

Body

application/json

Agent optimization fields to update

maxAttempts
integer

The maximum number of attempts

modelChoices
string[]

The models to try

judgeModel
string

The model used to judge responses

variableChoices
object[]

Sets of prompt variable values to try

acceptanceStatements
object[]

Statements a response must satisfy to pass

judges
object[]

Judges that score each response

userInputOptions
string[]

User inputs to test with

groundTruthResponses
string[]

Expected responses to compare against

metricKey
string

The key of the metric to optimize

tokenLimit
integer

The maximum number of tokens to use

variationKey
string

The key of the variation to start from

label
string

A label for the optimization

latencyOptimization
boolean

Whether to optimize for lower latency

tokenOptimization
boolean

Whether to optimize for lower token use

autoCommit
boolean

Whether to save the best result as a new variation automatically

Response

Agent optimization updated

id
string
required

The agent optimization ID

key
string
required

The agent optimization key

aiConfigKey
string
required

The key of the AI Config to optimize

maxAttempts
integer
required

The maximum number of attempts

modelChoices
string[]
required

The models to try

judgeModel
string
required

The model used to judge responses

variableChoices
object[]
required

Sets of prompt variable values to try

acceptanceStatements
object[]
required

Statements a response must satisfy to pass

judges
object[]
required

Judges that score each response

userInputOptions
string[]
required

User inputs to test with

groundTruthResponses
string[]
required

Expected responses to compare against

version
integer
required

The version number of this resource

createdAt
integer<int64>
required

When this resource was created, in Unix milliseconds

_access
object
Example:

The location and content type of related resources

Example:
metricKey
string

The key of the metric to optimize

tokenLimit
integer

The maximum number of tokens to use

variationKey
string

The key of the variation to start from

label
string

A label for the optimization

latencyOptimization
boolean

Whether to optimize for lower latency

tokenOptimization
boolean

Whether to optimize for lower token use

autoCommit
boolean

Whether to save the best result as a new variation automatically