Skip to main content
POST
/
evaluation
/
metrics
/
alignment
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
  }
}
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

Api-Key
string
header
required

An API Key is required to call Pinecone APIs. Get yours from the console.

Headers

X-Pinecone-Api-Version
string
default:2025-10
required

Required date-based version header

Body

application/json

The request body for the alignment evaluation.

The request for the alignment evaluation.

question
string
required

The question for which the answer was generated.

Example:

"What is the capital city of Spain?"

answer
string
required

The generated answer.

Example:

"Barcelona."

ground_truth_answer
string
required

The ground truth answer to the question.

Example:

"Madrid."

Response

The evaluation metrics and reasoning for the generated answer.

The response for the alignment evaluation.

metrics
Metrics · object
required

The metrics returned for the alignment evaluation.

reasoning
Reasoning · object
required

The reasoning behind the alignment evaluation.

usage
TokenCounts · object
required

Token counts for the input prompt and completion.