Knowledge bases

A knowledge base (KB) is a collection of your team’s documents that the AI can search and cite when answering questions. When you ground a chat message on a KB, ManyLayers searches your documents and includes the most relevant passages in the model’s context — so answers are based on your actual content, not just the model’s training data. Documents are automatically chunked, embedded, and indexed when you upload them. You don’t need to configure anything to get started.

Creating a knowledge base

1

Open Knowledge Bases

In the sidebar, navigate to Knowledge Bases and click New Knowledge Base.
2

Name your KB

Give it a name that describes the content — for example, “Product Docs” or “Support Articles”.
3

Upload documents

Click Add Documents to upload files. Supported formats include PDF, Word, plain text, Markdown, and HTML. Each file is processed in the background — you’ll see a status indicator as it indexes.
4

Use it in chat

In any conversation, click the Knowledge icon in the chat toolbar and select your KB. The model will now search it before answering.

Adding content

Beyond file uploads, you can add content from the web:
  • Web pages — paste any URL to ingest the page content directly into a KB
  • YouTube videos — paste a YouTube URL and ManyLayers automatically fetches and indexes the video transcript
You can also connect external document sources like Confluence, Google Drive, or Slack using Connectors to keep your KB up to date automatically.

Document sets

Document sets are named collections of knowledge bases scoped to a team. Use them to group related KBs together and control access at the set level. For example, you might create a “Customer-Facing Docs” set containing your product docs KB and your FAQ KB, then share the set with a specific team. Studio Editors and Admins manage document sets from Settings → Document Sets.

How retrieval works

When you send a message grounded on a KB, ManyLayers runs a pipeline to find the most relevant content:
1

Standard answers check

Admin-curated QA pairs are checked first. If all keywords match your query, the curated answer is used and vector search may be skipped — ensuring high-priority answers always surface.
2

Vector search

Your query is embedded and matched against document chunks. When hybrid search is enabled, keyword (BM25) scores are fused with vector scores for better coverage of both semantic and exact-term matches.
3

Rerank (optional)

If a rerank model is configured, retrieved chunks are re-scored by a cross-encoder model for more precise ranking.
4

Relevance filter (optional)

Each retrieved chunk can be classified as relevant or not by a lightweight LLM call. Irrelevant chunks are filtered out before being passed to the model.
5

Feedback boost

Document feedback from your team (thumbs up/down on cited sources) applies score boosts or penalties over time, improving retrieval quality organically.
6

Context assembly

The top-ranked chunks are included in the model’s context. Citations appear in the response so you can see exactly which documents were used.

Document feedback

When the model cites a document in its response, you’ll see a source reference below the answer. Click the thumbs up or thumbs down icon on any cited document to help improve future retrieval — positive votes boost that document’s ranking, negative votes reduce it.

Standard answers

Studio Editors and Admins can create curated QA pairs that short-circuit retrieval for common questions. If a user’s query contains all the configured keywords, the curated answer is returned directly. Manage standard answers from Settings → Standard Answers.

Admin configuration

Your admin can tune retrieval quality with these settings in gateway.yaml:
rag:
  hybrid_search: true          # combine vector + keyword (BM25) scores
  rerank_model: "rerank-v1"    # optional cross-encoder rerank
  relevance_filter_enabled: true  # filter irrelevant chunks with an LLM call
  embedding_model: "text-embedding-3-small"
Admins can change a KB’s embedding model and re-index all documents in the background without downtime. Progress is visible in Admin → Indexing.