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.

FieldWhy it helpsExample
NameMakes it easy to findBoundary scenarios from a rule
PurposeSays when to use itFinding limits in numeric rules
Prompt textThe reusable instructionsWith placeholders
Inputs neededWhat you must supplyRules and field limits
VersionShows how it changed1.2
Tested withShows where it workedTool, model and date
Known limitsWarns the next userWeak 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:

  1. Run it on two or three different features. One good result may be luck.
  2. Run it more than once. Remember that AI answers can change.
  3. Use the review checks from How to Review AI-Generated Test Cases.
  4. 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:

PromptUseFrom
Five-part scenario promptTest scenariosLesson 6
Few-shot format promptTeam-style test casesLesson 7
Step 1 of the prompt chainExtract the rulesLesson 8
Gherkin promptBDD scenariosLesson 9
Strict reviewer promptSecond-opinion reviewLesson 10

🧪 Try It Yourself

  1. Open the ai-qa-toolkit folder from Lesson 5.
  2. Create the folder structure shown above.
  3. Add the five prompts from the table, each as a prompt card.
  4. Use the prompt below to tidy up one of your own prompts.
  5. 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.