Skip to content

Examples

Examples are individual ground truth records within an example set. Each example contains an input, the expected output, and optional metadata explaining why this represents correct behavior.

An example consists of:

  • Input - The input data that would be provided to a pipeline
  • Expected Output - The correct output the pipeline should produce
  • Name - Optional human-readable identifier
  • Rationale - Optional explanation of why this is the correct output
  • Status - active or archived

Create an example

Terminal window
curl -X POST https://api.catalyzed.ai/example-sets/KjR8I6rHBms3W4Qfa2-FN/examples \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Quarterly Report Summary",
"input": {
"document": "Q4 2024 saw revenue growth of 15% year-over-year, driven primarily by expansion in the enterprise segment. Customer acquisition increased by 22%, while churn remained stable at 3.2%. The average contract value grew by $45,000 to reach $180,000."
},
"expectedOutput": {
"summary": "Q4 2024 highlights: 15% YoY revenue growth led by enterprise expansion, 22% increase in customer acquisition, stable 3.2% churn, and ACV growth to $180K."
},
"rationale": "Summary captures all key metrics (revenue growth, customer acquisition, churn, ACV) in a concise format."
}'

Response:

{
"exampleId": "ExR8I6rHBms3W4Qfa2-FN",
"exampleSetId": "KjR8I6rHBms3W4Qfa2-FN",
"exampleSetInputsSchema": { ... },
"exampleSetOutputsSchema": { ... },
"exampleSetConfiguration": { ... },
"name": "Quarterly Report Summary",
"input": {
"document": "Q4 2024 saw revenue growth of 15% year-over-year..."
},
"expectedOutput": {
"summary": "Q4 2024 highlights: 15% YoY revenue growth..."
},
"rationale": "Summary captures all key metrics in a concise format.",
"status": "active",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z",
"createdBy": "usr_abc123"
}

List examples in a set

Terminal window
curl "https://api.catalyzed.ai/example-sets/KjR8I6rHBms3W4Qfa2-FN/examples" \
-H "Authorization: Bearer $API_TOKEN"

Use the top-level endpoint to query examples across multiple sets:

Terminal window
curl "https://api.catalyzed.ai/examples?teamIds=ZkoDMyjZZsXo4VAO_nJLk" \
-H "Authorization: Bearer $API_TOKEN"
ParameterTypeDescription
exampleIdsstringComma-separated list of IDs
exampleSetIdsstringComma-separated example set IDs
teamIdsstringComma-separated team IDs
namestringPartial match filter
statusstringactive or archived
pagenumberPage number (1-indexed)
pageSizenumberResults per page (1-100)
orderBystringcreatedAt, name, updatedAt, status
orderDirectionstringasc or desc

Get example details

Terminal window
curl https://api.catalyzed.ai/examples/ExR8I6rHBms3W4Qfa2-FN \
-H "Authorization: Bearer $API_TOKEN"

Update example

Terminal window
curl -X PUT https://api.catalyzed.ai/examples/ExR8I6rHBms3W4Qfa2-FN \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Quarterly Report Summary (Updated)",
"expectedOutput": {
"summary": "Q4 2024: 15% revenue growth (enterprise-led), 22% more customers, 3.2% churn, $180K ACV."
},
"rationale": "Updated to use more concise format with parenthetical details."
}'

Creating Examples from Pipeline Executions

Section titled “Creating Examples from Pipeline Executions”

A common workflow is to promote successful pipeline executions to examples. This captures real-world inputs and verified outputs:

Promote execution to example

Terminal window
curl -X POST https://api.catalyzed.ai/pipeline-executions/GkR8I6rHBms3W4Qfa2-FN/promote-to-example \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"existingExampleSetId": "KjR8I6rHBms3W4Qfa2-FN",
"exampleName": "Real customer query - Jan 2024",
"rationale": "Verified correct by domain expert"
}'

You can also create a new example set when promoting:

{
"newExampleSet": {
"name": "Production Examples",
"description": "Examples from verified production executions"
},
"exampleName": "First production example",
"rationale": "Verified by QA team"
}
StatusDescription
activeExample is used in evaluations
archivedExample is excluded from evaluations

Archive example

Terminal window
curl -X POST https://api.catalyzed.ai/examples/ExR8I6rHBms3W4Qfa2-FN/archive \
-H "Authorization: Bearer $API_TOKEN"
Terminal window
curl -X POST https://api.catalyzed.ai/examples/ExR8I6rHBms3W4Qfa2-FN/reactivate \
-H "Authorization: Bearer $API_TOKEN"

Delete example

Terminal window
curl -X DELETE https://api.catalyzed.ai/examples/ExR8I6rHBms3W4Qfa2-FN \
-H "Authorization: Bearer $API_TOKEN"
FieldTypeDescription
exampleIdstringUnique identifier
exampleSetIdstringParent example set
exampleSetInputsSchemaobjectSchema snapshot from example set
exampleSetOutputsSchemaobjectSchema snapshot from example set
exampleSetConfigurationobjectConfiguration snapshot from example set
namestringOptional name (max 255 chars)
inputobjectInput data
expectedOutputobjectExpected output
rationalestringOptional explanation
statusstringactive or archived
createdAttimestampCreation time
updatedAttimestampLast modification time
createdBystringUser who created this example
  1. Use descriptive names - Make examples easy to identify in evaluation results
  2. Include rationale - Document why the expected output is correct
  3. Cover edge cases - Include examples that test boundary conditions
  4. Promote real executions - Build your example set from verified production data
  5. Archive instead of delete - Keep historical examples for reference