Denys ShutkoFractional QA
← Blog
·4 min read

RAG for QA: making a test portfolio searchable, not just storable

AI-assisted QARAGTest automationQA platform engineering

Most QA teams don't have a search problem because they lack tools — TestRail, Jira, and Confluence all have search boxes. They have a search problem because keyword search doesn't understand meaning. A tester types "checkout fails with expired card" and gets zero hits, because the existing case is titled "payment declined — stale card token." Same bug, different words, no match. Multiply that across a few thousand test cases, a few years of Jira history, and a Slack channel nobody scrolls back through, and you get a portfolio that's fully documented and functionally unsearchable.

That's the problem retrieval-augmented generation (RAG) is actually good at. Not "chatbot that answers questions" — that's the demo. The real value for QA is a retrieval layer that understands semantic similarity, sitting underneath whatever workflow (human or AI-agent) needs to find related context fast.

Here's the pattern I've built and rebuilt a few times now, most recently over a portfolio of 900+ test cases where a keyword-only search had let a ~45% coverage gap go unnoticed for months.

GUARDED WRITE — NOTHING APPLIES WITHOUT THISTest casestitle + steps + tagsJira issuestitle + description + commentsSlack threadsmessage + surrounding contextEmbed & indexsentence-transformer → ChromaSemantic retrievalranked by meaning, not keywordsTester / reviewersees similar cases — skips the duplicateAI agentdrafts a suggested changeDry-runsimulate, change nothingPlan (diff)human-readable, hashedRe-check vs livedid anything change since?Human confirmsexplicit, per change✓ Appliednow, and only now
Retrieval feeds two paths: a human reviewer gets instant context, an AI agent's suggestion has to earn its way through the guarded-write chain before anything actually changes.

The three pieces

1. A retrieval layer, not a chat layer. Every test case, Jira issue, and relevant Slack thread gets embedded — turned into a vector that captures meaning, not just words — using a local sentence-transformer model. Those vectors go into a lightweight vector store (I like ChromaDB for this: self-hosted, no external API dependency, fast enough for a team-sized portfolio). Now "checkout fails with expired card" and "payment declined — stale card token" sit close together in vector space, regardless of the words used.

2. Grounding, applied everywhere an agent touches QA. Once retrieval works, it becomes the backbone for several workflows at once: a tester drafting a new case first sees the 5 most similar existing ones (kills duplicate creation); an AI agent designing test coverage for a new feature retrieves the actual acceptance criteria and prior incident history instead of hallucinating context; release triage pulls semantically related Jira issues instead of relying on someone remembering "didn't we see this in Q2?"

3. A guarded write layer — the part that actually matters. This is where most RAG-for-QA writeups stop short, and it's the part I'd argue is more important than the retrieval quality. Retrieval can surface a duplicate case, a stale test, a suggested update — but nothing gets applied automatically. Every suggested change goes through the same pattern: dry-run first, produce a diffable plan, re-check that plan against the live system right before applying it (in case something changed in between), and only then execute — with a human explicitly confirming. The AI can be wrong about what it retrieved; the workflow can't afford to be wrong about what it changed.

That guard isn't paranoia. The first time an agent suggests a bulk-edit to a test suite based on a slightly-too-loose semantic match, you'll be glad every write went through a confirm step instead of firing straight into TestRail.

What this actually looks like

Chunking matters more than model choice. A test case chunked as "title + steps + tags" retrieves differently than "title" alone — usually better, since steps carry the specific behavior being tested. Jira issues chunk well as "title + description + top comments," trimmed to avoid burying the signal in status-update noise. Slack is the hardest: thread context matters, but a whole thread is often too noisy to embed as one chunk — splitting by message with a sliding window of surrounding context tends to work better than either extreme.

Model choice is the least interesting decision here. A general-purpose sentence-transformer running locally is good enough for this — you're not competing on leaderboard benchmarks, you're beating "zero hits on a paraphrase." The bigger lever is making sure the right things get embedded in the first place, and that retrieval results get surfaced where people (and agents) actually work, not in a separate tool nobody opens.

When it's worth building

This is overkill for a portfolio of 50 test cases someone can hold in their head. It starts paying off once a team can't reliably answer "do we already test this?" without a person who's been there three years — and it becomes essential the moment an AI agent is anywhere near your QA workflow, because an ungrounded agent designing tests or triaging bugs will confidently invent context that sounds plausible and isn't there.

If that's where your team is — decent-sized portfolio, growing AI-agent involvement, no reliable way to answer "have we seen this before" — this is usually one of the first things I build in a QA audit engagement: not because it's flashy, but because everything downstream (coverage analysis, release risk, agent-assisted testing) gets more trustworthy once retrieval stops returning zero hits on a paraphrase.

Dealing with something similar on your team? Let's talk.