Query Mapping
Review AI-generated Q&A candidates from real customer conversations and improve your knowledge base retrieval over time.
Query mapping is how Stylo learns from real customer conversations to improve retrieval accuracy. When customers ask questions and agents send AI-grounded responses, Stylo identifies candidate query-to-article mappings and surfaces them for your review. Confirmed mappings are indexed directly into your knowledge base, making future responses more accurate for similar questions.
How it works
Stylo watches for a specific signal: a customer asked a question, the AI retrieved knowledge base articles and generated a draft, an agent accepted that draft (or it was auto-applied), and the ticket was subsequently resolved. When all four conditions are met, Stylo evaluates the interaction as a potential feedback candidate — a proposed mapping between the customer's question and the articles that were used to answer it.
Quality filtering
Not every resolved ticket produces a useful candidate. Stylo automatically filters out low-signal interactions before they reach the review queue:
- Heavy edits — If an agent rewrote more than 70% of the AI-generated draft, the grounding articles probably weren't useful for that response. These candidates are dropped.
- Failed grounding check — Stylo's grounding critic evaluates whether the AI response is actually supported by the retrieved articles. Candidates that fail this check are excluded.
- Long conversations — Tickets that took more than 5 replies to resolve suggest the draft wasn't the primary driver of the resolution. These are filtered out.
Candidates that pass filtering are prioritized so the highest-confidence items appear first in the queue. Auto-applied drafts (where no agent intervention was needed), low edit distances, and single-reply resolutions all rank higher.
Each knowledge base sync surfaces up to 50 candidates per knowledge base. This keeps the queue manageable — reviewers see the most promising candidates first, and additional candidates surface in subsequent syncs.
These candidates appear in the Query Mapping review queue, where a reviewer confirms, rejects, or skips each one.
Why human review?
Not every accepted draft actually answered the customer's question, and not every retrieved article was actually useful. A draft might have been heavily edited by the agent, a ticket might have taken five more exchanges to resolve, or the AI might have retrieved three articles but only one was relevant. Automated indexing would pollute the knowledge base with false positives. Human review ensures only genuinely useful query-article mappings make it into your retrieval index.
The review queue
Navigate to Knowledge > Query mapping in the sidebar. The page shows a split view with a candidate list on the left and a detail pane on the right.
Candidate list
The left panel shows all candidates matching your current filters. Each row displays:
- The customer's original question
- A color-coded badge indicating which knowledge base the candidate belongs to
- The ticket number
- How long ago the candidate was created
Use the Status filter to switch between Pending, Confirmed, Rejected, Skipped, Edited, and Expired candidates. Use the KB filter to narrow the list to a specific knowledge base.
Detail pane
Selecting a candidate loads its full detail on the right. You'll see:
- Knowledge base badge — color-coded to match the list
- Ticket reference — with a link to open the original ticket in Zendesk
- Resolution context — when the ticket was resolved and how many replies it took
- Retrieved articles — the articles the AI used when generating the draft. Click articles to select or deselect them for confirmation.
- Draft vs. sent comparison — a side-by-side view of what the AI generated versus what was actually sent to the customer, with an edit distance indicator showing how much the agent changed the draft
- Action buttons — Confirm, Reject, or Skip
Reviewing candidates
Confirm
Confirming a candidate indexes the customer's query and your selected articles into the knowledge base. Before confirming:
- Review the retrieved articles and select the ones that actually answered the question (click to toggle)
- Optionally edit the question text if the customer's original phrasing was unclear
- Click Confirm (or press C)
You must select at least one article. The confirmed mapping is indexed with a high quality score, meaning it will rank above synthetic Q&A pairs in future retrieval.
Reject
Rejecting a candidate records it as evidence of a knowledge gap. This is the right action when the retrieved articles didn't actually answer the question, or the mapping is misleading.
- Click Reject (or press R) to expand the reject form
- Optionally select a preset reason or type your own
- Click Confirm reject to submit
Preset reasons include: Wrong article, Article out of date, Missing article, Question too vague, and Multiple articles partially answer. Selecting a preset pre-fills the reason text, which you can edit further.
Skip
Skip a candidate if you're unsure or want to come back to it later. Skipped candidates move out of the pending queue but can be reopened at any time by switching to the Skipped filter and clicking Reopen.
Navigating the queue
After confirming, rejecting, or skipping, the cursor automatically advances to the next candidate so you can work through the queue efficiently.
Keyboard shortcuts
The review queue supports keyboard-driven navigation for high-volume review sessions.
| Key | Action |
|---|---|
| J / ↓ | Next candidate |
| K / ↑ | Previous candidate |
| C | Confirm (with selected articles) |
| R | Reject |
| S | Skip |
| E | Edit question |
| 1–9 | Toggle article by position |
| ? | Show keyboard shortcuts |
Press the ? key or click the keyboard icon in the page header to see the full shortcut reference.
Pending count badge
The sidebar nav shows a badge next to "Query mapping" with the number of pending candidates. This count updates as you review. When it reaches zero, the badge disappears.
What happens to confirmed candidates
When you confirm a candidate, the query and selected articles are indexed as a retrieval entry in the knowledge base with a quality score of 80. For reference:
- Synthetic Q&A pairs (generated during KB sync) have a quality score of 50
- Confirmed query mappings score 80
This means confirmed real-customer queries rank higher in retrieval than synthetic ones, which is the desired behavior — real questions from real conversations are the most valuable retrieval signals you have.
What happens to rejected candidates
Rejected candidates are recorded as retrieval_miss evidence in the knowledge gap pipeline. As rejection evidence accumulates for similar topics, it surfaces as a knowledge gap, signaling that your knowledge base may need a new or updated article in that area.
Tips
- Prioritize pending candidates regularly. The queue fills during every KB sync. Reviewing frequently keeps the queue manageable and ensures your retrieval index reflects recent customer behavior.
- Pay attention to the draft-vs-sent comparison. If an agent heavily edited the draft, the retrieved articles may not have been useful even though the ticket was resolved. Consider rejecting these.
- Use the KB filter for focused sessions. If you manage multiple knowledge bases, filter to one at a time to build context around that domain.
- Deselect irrelevant articles before confirming. If three articles were retrieved but only one actually answered the question, deselect the other two. Precise mappings produce better retrieval.
- Don't skip too much. Skipping is for genuine uncertainty. If you're skipping most candidates, the underlying signal quality may need investigation.
Related
Knowledge Sync and Documents
Understand how Stylo syncs knowledge content, what document and file states mean, and how to keep a knowledge base healthy.
Workflow Builder Overview
Learn how Stylo's automation builder is organized, how to start a workflow, and how blocks, containers, variables, and approvals fit together.