← Learn AI
C_000022 · llms and generative ai · advanced

Answer Relevancy and Correctness

Distinguishing whether an answer addresses the question from whether what it says is true — two separate failures.

Step 1 of 4

In words

What it is, why it matters, and what it is like.

Why am I learning this?

This concept matters because every time you ask an artificial intelligence for help, you face two distinct risks: it might talk past your question, or it might lie with confidence. Understanding the difference between these two failures is the foundation of knowing whether any automated system you build or use actually works. Without this distinction, a system can appear to respond politely and fluently while providing information that is either irrelevant to your specific need or factually wrong. Mastering this separation allows you to design tests that catch these errors independently, ensuring that you are not misled by impressive-sounding but empty or incorrect output. It is the first step toward reliably measuring the quality of any system that generates text.

The idea, in plain terms

Imagine you walk into a store and ask a clerk: 'Do you have a blue cotton kurta in size M?' Now consider three possible replies:

1. 'We have kurtas in the back, but I think they're all polyester, and we only go up to size L.'
2. 'Yes, we have blue cotton in size M — right over there on the third shelf.'
3. 'The weather is lovely today, and the parking lot is almost full.'

Reply 1 addresses the topic of kurtas, sizes, and fabric, so it is somewhat relevant to your inquiry. However, it does not confirm whether the specific item exists; it implies the answer might be no, but without directly stating it. It is partially relevant but unclear on correctness.

Reply 2 is both relevant and correct. It directly answers 'yes' to your request and provides a location. If the clerk is truthful, this is a perfect response.

Reply 3 is neither relevant nor correct. It ignores your question entirely. It might be true that the weather is lovely, but it does not help you find a kurta.

Now consider two more subtle failures:
- An answer that is relevant but false: 'Yes, we have that kurta in red.' This response addresses your request for a kurta (relevant) and confirms availability, but if the red one is out of stock while the blue one is not, the factual claim is wrong (incorrect).
- An answer that is true but irrelevant: 'The store closes at 9 PM.' This statement may be factually true, but it does not answer whether the kurta is in stock.

This distinction is crucial. You must check an answer against two different standards independently: does it address the question asked (relevancy), and are its claims supported by facts or evidence (correctness)? An AI system can excel at one while failing the other.

An analogy

Think of a customer service representative on a phone line. You call and ask: 'What is the refund policy for a damaged item?'

The representative has two distinct jobs: to understand your question and stay on topic (relevancy), and to provide accurate information (correctness). These are separate skills that can fail independently.

A representative who says, 'Our return window is 30 days,' is being relevant because they are discussing returns, which relates to your question. However, if the actual policy is 14 days, they are incorrect.

A representative who says, 'We have a loyalty program with points,' is being irrelevant. They heard the word 'policy' and went off on a tangent about a different topic, even if every word they say about the loyalty program is factually true.

Now push this analogy to its limit: imagine the representative is not a human but a machine that has read millions of customer-service transcripts. It has learned patterns of what a 'good answer' looks like — fluent, polite, and on-topic-sounding — but it does not have a fixed database of policies. Its 'knowledge' is a statistical guess about what words usually follow each other. This is where the analogy becomes crucial: the machine can produce an answer that sounds perfectly relevant and confident but is entirely fabricated. A human representative, when unsure, can say 'Let me check'; a machine often cannot easily admit uncertainty unless specifically trained to. This is why relevancy and correctness are evaluated separately: a fluent-sounding answer that addresses the question can still be completely wrong in its facts, and evaluation systems must catch both types of failures using different methods.

Definition

Answer relevancy measures whether a generated response directly addresses the question that was asked; answer correctness measures whether the specific claims made in the response are true and supported by evidence or reference data. These are two independent axes of quality that must be scored separately to accurately judge an AI's performance.

Where this sits

This concept is the entry point to the broader discipline of LLM Evaluation. It connects to neighbouring topics in your library: Word Overlap Metrics compares a generated answer to a correct example by counting shared words — but it cannot judge whether the answer is relevant to the question, only whether it resembles a fixed reference string. Deterministic Validators give unambiguous pass/fail results on format and structure, which is the correct layer for catching irrelevancy of a mechanical kind (like answering in the wrong language) but never for judging truth. Gold and Adversarial Sets require you to label expected behaviour — and labelling relevancy vs correctness separately is how you build a dataset that can expose both failure modes.

Signal from the Frontier

Get the next essay on mind, machine, and meaning

Essays at the intersection of AI, philosophy, and Indian governance. No promotional content.

We'll send a one-click sign-in link to confirm. No password needed.

Views expressed are personal and do not represent the Government of India or the Government of Uttarakhand.