Skip to main content

Learn · Demo

Evaluating LLM answers

"It sounds right" isn't good enough for enterprise AI. Pick a task, then compare candidate answers on two real signals: overlap with a reference answer (token-F1) and grounding in the source context — the tell-tale for hallucination.

Choose a task:

Source context

Question

Reference answer (ground truth)

Score a candidate answer:

Candidate answer

—

Pick a candidate above.

■ supported by context · ■ not found in context (possible hallucination)

Token-overlap F1 vs reference

—

Precision × recall of content words shared with the reference answer.

Grounding vs context

—

Share of the answer's content words actually found in the source context.

Why two metrics?

F1 tells you whether the answer matches what a human said — but a fluent wrong answer can still score low. Grounding catches the dangerous failure mode: confident claims that aren't in the source at all. Low grounding is the signature of a hallucination. Real eval pipelines add semantic similarity and LLM-as-judge scoring on top, but the principle is the same — never trust fluency alone.

This demo uses word-overlap maths (content words, stopwords removed) so you can see exactly how the scores are computed. Production evaluation also uses embedding-based semantic similarity — see the Embeddings demo — and human or model graders for nuance.