In 2023 a Friend Broke My Chatbot in Four Messages. Now Teams Depend on One.

Three years ago a friend broke my first chatbot in four messages and told me it only worked if he talked like me. Today I work on CBot, the global conversational assistant used across Commcise and security. The failure that worries me now isn’t the bot saying “I didn’t understand that.” It’s someone getting a confident, fluent, wrong answer about an internal process, acting on it, and finding out later. A weekend retrieval demo and a production assistant share maybe a fifth of their DNA, and this post is about the other four-fifths.

The knowledge problem is a data problem in disguise

Every tutorial on retrieval-augmented generation starts with a folder of clean markdown files. Real organisational knowledge lives in PDFs full of tables, slide decks, wikis of wildly varying freshness, and documents that exist in three conflicting versions. Before any clever retrieval mattered, the highest-leverage work was unglamorous: deciding which sources were authoritative, identifying which were stale, and building ingestion that kept each document’s structure intact. That last point is the same lesson the invoice pipeline taught me from the other direction. A table flattened into a paragraph embeds beautifully and means nothing, so chunks have to keep headings with their sections and tables whole with their header rows. If I had to split the effort that actually determines answer quality, I’d say roughly sixty percent comes from the corpus, a quarter from retrieval and only around fifteen percent from the model. Most teams budget it the other way round and are then surprised when a better model doesn’t help.

Grounding is a pipeline, not a prompt

The naive design of embedding the question, fetching the nearest chunks and asking the model to answer collapses quickly on real questions, and each collapse taught us a component. Follow-up questions were the first. People ask things like “and what about the other one?”, which is meaningless as a search query, so a small step rewrites each message, using the conversation so far, into a complete standalone question before anything is retrieved. That one step improved retrieval more than any change of embedding model. I built the same thing by hand in a college project last year and it was the biggest fix there too, for the same reason: no retriever can find documents for a query that doesn’t contain the question.

Search itself had to become hybrid. Vector similarity is excellent at paraphrase and poor at exact identifiers such as error codes and form names, while keyword search is the opposite, so we run both and rerank the merged results. That’s my 2023 TF-IDF knowledge coming back to life for a second time. On the research side, I’ve also been comparing ways of labelling clusters of conversation topics, including c-TF-IDF, KeyBERT-style embedding extraction and model-based labelling, and the classical methods stay stubbornly competitive whenever cost matters. And above all, we log what was retrieved for every answer, because when an answer is wrong the cause is usually that the right chunk never came back, and debugging without that record means debugging the wrong half of the system.

Teaching it to say “I don’t know”

Out of the box, a language model answers everything with total confidence. For an internal assistant, a confident wrong answer about a policy is worse than no answer: it misleads silently, and once discovered it poisons trust in everything the assistant says afterwards. You get one first impression per colleague. So abstention is engineered on purpose. A confidence check on retrieval decides whether there’s enough material to answer from, the model is restricted to what was retrieved, every answer cites its sources, and when the evidence is thin the assistant says so and points to where the answer might live or who to ask. The result was instructive. The share of questions that got a direct answer dipped slightly, and repeat usage went up. People came back because it refused to bluff. In enterprise AI, trust is the product, and the answers are just the interface to it.

Conversation state needed the same deliberate design. Stuffing the whole history into every request dilutes the retrieval query, bloats the context and makes cost grow with every turn. Instead the assistant keeps the last few turns verbatim, a compressed summary of older ones, and a record of what it has already claimed, so it can’t contradict itself four turns later. Users feel that kind of contradiction instantly, and no evaluation that tests one turn at a time will ever catch it. My 2023 slot-filling state machine was the toy version of exactly this problem.

Much of my R&D time on CBot has gone into agentic retrieval, where fetching documents becomes a decision the model makes rather than a fixed step. It can split a multi-part question into several searches, judge whether what came back is enough and search again if not, choose which corpus to search, and re-retrieve to check its own claims before answering. Each ability fixes a real failure and adds a new one. Sub-queries drift off topic, loops fail to end, the wrong source gets chosen confidently, and a verification step run by the same model that wrote the answer shares its blind spots. All the engineering lives in bounding it: step limits, explicit stopping rules and a plain “not enough information” exit.

Checking prose when there’s nothing to check it against

The invoice pipeline has schemas and arithmetic to verify its work. Prose has neither, which is the question I left open after the repair-loop post. Our answer starts with an evaluation set drawn from real logged questions rather than invented ones, since our polished pre-launch test questions bore little resemblance to what people actually typed. Answers are then scored by a model acting as judge against a rubric that separates faithfulness, meaning whether every claim is supported by the retrieved material, from completeness and appropriateness. Keeping those apart matters, because a complete, well-toned, unfaithful answer is the most dangerous kind. And the judge itself is calibrated against human labels before any of its numbers are trusted, since judges have measurable biases toward longer answers, toward whichever option appears first, and toward drifting scores. A faithfulness figure means something only when it’s reported alongside how often the judge agrees with people.

That turned out to be the answer to my open question. When you can’t write a validator, you manufacture an external verifier: a set of human labels used to calibrate a cheaper automated one. It’s still extrinsic feedback. It’s just feedback you had to build rather than one you found lying around.

One constraint shaped the architecture more than any other. An internal assistant must never answer from material the person asking isn’t entitled to see, which means access control belongs in the retrieval layer, not in the prompt. Telling a model not to reveal something is not a security boundary; the assistant should only ever see what that user may see. One consequence is that the same question from two people can legitimately get different answers, and the system should treat that as correct rather than as an inconsistency. CBot answers questions. The newest system I’m working on makes judgments, where reasonable people could disagree with the result, and I’m not yet sure how you evaluate that.

Leave a Reply