1. Overview
Support requests used to arrive by chat, email and in person, and many fell through the cracks. ask-it puts them all in one queue, so every request gets an owner and a reply.
2. Architecture
Figure 1: ask-it components. Staff and agents use the apps; an AI assistant works tickets through the MCP endpoint, with the same permissions as the agent who signed in.
- Backend: Go service that manages threads, queues and the knowledge base, with real-time updates over server-sent events and Redis pub/sub.
- AI: retrieval over the knowledge base, a drafted fix with a confidence check, and background jobs that summarise resolved tickets back into the knowledge base. All model calls go through a LiteLLM gateway.
- Storage: sharded MongoDB on a 3-node replica set, with a full-text index and a vector index on knowledge-base entries.
- Web: React dashboard for support agents.
- Mobile: Expo app for staff to raise and follow requests.
Figure 2: The ask-it mobile app, showing a group’s threads, a single thread and the user’s created threads. Images from the Play Store listing.
3. AI Ticket Flow
Every resolved ticket becomes a knowledge-base entry, and every new ticket is answered from those entries first. The knowledge base is the retrieval source for the AI, so each fix makes the next answer better.
Figure 3: The ticket flow. Resolved tickets are written back to the knowledge base, and the next ticket retrieves from it.
3.1. Opening and Retrieval
When a user describes an issue, the LLM suggests a short title (3 to 8 words, in the user’s language), which the user reviews before submitting. The ticket text is then searched against the knowledge base with hybrid search: MongoDB’s full-text index finds exact terms such as error codes, application names and NIKs, and the vector index finds the same problem described in different words. The two lists are merged with Reciprocal Rank Fusion, and a reranker keeps the top 5 entries.
3.2. Drafting and the Confidence Gate
The LLM drafts a fix from those 5 entries and must cite the entry behind each step. The draft then passes a confidence gate, which looks at the reranker score of the best entry and a check that every step is backed by a cited entry:
- Sure: the AI replies to the user with the fix. The ticket closes only when the user confirms it works.
- Unsure: the ticket goes to the agent queue with the draft and the retrieved entries attached, so the agent starts from the draft instead of a blank reply.
The threshold is set on the gold set so that tickets the AI closes are right at least 95% of the time. Missing a few easy tickets is cheaper than giving a wrong fix.
3.3. Writing Back to the Knowledge Base
When a ticket is resolved, by the AI or by an agent, a background job reads the whole thread and writes a summary with three fields: a title, the problem, and the resolution as steps. The resolution must have more than 25 words, so a one-line “fixed” never reaches the knowledge base.
Before saving, the job checks for a near-duplicate entry. If one exists, the old entry is updated instead, and its previous text is kept in the edit history with who or what changed it. The new or updated entry is then embedded and indexed, and the next ticket can retrieve it within seconds.
Agents can run the same steps from an AI assistant such as Claude Code, through the MCP server built into the backend:
get_thread replies, the original message, and the chat around it
search_kb existing fixes for the same problem
update_thread_status status = resolved, resolution = the summary
-> a new or updated knowledge-base entry
update_kb tidy older entries; the old text is kept in history
The MCP server signs in with OAuth in the browser, and the assistant acts as the agent who signed in, with the same role and permissions.
4. Evaluation
The evaluation works the same way as in ai-ebook: a test harness on a gold set decides whether a change ships, and Langfuse shows why when it does not.
The gold set is built from past tickets. Each one keeps the user’s original message, the knowledge-base entries that fixed it, and the agent’s final resolution as the reference answer. It includes tickets that should not be auto-closed, such as access requests and hardware faults, where the right outcome is “send to an agent”.
| Step | Metric | What it tells us |
|---|---|---|
| Retrieval | Recall@5, MRR | Is the entry that fixed it among the top 5, and how close to the top? |
| Draft | Faithfulness (Ragas) | Is every step backed by a cited entry? |
| Draft | LLM judge, 1 to 5 | Would this fix the ticket? Anything under 4 fails. |
| Gate | Auto-close precision | Of the tickets the AI closed, how many were right? |
| Gate | Escalation recall | Of the tickets that needed an agent, how many reached one? |
| Write-back | Summary judge, 1 to 5 | Does the entry state the problem and the fix clearly enough to reuse? |
| Live | Reopen rate (7 days) | Did the fix hold after the ticket closed? |
| System | p95 latency, cost per ticket | Is it still fast and cheap enough? |
Every change runs the harness, and it ships only if no metric drops below its threshold. Auto-close precision has the strictest threshold, 95%. Each run is logged as a Langfuse dataset run in a separate project from production traces, so test data never mixes with real tickets. When a run fails, the trace of each failed ticket shows which step broke.
Production feeds the gold set. Every reopened ticket, and every AI draft an agent rewrote before sending, becomes a new gold ticket.
4.1. From Search to an AI Loop
- v1: full-text search only. Agents searched the knowledge base by hand and wrote every resolution themselves.
- v2: hybrid search and an AI-drafted fix, shown to the agent but never sent on its own.
- v3: v2 plus the confidence gate, so the AI closes tickets it is sure about, and AI summaries written back to the knowledge base.
Figure 4: Gold-set scores for each version. The full set of metrics is in the table below.
| Metric | v1 | v2 | v3 |
|---|---|---|---|
| Recall@5 | 58% | 86% | 91% |
| MRR | 0.44 | 0.72 | 0.79 |
| Faithfulness | - | 0.88 | 0.94 |
| Judge pass, fix (4/5 or more) | - | 71% | 84% |
| Summary judge pass | 62% | 62% | 90% |
| Auto-close precision | - | - | 96% |
| Tickets resolved by AI | 0% | 0% | 38% |
| Reopen rate (7 days) | 9% | 7% | 5% |
| Median time to resolution | 3.1 h | 1.6 h | 0.6 h |
| p95 latency, draft | - | 4.2 s | 4.8 s |
Hybrid search gave the biggest jump in retrieval: many tickets mention an error code or an application name that vector search alone ranked too low. The bigger change in v3 came from the knowledge base itself. Agent-written resolutions were often short and passed the summary judge only 62% of the time. AI summaries, written from the whole thread, passed 90%, and better entries made retrieval and drafts better for every ticket after.
5. Results
Before ask-it, helping colleagues was invisible work. Its metrics made developer support measurable, and it now counts for 20% of developer KPIs.
Figure 5: The agent dashboard, showing median response and resolution times, escalation rate and the waiting queue. Thread titles and agent names are blurred.

