How retrieval works
When a visitor asks your chatbot a question, Promptly doesn't send your whole knowledge base to the AI. Instead it retrieves the handful of most relevant passages and answers from those. Understanding this helps you write content the bot can actually find and use.
Embeddings: search by meaning
Every chunk of your knowledge base is converted into an embedding — a numeric vector that captures its meaning — using the multilingual bge-m3 model. The visitor's question is embedded the same way, and Promptly finds the chunks whose vectors are closest.
Because this matches meaning rather than exact words, a question like "how long until my order shows up?" can match a passage titled "Shipping times" even though they share no keywords. The model is multilingual, so a question asked in one language can match content written in another.
🖼️ [Image] — A diagram: a question and several passages plotted as points, with the nearest ones highlighted as matches.
Hybrid search
Pure meaning-based search can miss exact terms — product codes, names, specific numbers. So Promptly runs hybrid search, combining two methods:
- Keyword search (BM25) — classic term matching, great for exact words and identifiers.
- Vector search — meaning-based matching via the embeddings above.
The two ranked lists are merged with Reciprocal Rank Fusion (RRF), which rewards passages that score well in either method. The result is a single candidate list that catches both "I typed the exact part number" and "I described the problem in my own words." On higher plans, a reranker can then reorder the top candidates for extra precision.
Enrichment improves these matches: the summaries and hypothetical questions generated during enrichment are embedded alongside your content, giving the search more ways to connect a visitor's phrasing to the right item.
The bot answers only from what it retrieves
This is the key principle: the chatbot composes its answer from the retrieved passages, not from general world knowledge. If nothing relevant is found, it should say it doesn't know rather than inventing an answer — Promptly applies grounding and output checks to keep responses tied to your content.
The practical takeaways:
- If it's not in the knowledge base, the bot can't answer it. Add the content (see Adding knowledge).
- Phrasing matters less than you'd think thanks to meaning-based search — but exact identifiers still benefit from appearing verbatim.
- Gaps are visible. Questions that retrieve nothing are logged as Content Gaps in Analytics.
🎬 [Video] — Asking the widget a question and seeing which knowledge items the answer was grounded in.
Where retrieval fits
Retrieval is one step in how the bot decides what to do. Intent routing decides whether a question even needs a knowledge lookup, and multi-step reasoning can chain a retrieval with other actions before answering.