PINECONE_API_KEY="YOUR_API_KEY"
curl https://prod-1-data.ke.pinecone.io/assistant/evaluation/metrics/alignment \
-H "Api-Key: $PINECONE_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Pinecone-Api-Version: 2025-10" \
-d '{
"question": "What are the capital cities of France, England and Spain?",
"answer": "Paris is the capital city of France and Barcelona of Spain",
"ground_truth_answer": "Paris is the capital city of France, London of England and Madrid of Spain"
}'
{
"metrics": {
"correctness": 123,
"completeness": 123,
"alignment": 123
},
"reasoning": {
"evaluated_facts": [
{
"fact": {
"content": "<string>"
},
"entailment": "<string>"
}
]
},
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
}
}Evaluate an answer
Evaluate the correctness and completeness of a response from an assistant or a RAG system. The correctness and completeness are evaluated based on the precision and recall of the generated answer with respect to the ground truth answer facts. Alignment is the harmonic mean of correctness and completeness.
For guidance and examples, see Evaluate answers.
PINECONE_API_KEY="YOUR_API_KEY"
curl https://prod-1-data.ke.pinecone.io/assistant/evaluation/metrics/alignment \
-H "Api-Key: $PINECONE_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Pinecone-Api-Version: 2025-10" \
-d '{
"question": "What are the capital cities of France, England and Spain?",
"answer": "Paris is the capital city of France and Barcelona of Spain",
"ground_truth_answer": "Paris is the capital city of France, London of England and Madrid of Spain"
}'
{
"metrics": {
"correctness": 123,
"completeness": 123,
"alignment": 123
},
"reasoning": {
"evaluated_facts": [
{
"fact": {
"content": "<string>"
},
"entailment": "<string>"
}
]
},
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
}
}Documentation Index
Fetch the complete documentation index at: https://docs.pinecone.io/llms.txt
Use this file to discover all available pages before exploring further.
PINECONE_API_KEY="YOUR_API_KEY"
curl https://prod-1-data.ke.pinecone.io/assistant/evaluation/metrics/alignment \
-H "Api-Key: $PINECONE_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Pinecone-Api-Version: 2025-10" \
-d '{
"question": "What are the capital cities of France, England and Spain?",
"answer": "Paris is the capital city of France and Barcelona of Spain",
"ground_truth_answer": "Paris is the capital city of France, London of England and Madrid of Spain"
}'
Authorizations
Headers
Required date-based version header
Body
The request body for the alignment evaluation.
The request for the alignment evaluation.
Response
The evaluation metrics and reasoning for the generated answer.
The response for the alignment evaluation.
The metrics returned for the alignment evaluation.
Show child attributes
Show child attributes
The reasoning behind the alignment evaluation.
Show child attributes
Show child attributes
Token counts for the input prompt and completion.
Show child attributes
Show child attributes
Was this page helpful?