Build Your QA Prompt Library: Save and Reuse Prompts That Work
If you keep rewriting the same prompts, you are doing the same work twice. A QA prompt library is a simple collection of prompts that have already proved useful. In this final lesson of Level 2, you will build your own and learn how to keep it trustworthy.
📖 What You’ll Learn
- What a prompt library is and why it saves time
- What to record for each prompt
- How to use placeholders and version numbers
- How to test and share prompts safely
💡 What Is a QA Prompt Library?
Explain Like I’m 5: Prompt Library
Imagine: A family recipe book keeps the best meals. You do not have to invent dinner again every night.
What it really means: A prompt library is a saved set of prompts that have worked well.
In testing: Keep one tested prompt each for scenarios, bug reports and log analysis.
Your library can be a simple document, a spreadsheet or a Git repository. Start with whatever you will really use.
🔍 What to Save for Each Prompt
Explain Like I’m 5: Prompt Details
Imagine: A good recipe card shows the name, the ingredients, the steps and a note saying, “Do not overcook.”
What it really means: Save the prompt along with the facts that make it easy to reuse.
In testing: Record its purpose, inputs, version and known weak spots.
| Field | Why it helps | Example |
|---|---|---|
| Name | Makes it easy to find | Boundary scenarios from a rule |
| Purpose | Says when to use it | Finding limits in numeric rules |
| Prompt text | The reusable instructions | With placeholders |
| Inputs needed | What you must supply | Rules and field limits |
| Version | Shows how it changed | 1.2 |
| Tested with | Shows where it worked | Tool, model and date |
| Known limits | Warns the next user | Weak for date and time rules |
🧩 Use Placeholders
Explain Like I’m 5: Placeholders
Imagine: A birthday card says, “Dear ____.” You write a new name each time, but the card stays the same.
What it really means: A placeholder is a blank that you fill in each time.
In testing: [feature name] and [business rules] make one prompt reusable.
Use square brackets so that blanks are easy to see. Before sending a prompt, check that no blanks remain.
🛠️ A Simple Folder Structure
Organise prompts by testing activity. Then you can find them when you need them.
ai-qa-toolkit/
prompt-library/
01-requirements/
find-requirement-gaps.md
02-test-design/
scenarios-from-rules.md
few-shot-test-cases.md
03-test-data/
synthetic-users.md
04-bugs-and-logs/
bug-report-from-notes.md
05-review/
review-ai-test-cases.md
README.md
If you know Git, you can track every change to your prompts. Our Git and GitHub Tutorial can teach you how.
📌 A Reusable Prompt Card
Copy this template into a new file for each prompt.
Name: Boundary scenarios from a rule
Version: 1.0
Purpose: Create boundary scenarios for fields with numeric limits
Inputs needed: Field name, minimum, maximum, business rule
Tested with: [tool and model], [date]
Known limits: Not tested on date or time rules
PROMPT
You are a QA engineer. Create boundary scenarios for this field.
Field: [field name]
Minimum: [minimum]
Maximum: [maximum]
Rule: [business rule]
Return a table with ID, Value, Reason and Expected Result.
Test values just below, on and just above each limit.
Use only the rule above. List anything unclear as a question.
🔑 How to Test a Prompt Before Saving It
Treat a prompt like a small test asset. A prompt is ready for your library after it passes these checks:
- Run it on two or three different features. One good result may be luck.
- Run it more than once. Remember that AI answers can change.
- Use the review checks from How to Review AI-Generated Test Cases.
- Record the limits that you discover.
Models change
A prompt that works today may behave differently after a model update. Retest your most important prompts from time to time, and record the date.
💡 Sharing Prompts with Your Team
A shared library helps everyone avoid repeating work. Agree on a few simple rules:
- Follow one common prompt card format.
- Have a teammate review each new prompt.
- Give each prompt a named owner.
- Remove prompts that nobody uses.
Keep the library clean
Never save real customer data, credentials, tokens or confidential requirements in a prompt. Use placeholders, and follow your AI data privacy rules.
🔍 Five Prompts to Start With
You already have these from this course:
| Prompt | Use | From |
|---|---|---|
| Five-part scenario prompt | Test scenarios | Lesson 6 |
| Few-shot format prompt | Team-style test cases | Lesson 7 |
| Step 1 of the prompt chain | Extract the rules | Lesson 8 |
| Gherkin prompt | BDD scenarios | Lesson 9 |
| Strict reviewer prompt | Second-opinion review | Lesson 10 |
🧪 Try It Yourself
- Open the
ai-qa-toolkitfolder from Lesson 5. - Create the folder structure shown above.
- Add the five prompts from the table, each as a prompt card.
- Use the prompt below to tidy up one of your own prompts.
- Test the improved version on two features, and fill in “Tested with”.
📋 Ready-to-Copy Prompt
You are helping me improve a reusable QA prompt.
Here is my current prompt:
[paste your prompt, with no real data]
Please:
1. Replace any project-specific details with [placeholders].
2. Point out any missing role, context, task, constraints or format.
3. Add this rule if it is missing: "Use only the information provided.
List anything unclear as questions."
4. Return the improved prompt, then list what you changed and why.
Do not change the purpose of the prompt.
⚠️ Common Mistakes
- Saving every prompt, including ones that never worked
- Having no notes about when a prompt should be used
- Keeping real project data inside saved prompts
- Never retesting prompts after a model update
- Building a huge library that is too hard to search
🎯 Key Takeaways
- A QA prompt library saves time and makes results more consistent.
- Save each prompt with its purpose, inputs, version and limits.
- Test a prompt several times before you trust it.
- Keep your library free of real data, and review it regularly.
🎤 Interview Questions
1. What is a prompt library?
Model answer: A prompt library is a managed collection of tested, reusable prompts. For a QA team, it can cover requirement review, test design, test data, bug reports and log analysis. It reduces repeated work and makes results more consistent.
2. How would you maintain prompts for a QA team?
Model answer: I would store them in a shared place, ideally under version control. Each prompt would have an owner, a purpose, a version, test notes and known limits. New prompts would be peer reviewed, and unused ones would be removed.
3. How do you test a prompt?
Model answer: I run it on several features and more than once, then evaluate the output against clear review criteria. For important prompts, I keep a small set of known inputs so that I can compare results after a change or a model update.
4. What should never be stored in a shared prompt?
Model answer: Credentials, tokens, customer data and confidential requirements should never be stored there. I use placeholders instead, so that the prompt can be reused safely.
5. How would you measure whether a prompt is useful?
Model answer: I would track how much of the output is accepted after review, how much editing it needs and how much time it saves against a baseline. I would also check whether it finds useful scenarios, not only how quickly it produces text.
📝 Assignment
Build a library with at least five tested prompt cards. Have a colleague or friend use one card without your help, and note where they got stuck. Improve that card and increase its version number. This completes Level 2.
❓ FAQ
Should I use a ready-made prompt collection from the internet?
They can give you good ideas. Read them first, adapt them to your work and test them before you trust them.
Where should I keep a personal prompt library?
A simple folder or private Git repository works well. Just follow your company’s rules if a prompt relates to work.
🚀 Next Steps
Well done on finishing this lesson. Complete the assignment, then continue with Review User Stories with AI: Find Gaps in Acceptance Criteria.