Create Golden
POSThttps://api.confident-ai.com/v1/datasets/{alias}/goldens
Creates a single golden in the dataset identified by alias. The dataset's type
(single- or multi-turn) determines how the golden is interpreted. Optionally
target a specific datasetVersion; omitting it uses the latest version.
curl -X POST "https://api.confident-ai.com/v1/datasets/{alias}/goldens" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"golden": {
"input": "What is the capital of France?",
"expectedOutput": "Paris.",
"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 to add the golden to.
Request body
goldenobject | objectRequiredThe golden to create. Provide single-turn or multi-turn fields matching the dataset type.
Show 2 variantsHide 2 variants
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.
datasetVersionstringOptional dataset version to add the golden to. Omitting it targets the latest version (or unversioned if the dataset has no versions).
Response
The golden was created successfully.
successbooleanThis is true if the golden was successfully created.
dataobjectShow 1 propertyHide 1 property
idstringThis is the ID of the created golden.
linkstringA link to the dataset the golden belongs to.
deprecatedbooleanThis is true if this datasets endpoint is deprecated.