Update Golden
PUThttps://api.confident-ai.com/v1/datasets/{alias}/goldens/{goldenId}
Updates a single golden by its goldenId in the dataset identified by alias. The golden's fields are replaced with the values you send, tags and custom columns are left unchanged unless you include them.
Provide the fields for a single-turn golden, or a multi-turn golden, matching the dataset type.
curl -X PUT "https://api.confident-ai.com/v1/datasets/{alias}/goldens/{goldenId}" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"input": "How is the weather like in NYC?",
"expectedOutput": "Sunny with a chance of rain.",
"finalized": true
}'{
"success": true,
"data": {
"id": "golden-id"
},
"link": "https://app.confident-ai.com/project/<PROJECT-ID>/datasets/<DATASET-ID>",
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
aliasstringRequiredThe alias of the dataset containing the golden.
goldenIdstringRequiredThe unique id of the golden, returned when the dataset is pulled.
Request body
GoldenRequestDataobjectShow 13 propertiesHide 13 properties
inputstringRequiredThe input to your LLM application.
actualOutputstringThe actual output from your LLM application.
expectedOutputstringThe ideal output from your LLM application.
retrievalContextlist of stringsThe retrieval context used by your LLM application.
contextlist of stringsThe ideal retrieval context for your LLM application.
toolsCalledlist of objectsThe tools called by your LLM application.
Show 5 propertiesHide 5 properties
namestringRequiredThis is the name of the tool.
descriptionstringRequiredThis is the description of the tool.
inputParametersobjectThis is the input parameters that are passed to the tool.
outputstringThis is the output of the tool.
reasoningstringThis is the reasoning your LLM provided for the tool call.
expectedToolslist of objectsThe tools expected to be called by your LLM application.
Show 5 propertiesHide 5 properties
namestringRequiredThis is the name of the tool.
descriptionstringRequiredThis is the description of the tool.
inputParametersobjectThis is the input parameters that are passed to the tool.
outputstringThis is the output of the tool.
reasoningstringThis is the reasoning your LLM provided for the tool call.
additionalMetadataobjectAdditional metadata to associate with the golden.
commentsstringComments to associate with the golden.
sourceFilestringThe source file associated with the golden.
finalizedbooleanWhether the golden is ready to use in evaluations.
customColumnKeyValuesobjectCustom dataset column values keyed by column name.
tagslist of stringsTags to associate with the golden.
- OR
ConversationalGoldenRequestDataobjectShow 11 propertiesHide 11 properties
scenariostringRequiredA description of the conversation context.
userDescriptionstringA description of the user in the conversation.
expectedOutcomestringThe ideal outcome or conversation flow.
turnslist of objectsThe conversation turns.
Show 5 propertiesHide 5 properties
roleenumRequiredThe role of the turn, either user or assistant.
Show 2 enum valuesHide 2 enum values
userassistant
contentstringRequiredThe message content of the turn.
userIdstringThe user ID associated with the turn.
retrievalContextlist of stringsThe contexts retrieved to generate the LLM response for this turn.
toolsCalledlist of objectsThe tools called to generate the LLM response for this turn.
Show 5 propertiesHide 5 properties
namestringRequiredThis is the name of the tool.
descriptionstringRequiredThis is the description of the tool.
inputParametersobjectThis is the input parameters that are passed to the tool.
outputstringThis is the output of the tool.
reasoningstringThis is the reasoning your LLM provided for the tool call.
contextlist of stringsContext for the conversation.
additionalMetadataobjectAdditional metadata to associate with the golden.
commentsstringComments to associate with the golden.
sourceFilestringThe source file associated with the golden.
finalizedbooleanWhether the golden is ready to use in evaluations.
customColumnKeyValuesobjectCustom dataset column values keyed by column name.
tagslist of stringsTags to associate with the golden.
Response
successbooleanThis is true if the golden was successfully updated.
dataobjectShow 1 propertyHide 1 property
idstringThis is the ID of the updated golden.
linkstringA link to the dataset the golden belongs to.
deprecatedbooleanThis is true if this datasets endpoint is deprecated.