-p-500.png)
Run Your First TRACE Evaluation
TRACE helps you assess Responsible AI performance in seconds. Follow these steps to run your first model evaluation using the TRACE Metrics API.
Step 1: Prepare Your Metrics Payload
Create a JSON file with your model’s metrics. Minimum required fields include:
{
"metric_metadata": {
"application_name": "chat-application",
"version": "1.0.0",
"eval_provider": "deepeval",
"use_case": "transportation"
},
"metric_data": {
"deepeval": {
"AnswerRelevancyMetric": 85,
"ContextualPrecisionMetric": 92,
"ContextualRecallMetric": 78,
"ContextualRelevancyMetric": 88,
"ConversationCompletenessMetric": 95,
"ConversationRelevancyMetric": 82
}
}
}
*Save this as trace_payload.json.
Step 2: Get Your API Key
To authenticate your request, you'll need an API key.
Once you have your key, proceed to the next step.
Step 3: Submit via API
Use cURL or Python to POST your payload to TRACE.
cURL Example:
curl -X POST https://api.cognitiveview.com/metrics \
-H "Content-Type: application/json" \
-H "Ocp-Apim-Subscription-Key: Bearer YOUR_API_KEY" \
-d @trace_payload.json
Python Example
import requests
url = "https://api.cognitiveview.com/metrics"
headers = {
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
response = requests.post(url, headers=headers, json=payload)
print(response.status_code)
print(response.json())
Step 4: Receive Your Report
If successful (201 Created), you'll receive:
{
"message": "Evaluation in progress.",
"report_id": "abc123"
}
Use this report_id to access your report via the dashboard or API.
What You’ll Get
Responsible AI Score (0–100)
Star Rating
Pillar breakdown (Performance, Fairness, Safety, etc.)
PDF/JSON report
Clause-mapped compliance insights (EU AI Act, NIST, ISO 42001)