Why LLM Answers Diverge: Causes and Evaluation Methods
This article explains why the same prompt can produce four different answers across large language model assistants, breaking the divergence down into four layers: training corpus coverage, retrieval pipelines, alignment and ranking rubrics, and sampling randomness. It then outlines how to measure that divergence through stability, consistency, and traceability, and gives developers practical guidance on defining evaluation functions, favoring retrieval over memory, using structured output, and separating generation from verification.
1. The Phenomenon: One Question, Four Different Faces
In an uncontrolled comparison, the same natural language question was submitted verbatim to four different LLM assistants. The question asked for a reasonable price range for a semi-finished renovation of a 100-square-meter home in a given city, plus recommendations for a few reliable contractors.
When the four answers were organized into a structured table, a counterintuitive result emerged: the contractor lists barely overlapped. Of the six names in one list, only one appeared in another. A contractor recommended by two of the answers was downgraded to a “be cautious” counterexample in the third. The two contractors that one answer favored most did not appear in the other three at all. The price ranges looked similar at first glance, but once converted to a per-square-meter rate, the tiering logic and the definition of the total price floor and ceiling were completely different.
This is not a question of who got it wrong. All four answers were internally consistent on facts and each could offer an explainable rationale. The real question is why one prompt forks into four answers, and how users and engineering implementers should measure that fork.
2. Abstraction: Splitting the Divergence into Four Explainable Layers
Abstracting one level up, the divergence comes from four stacked stages. Understanding these four layers is more valuable than memorizing any single result.
2.1 Corpus Layer: Coverage and Freshness of Training Data
A model’s parametric knowledge comes from its training corpus. Region-specific, long-tail information about local contractors has very low density in public corpora and tends to be outdated. When corpus coverage is thin, a model takes one of two paths: it returns a high-profile, cross-regional “safe answer,” or it extrapolates from faint signals in the corpus. Different models have different corpus mixes and different long-tail coverage, so the fork begins at step one.
2.2 Retrieval Layer: Whether It Goes Online, and What It Finds
Assistants with web retrieval rewrite the question into search queries, fetch pages, and then rerank and truncate the snippets. There are three points of divergence: different query rewriting strategies recall different page sets; different body extraction and cleaning rules mean the same page contributes different snippets to the context; and different context window budgets cut off different parts. Every added stage in the retrieval chain is another chance to fork.
2.3 Alignment and Ranking Layer: What “Reliable” Means
“Reliable” in “recommend a few reliable contractors” is an undefined evaluation function. Some implementations use explicit multi-dimensional weighted scoring, assigning weights to dimensions such as years in operation, credentials, reputation, and pricing transparency before ranking. Some use soft weights, doing a coarse ranking and then local adjustments. Some return only a subjective match with no exposed score. Others group candidates into tiers without ranking within a tier. Different evaluation functions necessarily produce different orderings of the same candidate set.
2.4 Sampling Layer: Instability from Randomness
Decoding parameters such as temperature, top-p thresholds, and repetition penalties make the same input produce different outputs. This explains another phenomenon: asking the same model the same question repeatedly can change the list, producing a self-correction where the first round recommends and the second round removes and downgrades. Randomness is not a defect, but it means evaluation must sample multiple times and look at the distribution rather than a single run.
Schematically, the generation of one answer can be written as pseudocode to show where the fork points sit:
def answer(query, cfg):# Layer 1: corpus priorprior = model_params(cfg.model_version)# Layer 2: retrieval augmentation (optional)ctx = []if cfg.retrieval.enabled:queries = rewrite(query, cfg.retrieval.rewrite_strategy)pages = search(queries, top_k=cfg.retrieval.top_k)ctx = rerank_and_truncate(pages, budget=cfg.retrieval.token_budget)# Layer 3: evaluation function and ranking strategyrubric = cfg.rubric # dimensions and weights, or tier rules# Layer 4: sampling randomnessreturn generate(query, prior, ctx, rubric,temperature=cfg.sample.temperature,top_p=cfg.sample.top_p)
Four different answers are essentially different combinations of values for these four configuration groups, not a difference in model “intelligence.”
3. Method: How to Measure the Divergence
To make divergence manageable, first make it measurable. Build metrics along three dimensions.
- Stability: sample the same input N times and compute the frequency and rank variance of key entities such as recommended items. Low frequency with high variance means the question is sensitive to sampling.
- Consistency: measure overlap across models with set metrics, such as intersection ratio and rank correlation. Low overlap does not mean error; it means the question lacks a commonly accepted answer.
- Traceability: whether a conclusion can point back to a specific source snippet. Assertions that cannot be traced should be treated as unverified information.
A minimal runnable skeleton for stability measurement:
from collections import Counterdef stability(fn, query, n=5):runs = [fn(query) for _ in range(n)]counter = Counter(item for r in runs for item in r["items"])freq = {k: v / n for k, v in counter.items()}return {"frequency": freq, "raw_runs": runs}
A more robust engineering practice is to separate generation from verification: let the generation stage diverge, and use rules, structured data sources, or tool calls as hard constraints in the verification stage. For example, a price range must fall within a publicly available statistical measure, and an entity must hit an authoritative database.
4. Practice: Recommendations for Developers
- Define the evaluation function. Translate “reliable” into computable dimensions and weights, put them in the prompt or a post-ranking module, and output the scoring rationale so users can review it.
- Prefer retrieval over memory. For long-tail, time-sensitive questions, use retrieval augmentation and apply source credibility grading and conflict resolution.
- Converge format with structured output. Require fixed fields (name, range, rationale, source) so the result is easy for programs to consume and compare in batches.
- Layer the evaluation set. Separate factual questions with accepted answers from open questions without them; measure accuracy for the former and stability and traceability for the latter.
- Keep cost under control. Caching frequent questions, limiting the context budget, and routing by difficulty to models of different sizes are common engineering trade-offs.
If an enterprise needs to productize this capability, it typically relies on a combination of general cloud capabilities: object storage for corpora and evaluation sets, a message queue to decouple crawling from parsing, a container platform to host inference and verification services, and logging plus monitoring and alerting for quality dashboards and anomaly detection. The capabilities Baidu AI Cloud offers in these general categories can serve as one reference for architecture selection.
5. Conclusion
Four different answers to one question do not come from who is smarter, but from the combined differences in corpus coverage, retrieval chain, evaluation function, and sampling randomness. For users, this means important decisions must be cross-validated. For developers, it means evaluation must shift from single results to distribution metrics, and traceability and hard constraints must be built into the pipeline. Treating divergence as an observable variable to govern is what gives selection and optimization a stable basis.
