When you build a product that analyses conversations, the obvious architecture is a single call: send the chat to the biggest model you can afford and ask for everything. Scores, labels, trends, a summary. It's one integration and it demos well.
We build Le Confidant, which analyses exported WhatsApp conversations, and we went the other way. A report is produced by an ensemble: not several brands of the same model averaged together, but different kinds of system, each doing the one job it's good at.
The design rule behind it fits in one sentence: split judgement from arithmetic.
To show the pattern without walking through our own pipeline, every example below uses a made-up domain: a tool that analyses customer-support chats and reports how well a support team handles them. The questions and numbers are invented for this post.
Two kinds of question
A support manager asks two very different kinds of question about a chat.
"How long did the customer wait for the first reply, and how many messages did it take to close the ticket?" is arithmetic. The answer is in the timestamps. A language model asked for it is estimating a number that could simply be counted.
"Did the agent actually understand the problem?" is judgement. No amount of counting answers it.
So the work is split across four layers.
Layer 1: statistics are plain code
Wait times, message counts, time to resolution, activity by hour: all of it comes from ordinary code. No model touches it, so the same chat always gives the same numbers.
Layer 2: a decision model labels every message
This is the layer that does the judgement. We use a decision model (Jev, from TypeSafe) that doesn't write text at all. You give it some context and a typed question, and it returns a typed answer with a probability attached. Because the possible answers are fixed in advance, it can't invent one.
Each message is asked a fixed set of narrow questions. In our made-up support analyser, one of them could look like this (illustrative only):
{
"id": "acknowledges_problem",
"question": "Does this agent message refer to the specific problem the customer described?",
"answers": ["yes", "no"],
"guidance": {
"yes": "It restates the customer's issue or responds to its details.",
"no": "A greeting, a canned reply or a different topic. 'Thanks for reaching out!' on its own is no."
}
}
A few principles make questions like this work:
- One narrow judgement per question. Never "rate this agent from 0 to 10", always "does this message do X?".
- Nothing the model would have to count. Dates, durations and totals stay in code.
- Edge cases are written down. If a polite canned reply shouldn't count, the guidance says so.
Each answer is stored as a signal: the message, the question and the probability.
Layer 3: the scores are aggregated in code
Every score in the report is computed from those stored signals by ordinary code, with no model involved. Take "how often do agents acknowledge the customer's problem?" in the fictional analyser. A message counts as acknowledging the problem only when the model's probability for that answer is above a set threshold. The score is then simply the share of agent messages that count. A weekly trend is the same share, worked out week by week.
The threshold is calibrated against reference data rather than picked by feel.
Pure aggregation buys three things that a model-produced score can't give you:
- Determinism. The same signals always produce the same numbers.
- Traceability. Every finding carries the messages behind it, so "which messages?" has an answer made of evidence.
- Testability. Aggregation is unit-tested, and a threshold change can be measured instead of argued about.
Layer 4: the LLM writes the prose, and only the prose
A large language model still writes the summary, because writing is what it's good at. It gets finished numbers as input. Afterwards, every number and label in its output is replaced with the computed value, so the model can't round, nudge or improvise a statistic.
That step deserves a test of its own: hand it a summary with deliberately wrong numbers and invented quotes, and check that every one of them is replaced.
Cheap enough to label everything
A small decision model is fast and cheap enough to run over every message, not just over a few passages that a search step happened to pick. That's what makes the scores cover the whole conversation.
Checking the labels
Before trusting the labels, compare them with a stronger reference model on synthetic test chats. That tells you how well each question ranks messages and where the probability threshold should sit. Resist tuning everything to a small test set: a handful of fixtures can calibrate a threshold, but fitting many weights to them is overfitting, not calibration.
When the ensemble is worth it
If your product turns language into numbers that people will act on, the single-model design hides a real cost: the numbers are impressions. They change between runs, and nobody can point at the input that produced them.
Splitting the work costs more plumbing: a question set, a signal store, aggregation code and a check on the final numbers. In exchange, every number is computed, reproducible and traceable to specific messages, and the language model does what it's best at.
The non-technical version of how this works in our product is on our blog: Which AI models analyse your WhatsApp chat?
This article was written with the help of AI and reviewed by the Mnemonica team. The support-chat examples are fictional.

Top comments (0)