Skip to main content
Pinecone Docs

Search documentation

Type to search this documentation.

On this pageOverview

Evaluate an answer

For guidance and examples, see Evaluate answers.

curl
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: 2026-04" \
  -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"
}'

POST /evaluation/metrics/alignment

  • X-Pinecone-Api-Version (header, string, required) — Required date-based version header
  • question (body, string, required) — The question for which the answer was generated.
  • answer (body, string, required) — The generated answer.
  • ground_truth_answer (body, string, required) — The ground truth answer to the question.
  • 200 — The evaluation metrics and reasoning for the generated answer.
  • 422 — Validation error.
  • 500 — Internal server error.
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu