Get Run
GEThttps://api.confident-ai.com/v2/test-runs/{testRunId}
Retrieves a test run with its aggregated metric scores and every test case in it, each with its metric results. The test cases are single-turn, multi-turn or trace-based depending on how the run was evaluated, never a mix. Requires an active trial or paid plan.
curl -X GET "https://api.confident-ai.com/v2/test-runs/{testRunId}" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"{
"success": true,
"data": {
"id": "<TEST-RUN-ID>",
"createdAt": "2025-01-01T12:00:00.000Z",
"identifier": "run-399-102",
"status": "IN_PROGRESS",
"multiTurn": false,
"testsPassed": 8,
"testsFailed": 2,
"totalTests": 10,
"metricsScores": [
{
"metric": "Answer Correctness",
"scores": [
0.9,
1
],
"passes": 8,
"fails": 2,
"errors": 0,
"errorType": "AI_CONNECTION_ERROR"
}
],
"runDuration": 15.2,
"evaluationCost": 0.254,
"datasetAlias": "geography-goldens",
"testFile": "test_geography.py",
"summary": {
"summaryOverview": {
"summary": [
"8 of 10 test cases passed."
],
"actionItems": [
"Add goldens for lesser-known peaks."
]
},
"topicSummaries": [
{
"topic": "Mountain heights",
"summaryPoints": [
{
"content": "Answers about mountain heights were correct and cited the retrieved context.",
"testCaseIds": [
"<TEST-CASE-ID>"
],
"grade": 0.9
}
],
"testCaseIds": [
"<TEST-CASE-ID>"
]
}
]
},
"testCases": [
{
"input": "How tall is Mount Everest?",
"actualOutput": "Mount Everest is 8,848 metres tall.",
"expectedOutput": "Mount Everest is 8,848 metres tall.",
"context": [
"Everest is 8,848 metres tall."
],
"retrievalContext": [
"Everest is 8,848 metres tall."
],
"toolsCalled": [
{
"name": "get_landmark_info",
"type": "FUNCTION",
"description": "This tool gives information about a mountain.",
"inputParameters": {
"mountain": "Everest"
},
"output": "8,848 metres",
"reasoning": "The user asked for the height of a mountain."
}
],
"expectedTools": [
{
"name": "get_landmark_info",
"type": "FUNCTION",
"description": "This tool gives information about a mountain.",
"inputParameters": {
"mountain": "Everest"
},
"output": "8,848 metres",
"reasoning": "The user asked for the height of a mountain."
}
],
"id": "<TEST-CASE-ID>",
"name": "everest-height",
"success": true,
"runDuration": 1.2,
"evaluationCost": 0.001,
"comments": "Reviewed by the geography team.",
"additionalMetadata": {
"region": "Nepal"
},
"metricsData": [
{
"id": "<METRIC-DATA-ID>",
"name": "Answer Relevancy",
"score": 0.95,
"reason": "The answer directly states the capital of France.",
"success": true,
"threshold": 0.5,
"strictMode": false,
"skipped": false,
"flaky": false,
"evaluationModel": "gpt-4o",
"evaluationCost": 0.0004,
"error": null,
"errorType": "AI_CONNECTION_ERROR",
"createdAt": "2025-01-15T10:30:06.000Z",
"evaluatedAt": "2025-01-15T10:30:09.000Z",
"traceUuid": "3f9c2a1e-5b7d-4c8e-9f01-2a3b4c5d6e7f",
"spanUuid": null
}
]
}
]
},
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
testRunIdstringRequiredThe id of the test run.
Response
Get Run succeeded.
successbooleanIndicates if the request was successful.
dataobjectA test run with its aggregated metric scores and every test case in it.
Show 15 propertiesHide 15 properties
idstringThis is the unique ID for the test run, generated by Confident AI and not to be confused with the identifier provided by the user.
createdAtstringThe time the test run was created.
identifierstring | nullThe human-readable identifier you gave the test run, if any.
statusenumThe status of the test run: IN_PROGRESS while test cases are still being evaluated, then COMPLETED, ERRORED or CANCELLED.
Show 4 enum valuesHide 4 enum values
IN_PROGRESSCOMPLETEDERROREDCANCELLED
multiTurnbooleanWhether this test run contains multi-turn test cases.
testsPassedintegerThe number of test cases that passed.
testsFailedintegerThe number of test cases that failed.
totalTestsintegerThe total number of test cases in this test run.
metricsScoreslist of objectsThe aggregated metric scores across all test cases.
Show 6 propertiesHide 6 properties
metricstringThis is the name of the metric.
scoreslist of numbersThis is an array of scores for the metric across test cases, one per test case that produced a score.
passesintegerThis is the number of times this metric passed the threshold.
failsintegerThis is the number of times this metric failed to pass the threshold.
errorsintegerThis is the number of times this metric errored during evaluation.
errorTypeenum | nullWhy an evaluation errored: the AI connection or a transformer failed, the evaluation model failed, the test case lacked the parameters the metric needs, or an internal error occurred.
Show 5 enum valuesHide 5 enum values
AI_CONNECTION_ERRORTRANSFORMER_ERROREVALUATION_MODEL_ERRORINVALID_TEST_CASE_PARAMETERSINTERNAL_ERROR
runDurationnumberThe total duration of the test run in seconds.
evaluationCostnumber | nullThe cost of evaluating every test case in the test run.
datasetAliasstring | nullThe alias of the dataset the test run was evaluated on, if any.
testFilestring | nullThe test file the test run was started from, if any.
summaryobject | nullThe AI-generated summary of a test run, produced on the Confident AI platform. Null until it has been generated.
Show 2 propertiesHide 2 properties
summaryOverviewobjectThe headline findings and action items of a test run.
Show 2 propertiesHide 2 properties
summarylist of stringsThe headline findings across every topic.
actionItemslist of stringsWhat to change to improve the next test run.
topicSummarieslist of objectsThe findings for each topic the test cases were grouped into.
Show 3 propertiesHide 3 properties
topicstringThe topic the test cases were grouped under.
summaryPointslist of objectsThe findings for this topic.
Show 3 propertiesHide 3 properties
contentstringOne finding about the test cases in this topic.
testCaseIdslist of stringsThe ids of the test cases this finding is drawn from.
gradenumberHow well the test cases behind this finding performed, from 0 to 1.
testCaseIdslist of stringsThe ids of the test cases grouped under this topic.
testCaseslist of object | object | objectThe test cases in this test run. Every test case is of the same kind: single-turn, multi-turn or trace-based.
Show 3 variantsHide 3 variants
Single-Turn Test CaseobjectA test case evaluated as a single exchange with your LLM application.
Show 15 propertiesHide 15 properties
inputstring | nullThis is the input of the test case.
actualOutputstring | nullThis is the actual output of the test case.
expectedOutputstring | nullThis is the expected output of the test case.
contextarray | nullThis is the context of the test case.
retrievalContextarray | nullThis is the retrieval context of the test case.
toolsCalledarray | nullThis is the tools called of the test case.
Show 6 propertiesHide 6 properties
namestringThis is the name of the tool.
typeenumThe type of the tool call, either a function or an MCP tool.
Show 2 enum valuesHide 2 enum values
FUNCTIONMCP
descriptionstringThis is the description of the tool.
inputParametersobject | nullThis is the input parameters that are passed to the tool.
outputanyThis is the output of the tool.
reasoningstringThis is the reasoning your LLM provided for the tool call.
expectedToolsarray | nullThis is the expected tools of the test case.
Show 6 propertiesHide 6 properties
namestringThis is the name of the tool.
typeenumThe type of the tool call, either a function or an MCP tool.
Show 2 enum valuesHide 2 enum values
FUNCTIONMCP
descriptionstringThis is the description of the tool.
inputParametersobject | nullThis is the input parameters that are passed to the tool.
outputanyThis is the output of the tool.
reasoningstringThis is the reasoning your LLM provided for the tool call.
idstringThis is the id of the test case generated by Confident AI.
namestringThis is the name of the test case.
successboolean | nullWhether this test case passed all metric thresholds, or null while it is still being evaluated.
runDurationnumber | nullThe duration of the test case evaluation in seconds.
evaluationCostnumber | nullThe cost of evaluating this test case.
commentsstring | nullAny comments associated with this test case.
additionalMetadataobject | nullAdditional metadata associated with this test case.
metricsDatalist of objectsThe metric evaluation results for this test case.
Show 17 propertiesHide 17 properties
idstringThe unique identifier of the metric data entry.
namestringThe name of the metric.
scorenumber | nullThe final metric score, or null when the metric errored or was skipped.
reasonstring | nullThe reason for the metric score, generated by the evaluation model at evaluation time.
successboolean | nullWhether the metric score is above the threshold, or null while the evaluation is still running.
thresholdnumber | nullThe threshold for the metric, which determines if the metric is passing or failing.
strictModebooleanWhether the metric was run in strict mode, which outputs a binary score of 0 or 1.
skippedbooleanWhether the metric evaluation was skipped.
flakybooleanWhether the metric's verdict was non-deterministic across runs.
evaluationModelstring | nullThe evaluation model used to run the evaluation.
evaluationCostnumber | nullThe cost of running the evaluation in USD.
errorstring | nullThe error message if the evaluation failed.
errorTypeenum | nullWhy an evaluation errored: the AI connection or a transformer failed, the evaluation model failed, the test case lacked the parameters the metric needs, or an internal error occurred.
Show 5 enum valuesHide 5 enum values
AI_CONNECTION_ERRORTRANSFORMER_ERROREVALUATION_MODEL_ERRORINVALID_TEST_CASE_PARAMETERSINTERNAL_ERROR
createdAtstringThe time the metric data was created.
evaluatedAtstring | nullThe time the metric was evaluated, or null while it is still running.
traceUuidstring | nullThe uuid of the trace this metric was evaluated on, for test cases formed from traces.
spanUuidstring | nullThe uuid of the span this metric was evaluated on, for component-level metrics.
- OR
Multi-Turn Test CaseobjectA test case evaluated as a conversation with your LLM application.
Show 13 propertiesHide 13 properties
turnslist of objectsThe list of turns in the conversation.
Show 6 propertiesHide 6 properties
idstringThe id of a turn assigned by Confident AI.
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.
retrievalContextarray | nullThe contexts retrieved to generate the LLM response for this turn.
toolsCalledarray | nullThe tools called to generate the LLM response for this turn.
Show 6 propertiesHide 6 properties
namestringThis is the name of the tool.
typeenumThe type of the tool call, either a function or an MCP tool.
Show 2 enum valuesHide 2 enum values
FUNCTIONMCP
descriptionstringThis is the description of the tool.
inputParametersobject | nullThis is the input parameters that are passed to the tool.
outputanyThis is the output of the tool.
reasoningstringThis is the reasoning your LLM provided for the tool call.
scenariostring | nullA description of the conversation context.
expectedOutcomestring | nullThe expected outcome or ideal conversation flow.
userDescriptionstring | nullA description of the user in the conversation.
contextarray | nullThe context provided for the conversation.
idstringThis is the id of the test case generated by Confident AI.
namestringThis is the name of the test case.
successboolean | nullWhether this test case passed all metric thresholds, or null while it is still being evaluated.
runDurationnumber | nullThe duration of the test case evaluation in seconds.
evaluationCostnumber | nullThe cost of evaluating this test case.
commentsstring | nullAny comments associated with this test case.
additionalMetadataobject | nullAdditional metadata associated with this test case.
metricsDatalist of objectsThe metric evaluation results for this test case.
Show 17 propertiesHide 17 properties
idstringThe unique identifier of the metric data entry.
namestringThe name of the metric.
scorenumber | nullThe final metric score, or null when the metric errored or was skipped.
reasonstring | nullThe reason for the metric score, generated by the evaluation model at evaluation time.
successboolean | nullWhether the metric score is above the threshold, or null while the evaluation is still running.
thresholdnumber | nullThe threshold for the metric, which determines if the metric is passing or failing.
strictModebooleanWhether the metric was run in strict mode, which outputs a binary score of 0 or 1.
skippedbooleanWhether the metric evaluation was skipped.
flakybooleanWhether the metric's verdict was non-deterministic across runs.
evaluationModelstring | nullThe evaluation model used to run the evaluation.
evaluationCostnumber | nullThe cost of running the evaluation in USD.
errorstring | nullThe error message if the evaluation failed.
errorTypeenum | nullWhy an evaluation errored: the AI connection or a transformer failed, the evaluation model failed, the test case lacked the parameters the metric needs, or an internal error occurred.
Show 5 enum valuesHide 5 enum values
AI_CONNECTION_ERRORTRANSFORMER_ERROREVALUATION_MODEL_ERRORINVALID_TEST_CASE_PARAMETERSINTERNAL_ERROR
createdAtstringThe time the metric data was created.
evaluatedAtstring | nullThe time the metric was evaluated, or null while it is still running.
traceUuidstring | nullThe uuid of the trace this metric was evaluated on, for test cases formed from traces.
spanUuidstring | nullThe uuid of the span this metric was evaluated on, for component-level metrics.
- OR
Trace Test CaseobjectA test case formed from an ingested trace and evaluated component by component. Its span-level metrics are in
metricsData.Show 9 propertiesHide 9 properties
traceobjectThe trace a component-level test case was formed from, without its spans. Fetch the trace by
uuidfor the full span tree.Show 17 propertiesHide 17 properties
uuidstringThis is the unique identifier of the trace.
namestring | nullThis is the name of the trace.
inputstring | nullThis is the input to the trace.
outputstring | nullThis is the output of the trace.
startTimestringThis is the time the trace started.
endTimestringThis is the time the trace ended.
environmentenumThis is the environment where your trace was posted, which helps with separating and debugging traces from different environments on the Confident AI platform.
Show 4 enum valuesHide 4 enum values
productiondevelopmentstagingtesting
metadataobject | nullThis is any additional metadata associated with the trace.
tagsarray | nullThis is any tags associated with the trace, which helps with grouping traces and filtering them on the Confident AI platform.
threadIdstring | nullThis is the unique identifier of the thread associated with the trace.
userIdstring | nullThis is the unique identifier for your end user for the trace.
metricCollectionNamestring | nullThis is the name of the metric collection the trace was evaluated with.
retrievalContextarray | nullThis is the retrieval context of your trace, which is to be used for evaluation.
contextarray | nullThis is the ideal retrieval context of your trace, which is to be used for evaluation.
expectedOutputstring | nullThis is the expected output of your trace, which is the ideal actual output and to be used for evaluation.
toolsCalledarray | nullThis is the tools called by your trace, which is to be used for evaluation.
Show 6 propertiesHide 6 properties
namestringThis is the name of the tool.
typeenumThe type of the tool call, either a function or an MCP tool.
Show 2 enum valuesHide 2 enum values
FUNCTIONMCP
descriptionstringThis is the description of the tool.
inputParametersobject | nullThis is the input parameters that are passed to the tool.
outputanyThis is the output of the tool.
reasoningstringThis is the reasoning your LLM provided for the tool call.
expectedToolsarray | nullThis is the expected tools to be called by the trace, which is to be used for evaluation.
Show 6 propertiesHide 6 properties
namestringThis is the name of the tool.
typeenumThe type of the tool call, either a function or an MCP tool.
Show 2 enum valuesHide 2 enum values
FUNCTIONMCP
descriptionstringThis is the description of the tool.
inputParametersobject | nullThis is the input parameters that are passed to the tool.
outputanyThis is the output of the tool.
reasoningstringThis is the reasoning your LLM provided for the tool call.
idstringThis is the id of the test case generated by Confident AI.
namestringThis is the name of the test case.
successboolean | nullWhether this test case passed all metric thresholds, or null while it is still being evaluated.
runDurationnumber | nullThe duration of the test case evaluation in seconds.
evaluationCostnumber | nullThe cost of evaluating this test case.
commentsstring | nullAny comments associated with this test case.
additionalMetadataobject | nullAdditional metadata associated with this test case.
metricsDatalist of objectsThe metric evaluation results for this test case.
Show 17 propertiesHide 17 properties
idstringThe unique identifier of the metric data entry.
namestringThe name of the metric.
scorenumber | nullThe final metric score, or null when the metric errored or was skipped.
reasonstring | nullThe reason for the metric score, generated by the evaluation model at evaluation time.
successboolean | nullWhether the metric score is above the threshold, or null while the evaluation is still running.
thresholdnumber | nullThe threshold for the metric, which determines if the metric is passing or failing.
strictModebooleanWhether the metric was run in strict mode, which outputs a binary score of 0 or 1.
skippedbooleanWhether the metric evaluation was skipped.
flakybooleanWhether the metric's verdict was non-deterministic across runs.
evaluationModelstring | nullThe evaluation model used to run the evaluation.
evaluationCostnumber | nullThe cost of running the evaluation in USD.
errorstring | nullThe error message if the evaluation failed.
errorTypeenum | nullWhy an evaluation errored: the AI connection or a transformer failed, the evaluation model failed, the test case lacked the parameters the metric needs, or an internal error occurred.
Show 5 enum valuesHide 5 enum values
AI_CONNECTION_ERRORTRANSFORMER_ERROREVALUATION_MODEL_ERRORINVALID_TEST_CASE_PARAMETERSINTERNAL_ERROR
createdAtstringThe time the metric data was created.
evaluatedAtstring | nullThe time the metric was evaluated, or null while it is still running.
traceUuidstring | nullThe uuid of the trace this metric was evaluated on, for test cases formed from traces.
spanUuidstring | nullThe uuid of the span this metric was evaluated on, for component-level metrics.
deprecatedbooleanIndicates if this endpoint is deprecated.