Simulate Conversation
POSThttps://api.confident-ai.com/v1/simulate
Simulate the next conversation turn from a conversational golden.
curl -X POST "https://api.confident-ai.com/v1/simulate" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"conversationalGolden": {
"scenario": "A frustrated user asking for a refund.",
"userDescription": "A white male who is a customer for over 2 years."
}
}'{
"success": true,
"data": {
"simulationId": "SIMULATION-ID",
"completed": false,
"userResponse": "I'd like my refund please.",
"turns": [
{
"role": "assistant",
"content": "Hey, how can I help you today?"
},
{
"role": "user",
"content": "I'd like my refund please."
}
]
},
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Request body
conversationalGoldenobjectRequiredA Conversational Golden that is used to simulate your conversations
Show 11 propertiesHide 11 properties
idstringServer-assigned identifier, returned when the dataset is pulled. Use it to update or delete this golden. Not accepted when pushing.
scenariostringRequiredThis is a description of the conversation context.
userDescriptionstringThis is the description of the user in the conversation.
expectedOutcomestringThis describes the expected outcome, or ideal conversation flow, of the conversation.
turnslist of objectsThis is the list of turns in the conversation.
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 stringsThis is the context of the conversation.
additionalMetadataobjectThis is any additional metadata you wish to associate with the golden.
commentsstringThis is any comments you wish to associate with the golden.
sourceFilestringThis is the source file from which the golden was retrieved.
finalizedbooleanThis determines whether the golden has been finalized.
customColumnKeyValuesobjectKey-value pairs representing custom table column data for this golden. Keys correspond to the custom column keys defined in the dataset.
Response
successbooleanThis is true if the next turn in the conversation was successfully simulated.
dataobjectShow 4 propertiesHide 4 properties
simulationIdstringThis is the unique ID for the simulation.
completedbooleanThis is true if the conversation is complete, which means the expected outcome has been reached.
userResponsestringThis is the simulated user response of the last turn in the conversation.
turnslist of objectsThis is the list of all the turns in the conversation.
Show 5 propertiesHide 5 properties
roleenumThe role of the turn, either user or assistant.
Show 2 enum valuesHide 2 enum values
userassistant
contentstringThe 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
namestringThis is the name of the tool.
descriptionstringThis 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.
deprecatedbooleanThis is true if this endpoint is deprecated.