Skip to main content

How search works

End user

Ask runs hybrid retrieval, with semantic and keyword search working together, so agents can find the right passage whether you phrase a question naturally or quote an exact term.

Prerequisites​

Hybrid retrieval, in plain English​

When an agent searches a knowledge base, the Knowledge Management Service (KMS) runs two searches at once:

  • Semantic search: your query and every chunk of text in the collection are turned into vector embeddings. KMS returns the chunks whose meaning is closest to your query, even if they do not share any words with it. Great for paraphrased questions ("how do I reset my access?" vs. document text "credential recovery procedure").
  • Keyword search: also called "lexical search". Great for exact matches such as product names, code identifiers, regulation numbers, and any term where the exact string matters.

Results from both are merged and re-ranked, then the top passages are passed to the agent as grounding context. The agent uses them to write its answer and adds citations back to the source documents.

Contextual summarization at ingestion​

When you upload a document, KMS does not just chop it into chunks; it also generates a short summary of the whole document. That summary is embedded alongside the chunk text, so every chunk from a document carries the same document-level summary: if a document produces 100 chunks, all 100 share that identical summary. This improves both semantic recall (the summary captures the document's intent) and keyword recall (the summary surfaces synonyms).

You do not configure this; it just happens during ingestion. It is one reason an Ask collection often retrieves better than a plain vector store with the same documents.

What you can tune​

The user-facing controls today are pragmatic, and much of the tuning is on the platform side.

  • Scope: attach an agent only to the collections it should see. A tighter scope is the single biggest lever you have. See Attach a knowledge base to an agent.

  • Collection hygiene: remove duplicate, outdated, or off-topic files. Search quality is dominated by what is not in the collection. See Organize & manage.

  • File quality: born-digital PDFs and clean DOCX files retrieve better than messy scans. Where you have a choice, upload the digital version.

  • Per-agent knowledge base tools: selectively enabling KMS tools per agent is in active development, which will let you decide how an agent searches and not just what it searches.

    Preview

    There is no user-facing tuning surface for top-k, reranker thresholds, or hybrid weighting; retrieval tuning is platform-side.

Multilingual & Arabic​

The embedding model used by KMS handles multilingual input, and Squad 1 is rolling out an improved multilingual Arabic OCR pipeline that feeds into the same search index. In practice that means you can:

  • Upload an Arabic PDF and ask a question in English (or vice versa).
  • Mix Arabic and English in the same collection.
  • Expect citations to point back to the right page even when the source is a scan.

Quality is still evolving, so flag bad retrievals to your Ask admin so they can route them back to Squad 1.

Recipe: get better answers without changing your prompt​

  1. Open the agent's knowledge configuration and check which collections it can see. Detach anything off-topic.

  2. Open each remaining collection and remove obviously stale or duplicate files.

  3. For the most important documents, confirm they uploaded cleanly by opening the file and skimming a few citations. If text is garbled, re-upload a better source.

  4. Re-run the question. Most "the agent is hallucinating" complaints are really retrieval problems solved at this step.

tip

If a query keeps surfacing the wrong document, try rewording it with the term you would expect to appear in the source. Hybrid search means good keywords genuinely help.

note

Search is invisible by design: the agent runs it for you and then writes an answer. To see what it retrieved, open a citation chip in the response and you will jump to the source passage. See Citations & sources.