ClouisleClouisle

Knowledge Base

Understand how documents become retrievable content and what chunking and retrieval settings change

A knowledge base turns team documents into pieces that Agents and workflows can retrieve. It answers two questions: how content gets in, and how the most relevant pieces are found when answering. This page covers the process and the visible effects of each setting; for exact fields, ranges, and defaults see the Knowledge base settings reference, and for step-by-step operations see Import documents.

From documents to retrievable content

Upload → parse → chunk → embed → retrieve (semantic + keyword) → rerank → hand to the model
  1. Parse: PDF, DOCX, PPTX, XLSX, HTML, CSV, TXT, Markdown, and JSON are supported. Images embedded in a document are extracted into separate files and replaced with links, tables become structured content, and unsafe markup is stripped so content does not balloon or carry unsafe elements.
  2. Chunk: text is split along structure, keeping headings, tables, and code blocks intact where possible; small tables stay whole, while large tables split row by row with the header repeated in every piece so it still reads on its own. Each chunk records its section, making it easy to trace back to the source.
  3. Embed: each chunk is turned into a semantic representation by the knowledge base's embedding model, which is what lets retrieval match by meaning. The embedding model is chosen at creation and cannot be changed; the vector dimension is fixed while processing the first documents, and every later document and query must match it or you get a dimension-mismatch error — reprocess, or create a new knowledge base.
  4. Retrieve: a query runs down two paths at once — semantic (a different wording still matches) and keyword (the original terms must match). Hybrid mode merges both result lists into one ranking.
  5. Rerank: once a rerank model is bound, the top candidates are scored again by a more precise model, fixing cases that are relevant but ranked too low.
  6. Assemble: what finally reaches the model is bounded by a total length budget and a per-document chunk cap, so one long document cannot crowd out other relevant pieces.

Processing is asynchronous: an uploaded document must be parsed and embedded before it can be retrieved, so the list shows pending, processing, completed, or error. When a batch import finishes, the person who started it gets a completion notification — you can go do something else in the meantime.

What chunking settings change

  • Chunk size: defaults to 1000 characters. Larger chunks keep more context but mix in irrelevant text and eat the context budget faster; smaller chunks hit more precisely but may lack enough meaning to answer from.
  • Chunk overlap: defaults to 100 characters. Neighboring chunks share some context so a key sentence is not cut at the boundary; too much overlap means duplicated storage and wasted retrieval budget.
  • Measured in characters, not tokens: the token count in the UI is only an estimate, and Chinese and English differ widely in ratio — leave headroom when tuning by tokens.
  • Custom separator: once set, text is hard-split at your boundary; to split on blank lines, enter \n\n, since escape sequences are turned into real newlines.
  • Preview before processing: after changing a strategy, check the split result first and then process. Already-processed documents only change after rechunking, and manually edited chunks are preserved.

What retrieval settings change

  • Search mode: queries that must match exact terms — model numbers, error codes, product names, people — are safer with full text; reworded, cross-language, or vague queries are safer with semantic search; use hybrid when unsure.
  • Number of results: defaults to 5. More results improve recall but add noise and context length; fewer results are faster and more focused but may miss key pieces.
  • Similarity threshold: no filtering by default. Raising it keeps only closer matches, but too high misses results outright.
  • Rerank: on by default once a rerank model is bound. A larger candidate pool is more likely to rescue relevant content ranked low, at higher latency and cost; the score threshold filters low-scoring results after reranking.
  • Document scope: search only within selected documents, useful for confirming what one source actually says.
  • With several knowledge bases, each recalls on its own first, then all candidates are merged into one ranking with a single rerank — not concatenated base by base.

For exact defaults and ranges see the Knowledge base settings reference.

Hybrid retrieval and A/B comparison

  • Hybrid retrieval covers the blind spots of a single path: keyword search only knows exact terms, semantic search only knows similar meaning. Recalling from both and merging keeps both "the right answer under a different wording" and "the ID that must match exactly". If one path is unavailable, retrieval degrades to the other and tells you why.
  • The Retrieval Lab runs a single configuration, or A/B two configurations on the same query, showing each result's rank and score at the semantic, keyword, merge, and rerank stages. When one is clearly better, apply the preset to the production settings.
  • When comparing chunking strategies, confirm the split in the preview first, then rechunk processed documents. See Knowledge base optimization for the trade-offs and Retrieval and quality tuning for parameters and hybrid details.

Team visibility and cross-team sharing

  • A knowledge base belongs to a team: team members access it by role, and a private knowledge base is visible only to its creator.
  • Cross-team sharing is read-only: the receiving team can list, view, and search it but cannot upload documents, change settings, or delete it. Write operations still require membership in the owning team.
  • A private knowledge base cannot be shared, nor shared with its own team; duplicate shares are rejected.

Related content: Import documents, Chunking, Retrieval and quality tuning, Knowledge base settings reference.

How is this guide?

On this page