Kenneth W. Bingham AI Engineer

case study · node · deployed

Does the model know, or is it improvising?

valuesai answers your question several times over, embeds the answers, and measures whether they agree with each other. A panel that converges is something the model knows. A panel that scatters is something it is inventing, and the score says so before you act on it.

The problem

A language model gives you the same confident tone whether it is recalling something it has seen ten thousand times or filling a gap with something plausible. The prose does not change. That is the whole difficulty: the failure mode is invisible at exactly the moment it matters.

Asking the model how confident it is does not help, because it will answer that question with the same machinery it used for the first one. So the measurement has to come from somewhere the model does not control.

Ask it more than once. If it knows, the answers land in the same place. If it is improvising, each attempt improvises differently. Agreement across independent attempts is evidence you can measure without needing to know the right answer yourself.

How it works

How a prompt is scored One prompt is answered several times, the first greedily as an anchor and the rest sampled. Every answer is embedded. Two independent measures are taken: topic collapse, the length of the resultant of the unit vectors, and fact collapse, agreement on the decisive value. The two combine into a reliability score. a prompt anything answer 1 · greedy anchor answer 2 · sampled answer 3 · sampled answer 4 · sampled answer 5 · sampled embed each nomic-embed-text topic collapse same question at all? fact collapse same decisive value? reliability score and abstain, or not
Two independent measures, not one. They can disagree, and when they do that is the interesting case: a panel can be talking about the same subject while contradicting itself on the one detail the question actually asked for.

Topic collapse

Embed each answer, normalise to unit vectors, sum them, and divide the length of that resultant by the number of answers. Answers pointing the same way reinforce and give a resultant near 1. Answers pointing in different directions partly cancel. It asks a blunt question: are these even answers to the same thing?

Fact collapse

Whether the answers agree on the thing the question turns on, which is often not the prose. The engine routes on the question itself:

What the numbers look like

Measured on the live service, not illustrative.

AskedScoreTopicFactWhat happened
Boiling point of water 91 · reliable 9992 Every answer said 100 degrees Celsius. Nothing to disagree about.
Moons of Mars 76 · reliable n/an/a Phobos and Deimos every time, with the wording varying around the agreed facts.
Population of a town that does not exist 32 · fabrication risk 9633 The interesting one. Topic collapse stayed high because every answer was clearly about the same question, while fact collapse fell through the floor: each attempt invented a different correction of the invented name. The engine abstained.

That third row is the entire product. The model did not refuse and did not sound unsure. It produced three fluent, differently wrong answers, and the disagreement between them is what gave it away.

Engineering trade-offs

DecisionChosenInstead ofWhy, and what it costs
Confidence signal Agreement across a panel Asking the model how sure it is Self-reported confidence is produced by the same machinery that produced the answer, so it fails in the same places. Agreement is measured from outside. The cost is that it takes several generations instead of one.
Comparing answers Embeddings A model judging the answers An LLM judge is another model with the same failure mode, and it is slow. Embedding is fast, deterministic, and cheap. The cost is that it compares meaning rather than reasoning about it.
Request shape A job you watch One request that returns an answer Measured on this host: 3.6 tokens per second, so a panel takes minutes. Hiding that behind a spinner reads as broken. Showing each answer as it lands turns the wait into the demonstration. The cost is a queue, polling, and more moving parts.
Panel generation Sequential All at once The engine's own entry point fires the whole panel with Promise.all. With a single Ollama already using every core, that makes each answer slower and none of them arrive sooner. Sequential is no slower overall and lets each answer be shown on arrival.

Honest limits