Numan tests its AI coach with patient-bot dialogues and switches LLM providers in a day, not weeks
The UK clinic Numan built Nu, an AI coach for people on a weight-loss programme, and Nu is not allowed to diagnose or prescribe medication. Standard "question-and-reference-answer" tests did not catch the problems, because coaching is a dialogue, not a single reply. Now a bot plays the patient, and an LLM judge scores the entire conversation by category. The tests run through the agent's live graph, so switching LLM providers took a day rather than weeks.
AI-processed from LangChain Blog; edited by Hamidun News
Imagine a chatbot that talks every day with people on a weight-loss programme. It must support and advise them, but it may not make diagnoses, prescribe medication or take clinical decisions. The British digital clinic Numan is building exactly such an AI coach, called Nu. Testing it turned out to be harder than building it. The team describes how it dropped ready-made test scripts in favour of dialogues with patient bots. Along the way it learned to switch its LLM provider in a single day, where that used to take weeks of manual testing.
Why ordinary tests do not work for a coach
Numan started the way most teams do: a set of input questions, reference answers, and an LLM judge that scores each reply. For a question-answer bot, that is enough. Coaching works differently. There is often no single correct reply, and whether a reply is safe depends on the whole conversation around it.
The first problem was averaging. If the judge produces one average score across the whole set, a few dangerous answers barely move the number. The dialogues look safe when they are not. The second problem was errors in the tests themselves. In one run, a group of low scores turned out to be the fault of the rubric, not of Nu. The rubric required empathy, questions and advice within two turns. A live coach would spread that over the whole conversation, and Nu was behaving correctly.
Pre-written multi-step dialogues did not help either. If the patient's second line is written in advance, it does not account for what the agent said in the first. Once Nu departs from the script, every later line answers a conversation that never happened.
What they built instead
Nu is built as a graph in LangGraph. A main supervisor module routes requests to specialist sub-agents, each with its own prompt and tools. A new specialist is cheap to add and immediately falls under the same tests.
Everything visible in a single reply is checked with thematic sets: coaching quality, safety, medication questions, routing and summarisation. Two things changed. The judge scores each category separately, so a cluster of failures cannot hide behind an average. And the rubric asks only about what is visible in a single reply, so Nu is not penalised for a reasonable pace of conversation.
The team's principle is "what we ship is what we test." There is no separate stand with a copy of the prompt. Each test runs through the same graph the patient talks to. That means the same sets can be run on different providers and the results compared side by side in LangSmith, where conversation traces and experiments are stored. Nu currently runs on two leading providers: one for the supervisor and another for the specialists. Moving between them took a day.
The safety boundary is checked on every change. If checks in that category get worse, the release is blocked automatically. Inside the graph sits a guard node that checks each answer against a set of clinical rules. An unsafe draft is sent back to the supervisor, and if the problem recurs, the patient receives a safe placeholder. In addition, coaches manually review a sample of real dialogues every day.
Simulation instead of scripts
The new layer is still a prototype. It is given a patient persona, a scenario, the key problems Nu should uncover, and a turn limit. A cheaper model plays the patient and reacts to what the agent actually says. A judge then scores the whole dialogue by category. This makes it possible to test hostile cases: phrasings that try to slip a clinical request through, or manipulation disguised as an ordinary question. It also catches mistakes such as answering too quickly instead of asking questions first. Strengthening the prompts against these dialogues reduced the number of serious boundary violations in jailbreak scenarios. In parallel, tests on medication questions ran so that improvements would not break what was already trusted.
A telling lesson came from conflicting criteria. Two rubric topics contradicted each other on the question of a missed dose. One required refusing and referring the user to a doctor, while the other required giving general facts from the drug's instructions. A single prompt cannot satisfy both. The team's conclusion: the scarce resource is not the prompt, which a good model will write from a short description, but the evaluation criteria.
Limitations and what to do
The simulation criteria have so far been written by engineers. For that reason this layer does not block releases and does not substantiate safety claims until a clinician who understands the regulatory line approves the rubric. Under UK rules from the MHRA, software with a medical purpose becomes a medical device, and Numan wants to remain a wellness product.
Practical advice for those building agents next to a regulated area:
- Use fixed sets for what is visible in a single reply, and check the rest with simulated dialogues.
- Score by category, not by average.
- Make the boundary a test that blocks the release.
- Hand the rubric for a regulated zone to a domain expert.
- Put most of your effort into the evaluation criteria.
Next, Numan wants to run the same rubrics on real dialogues in LangSmith, so that reviewers start with cases that are already labelled. Early experiments with automatic prompt tuning against a single behavioural benchmark raised the score noticeably without manual adjustment. This supports the team's hypothesis: if the criteria are written correctly, the rest can be automated.
- Dec 2, 2026Ai2 Releases MolmoWeb2 Web Agents: 27B Model Solves 75.3% of Tasks
- Dec 2, 2026Amazon Releases Ergo Open Weights for Coding: 1.1 Trillion Parameters and 2,200 Tokens per Second
- Dec 2, 2026OpenAI Opens Dots Agent to ChatGPT Plus Subscribers With 10,000+ Plugins
- Dec 2, 2026FSK Group Has Launched 395 AI Agents in Six Months, with a 97.7% Success Rate
Key Questions Answered
Why ordinary tests do not work for a coach?
Numan started the way most teams do: a set of input questions, reference answers, and an LLM judge that scores each reply. For a question-answer bot, that is enough. Coaching works differently. There is often no single correct reply, and whether a reply is safe depends on the whole conversation around it. The first problem was averaging. If the judge produces one average score across the whole set, a few dangerous answers barely move the number. The dialogues look safe when they are not.
What they built instead?
Nu is built as a graph in LangGraph. A main supervisor module routes requests to specialist sub-agents, each with its own prompt and tools. A new specialist is cheap to add and immediately falls under the same tests. Everything visible in a single reply is checked with thematic sets: coaching quality, safety, medication questions, routing and summarisation. Two things changed. The judge scores each category separately, so a cluster of failures cannot hide behind an average.
What are the key details on Simulation instead of scripts?
The new layer is still a prototype. It is given a patient persona, a scenario, the key problems Nu should uncover, and a turn limit. A cheaper model plays the patient and reacts to what the agent actually says. A judge then scores the whole dialogue by category. This makes it possible to test hostile cases: phrasings that try to slip a clinical request through, or manipulation disguised as an ordinary question. It also catches mistakes such as answering too quickly instead of asking questions first.
Test Frontier LLMs & Autonomous Agents in One Workspace
Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.
Daily 60-sec AI Voice Brief + Weekly Production AI Agent Playbook
Listen to a 60-second AI news brief every morning and get a weekly hands-on playbook for shipping AI agents to production — tools, MCP servers and patterns that work. Curated by Jemal Hamidun, Head of AI at Alpina Digital.
