Docs
Knowledge Base

AI Retrieval

How Ticket0 retrieves knowledge base articles when drafting replies.

When AI drafting is enabled, Ticket0 performs a semantic search over your knowledge base before generating a reply. Understanding this process helps you write better articles.

How retrieval works

  1. Embedding — When you publish an article, Ticket0 generates a vector embedding of its content using an embedding model (default: text-embedding-3-small via OpenAI)
  2. Query embedding — When a ticket arrives, Ticket0 embeds the ticket's subject and body using the same model
  3. Semantic search — The ticket embedding is compared against all article embeddings using cosine similarity
  4. Top-K retrieval — The top 5 most similar articles are retrieved
  5. Grounded generation — These articles are included in the AI prompt as context

Improving retrieval quality

Write articles that match how customers phrase questions

Customers write "Where is my order?" — your article title should include that phrasing, not just "Order tracking policy".

Keep articles focused

A 500-word article on one topic retrieves better than a 3,000-word article covering ten topics. When retrieval pulls the long article, most of it is irrelevant context that reduces answer quality.

Use synonyms and variations

If customers might ask "cancel subscription", "cancel plan", or "cancel account", include all three phrases in your article.

Review low-confidence tickets

When the AI marks a reply as low-confidence, it often means retrieval didn't find a good match. Review low-confidence tickets to see which topics your knowledge base doesn't cover well.

Retrieval defaults

The retrieval pipeline uses the following defaults:

SettingValueDescription
Top-K5Number of articles retrieved per query
Embedding modeltext-embedding-3-smallModel used for embeddings

Results are ranked by cosine similarity. The top 5 most similar articles are included as context regardless of absolute similarity score.

On this page