How to evaluate and monitor your LLM chatbot in production
Evaluating an LLM chatbot means checking whether the user got what they came for, not just whether the model returned a response. Standard monitoring misses this: a chatbot can return 200 on every request and still give wrong, out-of-scope, or incomplete answers.
By Arun Prasad · Published · Last updated
On this page
Why evaluating an LLM chatbot is harder than testing normal software
LLM chatbots fail in ways that normal software doesn't, and standard monitoring misses most of those failures.
With conventional software you can write a test that gives the same input, expects the same output, and passes or fails deterministically. An LLM chatbot doesn't work that way. The same question phrased slightly differently can produce a different answer. Ask "How do I reset my password?" and your chatbot gives one reply; ask "I forgot my password, what do I do?" and you might get a different response. A response can be grammatically fluent and factually wrong. A model can go off-topic, refuse a valid request, or give an answer that was fine in isolation but doesn't follow from what the user said three turns earlier.
A tool returning HTTP 200 tells you the request went through, but nothing about whether the user's question was answered correctly, whether the chatbot stayed inside its defined role, or whether a conversation that started well ended in confusion. For example: a support chatbot returns 200 and a response to "How do I reset my password?" but the answer contradicts your documentation. The request succeeded; the task failed. Tracking outcomes against user goals, not just span status, is what separates evaluation from monitoring.
Conversation history compounds this. Early turns change what later turns mean. A chatbot that handles the opening question well can still break down when the user follows up, changes their mind, or provides missing context. Single-turn tests miss this class of failure entirely.
Grouping repeated failures into patterns matters too. One bad answer might be noise. The same kind of bad answer appearing across hundreds of sessions is a signal, and you need visibility across sessions, not just individual traces, to see it.
Step 1: Define what a good answer looks like
Start by writing a rubric that covers four qualities: factual accuracy, scope, completeness across a conversation, and tone. This rubric becomes the input to every evaluation step that follows.
Four qualities to specify:
Factual accuracy. Does the chatbot answer what your documents actually say? An answer that sounds confident but contradicts your content is a failure, even if the user doesn't notice immediately.
Scope. Does the chatbot stay inside its defined role? If it's a support bot for a software product, it shouldn't be giving investment advice. Defining the boundary explicitly lets you test for violations.
Completeness across a conversation. A single turn can look fine while the full conversation leaves the user without what they needed. A multi-turn rubric asks whether the chatbot moved the user toward their goal across the whole exchange, not just on the last reply.
Tone and clarity. Unhelpful phrasing, excessive hedging, or answers that are technically correct but hard to act on are worth catching. These are harder to specify precisely, but naming them makes them testable.
In practice, this rubric becomes the input to your evaluation criteria. PRISM by Block Convey lets you write a custom evaluator as a rubric an LLM judge applies to your traces: {input} is the user's last message, {output} is the agent's final answer, and {context} is what the trace's retrieval and tool steps returned. The rubric you define in this step maps directly onto those fields. PRISM also scores every trace automatically on customer satisfaction (0–100) and response quality (0–100, covering accuracy, helpfulness, and clarity), plus the detected intent and a flagged-for-review mark with a one-line reason when either score is low or the reply looks like a hallucination.
Step 2: Check boundary behavior before launch
Run a boundary check before launch to verify your chatbot answers what your documents cover, says it doesn't know what they don't cover, and stays inside its defined role.
This sounds straightforward, but it's where chatbots break most visibly. A chatbot that confidently answers questions outside its knowledge base, invents information it was never given, or strays into territory it shouldn't touch will erode user trust quickly.
The boundary check is a fixed set of questions you can run before launch, not just in production. Writing the tests costs 1 credit per 10 tests kept; each question your chatbot answers costs 1 credit. You get a verdict, each question either passes or fails, along with the specific answers that went wrong and instructions for fixing them.
Run this check every time you change your content, your prompt, or your model. A passing boundary check on the old configuration doesn't carry over to the new one.
Step 3: Run simulated conversations end-to-end
Run multi-turn simulated conversations to catch failures that only appear across multiple turns. Synthetic users hold full conversations with your chatbot; each is graded against your documents, and any broken rule becomes a labeled issue.
The approach matters because real users don't ask one question and stop. They follow up, clarify, change their minds, and provide context mid-conversation. A chatbot that handles the first message correctly can still lose the thread on the third exchange, and single-turn tests will never catch that.
PRISM writes realistic simulated users from your Knowledge Base, has each one talk to your application, asks them afterward how it went, and grades every conversation against your documents. Each broken rule becomes an Issue. After you make a change, you run the same users again, so the before and after results compare fairly against identical inputs.
This kind of end-to-end conversation testing belongs both before launch and after any significant change to your chatbot's prompt, content, or model.
Step 4: Send every exchange to production monitoring
Send a trace, a record of each exchange, to your monitoring system after each response. A trace carries the input messages, the reply, latency, and any other context your application can provide, so you can search conversations, group multi-turn exchanges into sessions, and watch for failure patterns emerging across users.
Pre-launch testing tells you the chatbot was working when you shipped it. Production monitoring tells you whether it's still working now.
To send a trace to PRISM, POST one record per exchange to https://api.prism.blockconvey.com/api/traces. The required fields are:
- project_id (string)
- model (string)
- input_messages (array of {role, content} objects)
- output_message (string, the chatbot's reply)
- latency_ms (integer; send 0 if you haven't measured it)
Traces that share a session_id are grouped into one conversation. PRISM shows the full multi-turn journey, so you can read a session as a conversation rather than a list of isolated exchanges.
Step 5: Automate scoring at scale
Automate scoring by running every trace through automatic LLM analysis and custom evaluators. Every trace PRISM receives is analyzed on arrival at no credit cost, up to your plan's daily ceiling, and you can apply custom rubrics to target specific traces.
The automatic scores are customer satisfaction (0–100), response quality (0–100, covering accuracy, helpfulness, and clarity), the detected intent, and a flagged-for-review mark with a one-line reason when a score is below 40, the reply looks like a hallucination, or the conversation contradicts itself.
This runs up to the plan's daily ceiling: 100 traces on Free and 200 on Builder. Past the ceiling, traces are still stored and the deterministic checks still run; the LLM scoring pauses until 00:00 UTC.
- Deterministic rules give the same verdict for the same input, involve no model, and run on 100% of sessions.
- LLM-as-judge rules have a model read the exchange and apply your rubric.
When you run an evaluator, you pick the traces to score, by agent, time window, automatic-score result, guardrail flag, or a cap, and pay 1 credit per trace scored. Traces the evaluator already scored are skipped unless you include them, and the count is shown before anything is charged.
Together, automatic scoring and custom evaluators mean you're not choosing between coverage and relevance: automatic scoring covers everything up to the daily ceiling, and evaluators apply your specific rubric to the traces that matter most.
How this looks in production
Here's what a minimal production setup looks like for a support chatbot.
After each response, your application sends one HTTP request:
Example
POST https://api.prism.blockconvey.com/api/traces X-PRISMtrace-Key: pt-sk-... Content-Type: application/json { "project_id": "proj_abc123", "model": "your-model-name", "session_id": "session_user_789", "input_messages": [ {"role": "user", "content": "How do I reset my password?"}, {"role": "assistant", "content": "You can reset your password from the login page."}, {"role": "user", "content": "I don't see that option anywhere."} ], "output_message": "On the login page, click 'Forgot password' below the sign-in button. If you still don't see it, try clearing your browser cache.", "latency_ms": 843 }
PRISM responds with the stored trace's id, cost_usd, and session_id, for example:
{"id": "trace_x7k2m...", "cost_usd": 0.002, "session_id": "session_user_789"}
The trace is immediately visible in the dashboard. Because this request includes a session_id, it joins the other traces from that user's session, so you can read the full conversation, not just this turn.
Within the automatic-scoring ceiling for your plan, PRISM analyzes the trace on arrival: a customer satisfaction score, a response quality score, the detected intent (here, password reset), and a flag if something looks wrong. No action needed on your side.
In parallel, any guardrail rules you've configured run against both the incoming message and the reply. PRISM supports ten rule types including PII/PHI detection, prompt injection, off-topic detection, and content moderation. Each trigger is recorded with the conversation context.
Over time, recurring problems, the chatbot consistently failing to find the 'Forgot password' link, say, are grouped into Issues, each with a diagnosis and a list of suspect files or prompt sections. The pattern surfaces without you having to read every conversation manually.
Common mistakes
1. Testing only single turns
A chatbot that handles opening questions well can still fail on follow-ups, clarifications, or context provided mid-conversation. If your test suite only checks individual responses, you won't see failures that depend on conversational history. Add multi-turn simulated conversations to your pre-launch checks.
2. Checking that the model responded, not whether it was right
HTTP 200 means the request completed. It says nothing about whether the answer was accurate, in scope, or useful. Build your quality checks around the content of the reply, accuracy against your documents, intent alignment, response quality, not around whether a response arrived.
3. Skipping the boundary check
Without an explicit boundary check, there's no systematic way to know whether your chatbot stays inside its defined role or answers questions your content doesn't cover. A chatbot that confidently answers out-of-scope questions is a liability. The boundary check, verifying that your chatbot answers what your documents answer, says it doesn't know what they don't cover, and stays in its job, should run before any user reaches the product.
4. Assuming every trace gets an LLM score
Automatic LLM scoring runs up to a daily ceiling: 100 traces on Free, 200 on Builder. Past the ceiling, traces are stored and deterministic checks still run, but the LLM scoring pauses until 00:00 UTC. If you're shipping to significant traffic, don't treat automatic scoring as unlimited coverage. Know your plan's ceiling and use custom evaluators to target the traces that matter most.
5. Treating a passing test run as permanent
A test that passed before a prompt change, content update, or model swap doesn't carry over to the new configuration. Re-run the same simulated conversations after each significant change so the results compare fairly against identical inputs. Catching a regression early is much cheaper than finding it in production.
What is the difference between an LLM and a chatbot?
An LLM (large language model) is the underlying model that generates text. A chatbot is the application built on top of it.
The LLM produces a response given a sequence of messages. The chatbot wraps that capability with everything else a deployed application needs: an interface, session management, a system prompt defining its role, retrieval from your documents, guardrails on what it will and won't say, and routing logic.
This distinction matters for evaluation. The LLM's raw generation quality is one input to whether the chatbot works well. But whether a user gets what they came for depends on the whole application, the prompt, the content you've given it, how you've defined its boundaries, and how well multi-turn context is maintained. Evaluating the LLM in isolation doesn't tell you whether the chatbot is working.
What are the main types of chatbots?
Three main types, each with different evaluation requirements:
Rule-based chatbots follow a decision tree or keyword matching. They route users to predefined answers based on what words appear in the input. Output is deterministic: the same input always produces the same output. Testing is straightforward because there's a fixed set of paths to check.
NLP-based chatbots use intent classification to route messages to predefined responses. They understand variations in phrasing better than pure keyword matching, but the responses themselves are still hand-written and selected, not generated. Evaluation focuses on whether intent classification is accurate and whether the right response is selected.
LLM-based chatbots generate a response on every turn from a language model. Output is not deterministic: the same input can produce different responses, and each response is shaped by the full conversation history. This is where evaluation gets genuinely hard. You can't enumerate all possible outputs, so you need criteria-based evaluation, rubrics that ask whether a response was accurate, in-scope, and useful, rather than exact-match testing.
For teams building LLM-based chatbots, the evaluation requirements are qualitatively different from the other two types: you need conversation-level testing, not just message-level testing, and you need checks that read the content of the reply, not just whether one arrived.
Related
- Synthetic Scenarios, simulated-user testing before and after launchSynthetic Scenarios, simulated-user testing before and after launch
- Evaluators, reusable evaluation criteria and the LLM judgeEvaluators, reusable evaluation criteria and the LLM judge
- AI observability, traces, sessions, and production monitoringAI observability, traces, sessions, and production monitoring
Run your first chatbot test
Connect your chatbot, run a boundary check, and see where it breaks, before your users do.
Free to start, 100 credits each month.