RMT Engineering Logo
Knowledge base and grounding

Knowledge Base & RAG

Your agents answer from your documents, and every answer arrives with the paragraph it came from attached. The ones that cannot be traced back never reach the customer. That is the whole idea.

  • Citations on every answer
  • Four-stage hybrid retrieval
  • 30+ knowledge connectors
We reply within one business day. No newsletter.
30+ Knowledge connectors
4-stage Hybrid retrieval pipeline
20+ Languages searched
Citations On every answer given

Answers you can trace back to the paragraph they came from

This is the retrieval layer between your agents and your content. Every answer leaves a trace: the chunks retrieved, the rerank score, the citations attached, any claim that could not be supported. Six weeks later, when someone in compliance asks where a particular answer came from, there is a row to point at. Not a shrug. And because knowledge attaches to one agent at a time, the billing agent never reaches the internal runbook to begin with.

It answers from your content, or it says it doesn't know

Hybrid retrieval runs across your documents, your website and the systems holding the rest. Citations on every answer. A groundedness check before the agent opens its mouth. The failure mode people actually lose sleep over is a confident wrong answer delivered in exactly the same voice as a right one, at the same speed, with the same citation-shaped certainty around it, and that is precisely the failure this layer exists to design out.

How it fits together

The path a conversation takes through Knowledge Base & RAG

The OptiML retrieval pipeline: question rewriting, hybrid retrieval, fusion, reranking, drafting and the groundedness gate Customer question Question rewriting anaphora · HyDE · multi-hop Dense vector search BM25 lexical search Reciprocal rank fusion Cross-encoder rerank Answer drafted Groundedness gate grader · citation auditor Passed — answered, with citations Failed — says what it cannot support, or hands over Both outcomes are traced: what was retrieved, what was cited, and what was refused.

Four retrieval stages narrow the candidates; the gate decides whether the draft is allowed out. Nothing reaches the customer that has not been checked against what was actually retrieved.

By the numbers

Few Facts - at a glance

  • 30+

    knowledge connectors, from Confluence and SharePoint to Salesforce

  • 4-stage

    hybrid retrieval: dense vectors, BM25, rank fusion and a cross-encoder rerank

  • 20+

    languages, with language-tagged articles and locale-aware search

The process

How It Works

The four stages, end to end

Every answer takes the same route, whether it is going out on a live phone call or into a WhatsApp reply an hour later. The question gets rewritten into something retrievable. It is searched four ways, drafted from whatever came back, then checked against those same passages. The last stage is the one that matters: it decides whether the customer hears an answer or hears the truth about what is missing. Both outcomes get logged the same way.

  1. Rewrite the question

    "What about the other one?" means nothing to a search index. It gets resolved against the conversation history into a standalone question before anything is searched, and a question carrying three separate asks is split into sub-queries first. Nobody sees this step.

  2. Retrieve four ways

    Dense vector search and BM25 lexical search run over the sources scoped to that one agent. Reciprocal rank fusion merges the two lists. Then a cross-encoder reranks what survives against the question that was actually asked, rather than the question the embeddings thought they saw.

  3. Draft with citations

    The surviving passages go to the model, which drafts an answer and pins a citation to each claim it makes. Nothing has reached the customer yet.

  4. Check before it speaks

    A hallucination grader and a citation auditor read the draft back against what was retrieved. Pass, and the customer gets the answer with its sources. Fail, and the agent says what it cannot support, then offers a handover. Either way, the trace is written.

Features

Every capability you need in one module

1. Hybrid retrieval, not just vectors

A vector search alone will find something that reads like the question and miss the policy number that answers it. Four stages exist because each one catches what the previous one drops, and because the cost of retrieving the wrong paragraph is an answer that sounds right.

Dense vector search finds content that means roughly the same thing. BM25 catches the exact string: the product code, the policy number, the part reference an embedding smooths away into something adjacent. Reciprocal rank fusion merges both result sets and a cross-encoder reranks the merged list against the actual question. Four stages. One retriever gets the wrong paragraph often enough to matter.

  • Dense vectors for meaning
  • BM25 for the exact string: model codes, policy numbers, part references
  • Reciprocal rank fusion to merge the two lists
  • Cross-encoder rerank, scored against the question as asked

See the Agent Desk copilot that surfaces these answers

Illustrative interface. The query, documents and scores are sample data. The screen compares the two retrieval halves on one query about a policy number: dense vector search returns a topically related article but misses the policy itself, BM25 matches the exact policy code, and after fusion and reranking the policy schedule ranks first.

2. Questions get rewritten before they get answered

"What about the other one?" is resolved against conversation history into a standalone question before retrieval runs. Complex questions are decomposed into sub-queries and retrieved across several hops, with the results deduplicated, merged, then checked for contradiction and freshness. That last check earns its keep. An article from March that contradicts the one published last week will otherwise answer first, and nobody notices until a customer quotes it back at an agent.

Anaphora resolution against conversation history HyDE Multi-hop decomposition for questions with more than one ask Contradiction and freshness checks on merged results

See how voice agents use these answers live

3. The groundedness gate

An agent that guesses is worse than no agent, because the guess is delivered in the same confident voice as the truth. The gate is the difference between a system you can put in front of a regulated customer and one you cannot.

Before the agent speaks or sends, the drafted answer is checked back against what was actually retrieved. A hallucination grader looks for claims with nothing behind them. A citation auditor checks that each claim carries its source. Both run every time. An answer that cannot be grounded is not given. The agent says so, offers whatever part it can support, then hands the customer to a person who can open the same passages it read.

  • Checked against what was retrieved, never against the model's memory
  • Grader and auditor both run before delivery, not in a report the next morning
  • A failed answer becomes a handover

See the guardrails around the answer

Illustrative interface. The drafted answer and scores are sample data. The screen shows a drafted answer failing the groundedness gate at 0.42: the hallucination grader marks a claim unsupported and the citation auditor finds it uncited, so the answer is never spoken or sent. Underneath is what the agent said instead — the part it could support, and an offer to hand over to a human.

4. Ingest from anywhere

Upload PDF, DOCX, CSV and Markdown. Crawl a website, including the JavaScript-rendered pages a plain fetch returns empty. OCR the scanned documents nobody ever got round to retyping. Or connect the source directly: Confluence, SharePoint, GitHub, Slack, Notion, Salesforce and 25 more. Nothing stops you using all three routes at once. Content is then chunked semantically rather than at a fixed character count, embedded, indexed, then swept for staleness on a schedule.

  • PDF, DOCX, CSV and Markdown, with OCR for anything scanned
  • Website crawl that handles JavaScript-rendered pages
  • Direct connectors to Confluence, SharePoint, GitHub, Slack, Notion, Salesforce and 25 more sources
  • Semantic chunking, so a clause is not cut in half by a character limit
Upload

PDF, DOCX, CSV and Markdown go straight in. Scanned documents are put through OCR first, so a photographed policy is as searchable as a typed one. Everything is chunked semantically rather than by character count, then embedded and indexed.

Crawl

Point the crawler at your website and it follows the pages you allow, including the JavaScript-rendered ones a plain fetch would return empty. Re-crawls sweep for staleness. A page you changed in March does not keep answering with January's terms.

Connect

Connect the source directly and the knowledge base follows the original rather than a copy of it. Confluence, SharePoint, GitHub, Slack, Notion, Salesforce and 25 more.

Talk to our integrations team about your sources

5. Scoped per agent

The most expensive knowledge-base incident is not a wrong answer. It is a right answer given to the wrong person: the internal runbook quoted to a customer, the HR handbook quoted by the billing agent.

Knowledge attaches to agents one at a time. Your billing agent doesn't answer from the HR handbook. Your public agent doesn't quote the internal runbook. There is no organisation-wide fallback quietly widening the scope when a search comes back thin, because that fallback is exactly how a runbook ends up read aloud to a customer.

  • Sources attach to an agent, one by one
  • No organisation-wide fallback scope
  • Internal and public agents never share a shelf

Scope, per agent

Billing agent: billing terms, refund policy, plan change policy. Claims agent: claims handbook, disputed claims policy. Internal service-desk agent: the runbook and the HR handbook, and neither of the customer-facing agents can reach them.

Set agent scope in the Agent & Flow Builder

6. It finds its own gaps

Questions the knowledge base couldn't answer are collected and clustered, then handed to a curator along with the conversations that hit them. Twenty near-identical questions arrive as one item, not twenty rows to work through. Where agents resolved the same question by hand, those resolutions are mined into a draft answer. You review it and accept it. Nothing publishes on its own.

Unanswered questions clustered, not listed one by one The conversations that hit them, attached Draft answers mined from resolutions that worked Nothing publishes without review

Track knowledge gaps in Analytics & Reporting

Use Cases

Where Knowledge Base & RAG delivers value

Hybrid retrieval

The model code the embeddings could not see

Aster Home Appliances (illustrative)

Scenario

A customer wants to know whether the compressor on model AF-620 is covered in year two. Vector search returns the general warranty overview. Topically right, factually useless. BM25 matches the model code sitting in the warranty annexe, rank fusion merges the two lists, then the cross-encoder rerank pushes the annexe clause to the top of what the model sees.

Outcome

The agent quotes the clause that names the model, with the section cited beside it. No ninety-second recital of an overview that leaves the customer working out whether any of it applies to them.

Groundedness gate

The agent refuses rather than guesses

A building society (illustrative)

Scenario

A customer asks whether the early-repayment fee is waived if they settle inside the first year. The retrieved documents describe the fee at length and say nothing at all about a waiver. The draft asserts one anyway. The hallucination grader marks the claim unsupported, the citation auditor finds it uncited, and the answer is stopped before it is spoken.

Outcome

The customer is told the fee exists and that no waiver can be confirmed from their own documents, then passed to a human who opens the same two passages the agent read. Nobody has to reverse-engineer what went wrong.

Curation queue

The gaps come to the curator

Kestrel Mobile (illustrative)

Scenario

Customers keep asking about a tariff change that no article covers. Forty of them in a week. The unanswered questions arrive as a single cluster rather than forty separate rows, each carrying the conversations that hit it, and a draft answer is mined from the calls agents did manage to resolve by hand.

Outcome

A curator reviews the draft and publishes one article that closes the whole cluster. Nothing reaches the knowledge base without a person saying yes to it.

At a glance

Specification

The numbers and limits, without the sales copy

Specification for Knowledge Base & RAG
Specification Detail
Retrieval Dense vector + BM25 + reciprocal rank fusion + cross-encoder rerank
Vector store PostgreSQL with pgvector
Embeddings text-embedding-3-small default; 3-large and ada-002 supported; per-tenant override
Query processing Anaphora resolution, HyDE, multi-hop decomposition
Chunking Semantic chunking, not fixed character windows
Ingestion PDF, DOCX, CSV, Markdown, web crawl including JavaScript-rendered pages, OCR
Connectors 30+ including Confluence, SharePoint, GitHub, Slack, Notion, Salesforce
Grounding Groundedness gate hallucination grader citation auditor
Answer trace Chunks retrieved, rerank score, retrieval latency, citations attached, unsupported claims found
Scope Sources attach per agent; no organisation-wide fallback
Languages 20+, with language-tagged articles, on-the-fly translation and locale-aware search
FAQ

Questions,
answered

What teams ask us before they roll out Knowledge Base & RAG — how it works, what it needs from your side, and what happens when it gets something wrong

Still not sure?

Talk to a specialist and get a straight answer.

Ask our team

Three ways into the OptiML knowledge base: upload PDF, DOCX, CSV and Markdown, crawl your website including its JavaScript-rendered pages, or connect a source directly through one of 30+ connectors such as Confluence, SharePoint, GitHub and Salesforce. A connected source is followed rather than duplicated, so the index tracks the original instead of a snapshot of it. Re-crawls and syncs sweep for staleness, which is what stops a page you edited in March from still answering with January's terms.

The draft never reaches the customer. Before an OptiML agent speaks or sends, a hallucination grader and a citation auditor compare the draft against the passages that were actually retrieved, and an answer that cannot be grounded is replaced by the part the agent can support plus a handover to a human. The refusal is traced exactly the way a successful answer is, so you can count how often it happens instead of guessing.

No. In OptiML, knowledge sources attach to agents one at a time, and there is no organisation-wide fallback scope sitting underneath them. Your billing agent does not read the HR handbook and your public agent does not quote the internal runbook, because neither agent has been given those sources. Scope is set in the Agent & Flow Builder alongside the rest of that agent's configuration.

OptiML defaults to text-embedding-3-small. 3-large and ada-002 are both supported, and the choice can be overridden per tenant if you have a reason to. Changing the embedding model changes the first retrieval stage and nothing else, because BM25, reciprocal rank fusion and the cross-encoder rerank all run the same way regardless of what produced the vectors.

The OptiML knowledge index sits in PostgreSQL with pgvector, inside your tenant, in the region chosen at deployment, under the same row-level isolation as the rest of your data. Retrieval happens there. Only the passages selected for a given question are sent to the model, and that call runs under the same guardrails, budget caps and audit trail as every other AI call on the platform, which means an answer given at three in the morning is as auditable a month later as one your compliance team watched being given.

Connected solutions

Where Knowledge Base & RAG is used

The Solutions pages that lean on this module, and what it looks like once it is configured for a particular floor, job title or job to be done.

15 solutions built on this module
Talk to a specialist

Bring the document it has to get right

Bring the policy document, the claims handbook or the help-centre export your agents cannot afford to paraphrase. We ingest it, ground an agent in it, then hand you the phone and let you try to break it. That is the demo. Bring the edge case that bit you last quarter.

  • 30 minutes
  • Your document, ingested and questioned live
  • Try to break it

Book your slot

Leave your email and our team will come back to you within one business day.

or reach us directly

Your details stay private. We never share them.

This website uses cookies.

Cookies are small text files that allow us to create the best browsing experience for you on our site. By continuing to use this website or clicking "Accept & Close", you are agreeing to our use of cookies. To understand how we use cookies or how to manage them, please see our cookies policy.

Ask OptiML

Powered by RMT Engineering