Tool menus and features change. This guide teaches tool-independent skills; check any product-specific detail against that tool's current documentation.
01 — Quick answer
How do you find where your AI instructions fail before real work does?
Instructions that work on easy examples often fail on awkward ones. Write six to ten test cases, including missing information, conflicting requests and things the AI should refuse. Run them, mark each result pass or fail, fix the instruction at the point of failure and rerun the whole list so one fix does not break another.
02 — Outcome
What will you have when you finish?
A saved list of test cases, a pass or fail record and a repaired instruction that holds up on awkward requests.
03 — Who it's for
Who is this for?
Good fit: Anyone who has written instructions for a repeated task, an assistant or an automation that other people will use or that touches customers.
Not the best fit: instructions you have not yet written. Draft them first.
04 — Time needed
How long does it take?
Estimates for this guide.
- Active work: about 30 minutes
- Waiting or processing: about 5 minutes
- Testing: about 15 minutes
- Total: about 50 minutes
05 — Before you begin
What do you need first?
Terms used in this guide
- Test case
- A request used to check how the instructions behave.
- Edge case
- An unusual request that tests the limits of a rule.
- Regression
- A fix that accidentally breaks something that used to work.
06 — Steps
How do you test?
Step 1: Write the cases that should be easy, hard and forbidden
Objective: cover the range.
Write two easy cases, two with missing or vague information, two where the request conflicts with a rule, and two the AI should decline or hand to a person. Add real examples from your own work where you can.
Why this matters: easy cases show that the basics work, and the awkward ones are where real use breaks things.
Step 2: Say what a pass looks like for each
Objective: decide the answer before you test.
For each case write the result you expect, such as asks for the missing date, or declines and explains why. Write it before running the test so you do not bend the standard to fit the answer.
Why this matters: a pass defined in advance makes the test honest.
Step 3: Run each case in a fresh chat
Objective: test the instructions alone.
Use a new chat for each case so earlier answers do not help. Record the full result and mark pass or fail.
Example prompt
Example of a test run
Written for this guide, not taken from any source. It shows the context to give the AI for this step and why; replace every [bracket] with your own details.
Follow these instructions exactly: [instructions]. Now handle this request: [test case]. If the request is missing information, conflicts with the instructions or falls outside what you are allowed to do, say so plainly and explain what you would need or why you cannot proceed.
Customize: the instructions and each test case in turn.
How to judge the result: the result matches the expected outcome you wrote.
Adapting to other tools: any assistant. Repeat in a new chat for each case.
Why this matters: a fresh chat shows what the instructions alone produce, rather than what the AI picked up along the way.
Step 4: Fix the instruction where it failed
Objective: repair precisely.
For each failure, find the line that should have handled it. Add or clarify one rule. Do not rewrite everything. If a case reveals a missing rule, add it and note why.
Why this matters: small, targeted fixes are easier to check than a rewrite.
Step 5: Rerun every case and save the list
Objective: catch regressions.
After fixing, run all the cases again, not only the failed ones. Save the list with the instructions. Add a new case whenever real use surprises you.
Why this matters: a fix can break something that used to pass, and a growing list protects you over time.
07 — Test it
How do you know it worked?
What to test: that the instructions are reliable.
How: give a colleague three new awkward requests you did not write.
Success looks like: the instructions handle at least two of them well.
If it fails: add them to your cases and fix the failures.
08 — Troubleshooting
What usually goes wrong?
| Problem | Possible cause | Fix | How to verify |
|---|---|---|---|
| Everything passes | Cases too easy | Add missing information and conflicts | Some cases fail |
| A fix breaks another case | Rewrote too much | Change one rule at a time and rerun all | All pass again |
| Results vary between runs | Rule leaves room to guess | Make the rule concrete | Same result each time |
| Cannot tell pass from fail | No expected result | Write expected results first | Each case is clear |
| Real problems not covered | List not updated | Add each surprise as a case | The list reflects real use |
09 — FAQ
Common questions
How many test cases do I need?
Six to ten is enough to start. Add more as you learn.
Do I need to test again after small changes?
Yes, rerun the list. It takes a few minutes.
Can the AI write the test cases?
It can suggest them. Add your own from real experience.
10 — What next
Where do you go from here?
Audit your instructions after a change, and turn corrections into rules.
Related guides
Sources
Based on my notes from reviewing public AI training material (free written guides and YouTube lessons by several creators), expanded with my own explanations, examples, steps and checks, and reorganized into an independent LCGIS guide. Example prompts were written for this guide. Tool names appear only as examples; check any product-specific detail against that tool's current documentation.
- Vaibhav Sisinty (YouTube): How To Build AI Agents With Claude: I Built 3 in 12 Minutes (Full Beginner Tutorial)
- Learn AI With Mariah (free guide): How To Audit Your AI Instructions After Every Model Upgrade (Claude Code + Codex)