LLM Test Strategy: How to Test a Chatbot or AI Feature

Testing a chatbot by chatting with it for ten minutes is a demo, and it is not a test. You need a plan that says what good looks like and how you will measure it. In this lesson you will build a practical LLM test strategy for a chatbot or any other AI feature.

📖 What You’ll Learn

  • How to define what a chatbot must and must not do
  • How to set risk levels for different answers
  • Which test types a chatbot needs
  • How to decide when it is ready to release

💡 Start with Purpose and Limits

Explain Like I’m 5: A Shop Helper

Imagine: A new shop helper is told, “Answer questions about shoes. Do not give medical advice.”

What it really means: Decide what the AI should do and what it must refuse.

In testing: A returns chatbot should not offer legal or medical advice.

Write these down before testing:

QuestionExample
What is it for?Answer returns and delivery questions
Who uses it?Shoppers, including new customers
What sources can it use?The approved help centre
What must it refuse?Medical, legal and off-topic requests
When should it hand over?Complaints or anything it cannot answer

🔍 LLM Test Strategy: Set Risk Levels

Explain Like I’m 5: Different Rules

Imagine: Spilling juice gets a wipe. Touching a hot stove gets a very firm no.

What it really means: Not all mistakes are equally serious.

In testing: A clumsy sentence is minor, but leaking data is critical.

RiskExample failureSuggested rule
CriticalReveals another customer’s dataZero tolerance
HighStates the wrong refund periodVery high pass rate, with human review
MediumGives an incomplete answerTracked with an agreed target
LowSlightly awkward toneMonitored

Your team must set the actual numbers.


🧩 Test Types a Chatbot Needs

Test typeExample
Normal functionalChat widget opens and sends a message
Knowledge accuracyAnswers match the policy
Out of scopeRefuses unrelated questions politely
Unknown answersSays it does not know instead of inventing
Multi-turnRemembers details from earlier in the chat
SafetyHandles abuse and harmful requests correctly
HandoverPasses the user to a person when needed
Non-functionalResponse time, cost and rate limits

🛠️ Testing Conversations

Explain Like I’m 5: Remembering the Game

Imagine: If you say, “My name is Asha,” and your friend forgets one minute later, the game feels broken.

What it really means: A conversation has memory, so testing one question is not enough.

In testing: Check that the bot uses details given earlier.

Example conversation test:

  1. User: “I bought running shoes last week.”
  2. User: “Can I return them?”
  3. Check: the answer talks about returning the shoes, without asking what was bought.

📌 Mix Three Kinds of Checking

Explain Like I’m 5: Three Helpers

Imagine: A ruler measures height. A friend says if your drawing looks good. A teacher makes the final call.

What it really means: Use rules, AI judges and people together.

In testing: Each one catches what the others miss.

MethodGood forWeakness
Rule-based checksRequired words, format, banned contentCannot judge meaning
AI judgeRelevance, tone, meaningCan be wrong or inconsistent
Human reviewHard cases and final judgmentSlow and costly

🔑 Release Gates

A clear gate avoids last-minute arguments. Here is an example. Your own numbers should come from your risk levels.

  • All critical safety cases pass.
  • High-risk knowledge cases meet the agreed pass rate.
  • Unknown-answer cases do not invent information.
  • Normal functional tests pass.
  • Human reviewers have checked a sample of answers.

Testing continues after release

Real users will ask things you never imagined. Plan to monitor conversations safely, and add real failures to your test set.


🌍 Real-Life Example: A Risky Gap

A delivery chatbot passes all its product questions. Then a user asks, “Where is my mother’s order?” The test plan never covered requests about another person’s account. A strategy that lists privacy risks would have included this case, and tested that the bot asks for proper verification.


🧪 Try It Yourself

  1. Pick a support bot idea, or use the Dummy E-commerce Website as your made-up store.
  2. Write its purpose, sources and limits.
  3. Run the prompt below.
  4. Assign your own risk levels.
  5. Write a release gate that a manager could understand.

📋 Ready-to-Copy Prompt

You are a senior QA lead creating a test strategy for an LLM chatbot.

Purpose: [purpose]
Users: [users]
Approved knowledge sources: [sources]
Must refuse: [topics]
Handover rules: [rules]

Create a test strategy with: Risks by level, Test Types, 3 example test
cases for each type, Checking Method (rule, AI judge or human), Suggested
Release Gates and Production Monitoring ideas.

Rules:
- Use only the details above.
- Do not invent target numbers. Write "[TEAM TO SET]" for each threshold.
- List missing information as questions.

⚠️ Common Mistakes

  • Testing only friendly, expected questions
  • Forgetting multi-turn conversations
  • Using one pass rate for all kinds of failures
  • Trusting an AI judge without human checks
  • Stopping testing at release

🎯 Key Takeaways

  • Define the purpose, sources and limits first.
  • Set stricter rules for higher-risk failures.
  • Combine rule-based checks, AI judges and people.
  • Keep testing after launch with real examples.

🎤 Interview Questions

1. How would you test a customer support chatbot?

Model answer: I would define its purpose, sources and limits, then assess risks. I would test accuracy, unknown answers, out-of-scope requests, conversations, safety, handover and normal application behaviour, with clear gates for release.

2. How do you decide acceptance thresholds for an AI feature?

Model answer: I base them on risk and agree them with stakeholders. Critical safety failures may have zero tolerance, while lower-risk quality issues can have target pass rates that are tracked over time.

3. What is multi-turn testing?

Model answer: It tests a full conversation rather than one message. I check whether the system retains context, handles corrections and stays consistent as the conversation continues.

4. How can you check AI answers at scale?

Model answer: I combine rule-based checks, AI judges and human review. Rules catch known problems, AI judges help with meaning, and people review risky or uncertain results and check the judge.

5. What should happen when a chatbot does not know the answer?

Model answer: It should say so clearly and offer a safe next step, such as a help article or a human agent. I test this with questions that are outside its approved knowledge.


📝 Assignment

Write a two-page test strategy for a made-up chatbot. Include at least four risk levels, eight test types and a release gate. Compare it with your test plan skills from Lesson 13.


❓ FAQ

How many test cases do I need to start?

Start with a small set covering your critical journeys and risks, then grow it using real failures.

Can one tester own all of this?

Usually, it works best as a team effort involving product, developers and domain experts.


🚀 Next Steps

Well done on finishing this lesson. Complete the assignment, then continue with Golden Dataset for LLM Evaluation: Build Your Test Set.