Skip to content

RAG with citations, hybrid search and GraphRAG

DocsGPT answers from your documents and cites its sources: click a numbered citation to read the exact passage, then open the file in Knowledge. Retrieval is classic vector, hybrid keyword + vector or GraphRAG, reranked by DocsGPT's own decision model if you choose, set per source and testable before anyone relies on it.

citations: title · source · page · citation reader · classic · hybrid (bm25 + vector) · graphrag · relevance · test retrieval

Last updated:

app.docsgpt.cloud — Chat
app.docsgpt.cloud — Chat

Cited answers, every passage one click away

Answers carry numbered citations. Click one and the citation reader opens beside the chat with the exact passage, the file and the knowledge it came from; Open in Knowledge takes you to the document itself.

Every citation names the title, source and page of the passage it points to. The sources panel lists every passage behind an answer, and files synced from your tools say where they came from, such as "From Google Drive"; a citation from Google Drive, SharePoint or Confluence opens the original file in that service. The model is instructed to answer only from what it retrieved and to say when your documents do not cover the question.

Formulas render properly in answers, so regulatory and financial maths reads as written.

numbered citations · citation reader · open in knowledge · link to the original file

app.docsgpt.cloud — Chat › Sources
A chat answer with ten sources; the Sources panel beside it lists each cited document with the start of its passage, and source 7, Pricing guidelines 2026.docx, is marked From Google Drive.
app.docsgpt.cloud — Chat › Sources
A chat answer with ten sources; the Sources panel beside it lists each cited document with the start of its passage, and source 7, Pricing guidelines 2026.docx, is marked From Google Drive.

Three retrievers

Retrieval is chosen per source. Classic vector similarity runs on any vector store; hybrid BM25 + vector and GraphRAG run on pgvector. One question searches every knowledge source an agent uses, with optional query rephrasing, then either Relevance reranking or LLM screening before the cited answer.

GraphRAG can be switched on when a source is added or later. Until its graph is built, the source keeps answering through classic retrieval.

Files attached in a chat are searched too. An agent can search a long attachment or read it in full, PDFs page by page, and a ZIP becomes one attachment per file. When files are too large to send whole, Add to Knowledge keeps them searchable instead.

Classic retrieval uses vector similarity and suits short factual lookups. Hybrid adds BM25 keyword search to vector search for exact terms, codes and names. GraphRAG builds an entity and relationship graph over the source and traverses it with Personalized PageRank for questions that span many documents.

DocsGPT retrievers: method and best use
 MethodBest for
Classicvector similarityshort factual lookups
HybridBM25 keyword + vectorexact terms, codes, names
GraphRAGentity and relationship graph, traversed with Personalized PageRankquestions spanning many documents

graphrag graph · built when added or later · resumable · no graph yet → classic retrieval

Retrieval pipeline
  1. 01Questionuser or agent
  2. 02Rephraseoptional
  3. 03Retrieverclassic · hybrid · graphrag
  4. 04Relevance or LLM screeningdecision model reranks · or an LLM filters · optional
  5. 05Answerwith citations
Text version

A question from a user or an agent is optionally rephrased, then passed to the retriever set for each source: classic, hybrid or GraphRAG. Optionally, either DocsGPT's decision model reranks the chunks (Relevance) or an LLM keeps only the relevant ones (LLM screening), and the answer is generated with citations.

Relevance: the best passages first

Turn on Relevance for a source and DocsGPT's decision model, arc-decide, scores every retrieved passage for how well it answers the question. Reorder puts the most relevant passages first; Reorder and filter also drops the weak ones, so fewer and better passages reach the model.

Choose how strict the filter is per source: Loose, Balanced or Strict. Relevance works with every retriever and vector store, and is the alternative to LLM screening: a small model built for the job scores the passages instead of a chat model reading them. It runs inside your deployment, on a GPU or a dedicated decision-model server (about the decision model).

The same model labels conversations for Insights, which shows the questions your documents do not answer yet.

off · reorder · reorder and filter · loose · balanced · strict · every retriever

Relevance on a sourcereorder and filter · balanced
Question

Who approves net 60 payment terms?

hybrid · 6 passages → arc-decide scores each one

#PassageScoreWas
  1. 14. Payment terms and creditMFG Delegation of Authority Matrix v3.2.docx0.93↑ 4
  2. 2Exceptions to standard termsAccounts Payable Procedure v1.4.pdf0.71↑ 5
  3. 32. Spend approval thresholdsMFG Delegation of Authority Matrix v3.2.docx0.48↓ 2
  4. –PaymentSupplier Code of Conduct and Carrier Onboarding Requirements v2.1.pdf0.19filtered
  5. –InvoicingMaster Services Agreement, Northline Freight.pdf0.08filtered
  6. –6. People and other commitmentsMFG Delegation of Authority Matrix v3.2.docx0.03filtered
Text version

Hybrid retrieval returns six passages for the question Who approves net 60 payment terms?, with a section on people and other commitments first. DocsGPT's decision model scores each passage for how well it answers the question. With Reorder and filter at Balanced, the payment terms section of the delegation of authority matrix moves from fourth to first, the accounts payable exceptions from fifth to second and the spend thresholds stay third; the other three passages fall below the filter line and never reach the model.

Per-source retrieval settings

Each source carries its own retrieval settings, so a contracts library and a wiki can be tuned differently and still be searched together.

Search exposure decides how an agent sees a source: pre-fetched into the context before the model runs, or offered as a search tool the agent calls when it needs to. Relevance and links to the original files are set here too.

app.docsgpt.cloud — Knowledge › Source settings
Source settings for a contracts library: Retriever set to Hybrid, 6 chunks to retrieve, Rephrase query before search on, Search exposure set to Pre-fetch into context, and the Relevance model set to Reorder and filter with Balanced filter strictness.
app.docsgpt.cloud — Knowledge › Source settings
Source settings for a contracts library: Retriever set to Hybrid, 6 chunks to retrieve, Rephrase query before search on, Search exposure set to Pre-fetch into context, and the Relevance model set to Reorder and filter with Balanced filter strictness.

Per-source settings

retriever
classic · hybrid · graphrag
chunks to retrieve
6 by default
query rephrasing
on / off
search exposure
pre-fetch into context · agent searches as a tool
relevance
off · reorder · reorder and filter · loose · balanced · strict
llm screening
LLM relevance filter on retrieved chunks · or relevance
link to the original files
google drive · sharepoint · confluence
chunking
strategy · max and min tokens per chunk

Test retrieval before you rely on it

Ask a question and see exactly which chunks the real pipeline finds, in order, with their scores, token counts, the retriever used and how long it took. Try different settings for the test without saving them, then keep what works.

The same search is open to your own apps through the Search API, and to Claude, Cursor and other MCP clients through DocsGPT's search_docs tool (API, MCP & Widgets). Every retrieval step also shows up in the run's execution trace.

test retrieval · scores · retriever · latency · search api · mcp search_docs

app.docsgpt.cloud — Knowledge › Test retrieval
Test retrieval on a contracts library: the question Who approves net 60 payment terms? returns 6 chunks with hybrid retrieval in 92 ms, each listed with its file, score and token count.
app.docsgpt.cloud — Knowledge › Test retrieval
Test retrieval on a contracts library: the question Who approves net 60 payment terms? returns 6 chunks with hybrid retrieval in 92 ms, each listed with its file, score and token count.

Graph view

For sources with GraphRAG on, the graph view shows the entities and relationships DocsGPT extracted: the structure the retriever follows when a question spans many documents. Pick an entity to see what it connects to and how many chunks mention it.

Filter by entity type, search for a name, or switch to the entity and file lists. Building the graph is covered on Knowledge.

entities · relationships · mentioned in n chunks · personalized pagerank

app.docsgpt.cloud — Knowledge › Knowledge graph
The knowledge graph of a source with 309 entities and 888 relationships: entity-type filters above the graph, one company selected with its connections highlighted, and a side panel with its summary, connection count and relationships.
app.docsgpt.cloud — Knowledge › Knowledge graph
The knowledge graph of a source with 309 entities and 888 relationships: entity-type filters above the graph, one company selected with its connections highlighted, and a side panel with its summary, connection count and relationships.

How it runs privately

Retrieval, BM25 and graph traversal run inside your PostgreSQL/pgvector instance, embeddings are computed locally through FastEmbed on ONNX Runtime, and Relevance scoring runs on DocsGPT's decision model in your own deployment. Nothing about how answers are retrieved requires an external service.

Four deployment postures, one code base. Compare deployment options →

Inside your network

  • postgresql / pgvector
  • bm25 · vector · graph traversal
  • fastembed · onnx runtime embeddings
  • decision model · relevance
  • test retrieval · traces

managed · on-premises · air-gapped

Cloud

Arc53 operates the database, embedding service and decision model; retrieval runs in Arc53's cloud.

Air-gapped

Identical retrieval on your own PostgreSQL/pgvector with local embeddings, a local LLM and the decision model from a local copy, hybrid and GraphRAG included, with no external network.

Example

2.5M+ pages · 6 languages

Multilingual EU-law research over 2.5M+ pages, answers in 6 EU languages with full source citations, 100–200 ms retrieval.

Source: LexEU

Next: how documents get in · questions your documents miss · embeddings and vector stores · legal research with citations · compare with Glean · deployment options · pricing

Frequently asked questions

How does RAG reduce hallucinations?

The model answers from passages retrieved from your documents and cites them, so anyone can open the exact passage behind an answer. It is instructed to say when the documents do not cover a question rather than guess, and Test retrieval lets you check what a question finds before people rely on it.

Does DocsGPT rerank search results?

Yes, per source. With Relevance on, DocsGPT's decision model scores every retrieved passage against the question and puts the most relevant first. Reorder and filter also drops the weak ones, as Loose, Balanced or Strict as you choose, so fewer and better passages reach the model. It works with every retriever, and the model is DocsGPT's own, so no passage is sent to a third-party reranking service.

What is GraphRAG?

GraphRAG is retrieval over a graph of entities and relationships extracted from documents, so a question can follow links across many documents instead of matching one passage. DocsGPT builds that graph with an LLM pass over the source, when it is added or later, and traverses it with Personalized PageRank for multi-hop questions.

Can I turn GraphRAG on for a source I have already added?

Yes. The graph is built over the whole source, and the run can be resumed if it is interrupted. DocsGPT shows an estimate of the work before it starts, and until the graph exists the source keeps answering through classic retrieval.

What is hybrid search in RAG?

Hybrid search combines BM25 keyword matching with vector similarity, so exact terms, codes and names are found even when their embedding is weak. In DocsGPT it is a per-source setting.

Does hybrid search need a special database?

Yes: hybrid and GraphRAG run on pgvector (PostgreSQL). Classic retrieval works on any supported vector store.

Can one question search all my sources?

Yes. An agent searches every knowledge source it uses with one question and returns one answer, with each citation pointing back to its own document.

See DocsGPT on your documents

A 30-minute demo on your use case, or a free on-premises review with an engineer.