---
title: "Evaluate factual consistency"
method: POST
path: "/v2/evaluate_factual_consistency"
tags: ["Factual Consistency Evaluation"]
---

# Evaluate factual consistency

`POST /v2/evaluate_factual_consistency`

Evaluates the factual consistency of a generated text (like a summary) against source documents. The evaluation determines how accurately the generated text reflects the information in the source documents. This helps identify potential hallucinations or misrepresentations.

Use this endpoint to validate generated content against trusted source materials, such as in legal, healthcare, scientific publishing, and enterprise knowledge systems.

The request body includes the following parameters:
* `model_parameters.model_name`: Optional. The evaluation model to use. `hhem_v2.3` is the default and the recommended model. `hhem_v2.2` is retired; it remains accepted for backward compatibility and is served by `hhem_v2.3`. Any other value is rejected with a `400`.
* `generated_text`: The output text you want to evaluate, such as a model-generated summary, answer, or response.
* `source_texts`: An array of source documents or passages used to verify the accuracy of the generated text.

The endpoint scores the texts as given, in whatever language they are written. HHEM is trained on `eng`, `deu`, `fra`, `spa`, `por`, `ara`, `kor`, `zho`, `rus`, `jpn`, and `hin`; treat scores for text in other languages as unreliable.

### Example request

This example evaluates whether a generated statement about the Eiffel Tower is factually accurate based on two reference documents.

```json
{
  "generated_text": "The Eiffel Tower is located in Berlin.",
  "source_texts": [
    "The Eiffel Tower is a famous landmark located in Paris, France.",
    "It was built in 1889 and remains one of the most visited monuments in the world."
  ]
}
```
### Example response

The response includes the factual consistency score.

```json
{
  "score": 0.23
}
```
* `score`: A normalized value between `0.0` and `1.0` that reflects the overall factual alignment between the generated text and the source texts. Higher scores indicate stronger consistency.

## Headers

- `Request-Timeout` integer
- `Request-Timeout-Millis` integer

## Request body

- EvaluateFactualConsistencyRequest — Request to evaluate the factual consistency of a generated text against source documents.
  - `model_parameters` object — The model parameters for the evaluation.
    - `model_name` string — The name of the model to use for evaluation. `hhem_v2.3` is the default and the recommended model. `hhem_v2.2` is retired; it remains accepted for backward compatibility and is served by `hhem_v2.3`. Any other value is rejected.
  - `generated_text` string, required — The generated text (e.g., summary or answer) to evaluate for factual consistency.
  - `source_texts` string[], required — The source documents or text snippets against which to evaluate factual consistency.

## Response `200`

The factual consistency evaluation results.

- EvaluateFactualConsistencyResponse — Results of the factual consistency evaluation.
  - `score` number, double, required — A prediction score from HHEM, greater than 0 and less than 1. The score monotonically indicates the likelihood of hallucinations.

## Other responses

- `400` — Invalid request body.
- `403` — Permissions do not allow factual consistency evaluation.

## Changes

- **2026-08-27** `0d51a9e3a0b3` — 1 info
  - removed the non-success response with the status `422`

[Change history](https://skmtc.dev/vectara/apis/vectara-rest-api-v2/changes/v2/evaluate_factual_consistency/post.md)

---

[API](https://skmtc.dev/vectara/apis/vectara-rest-api-v2.md) · [All operations](https://skmtc.dev/vectara/apis/vectara-rest-api-v2/llms.txt) · [OpenAPI document](https://skmtc.dev/vectara/apis/vectara-rest-api-v2/revisions/de6b34bc4a4f?raw)
