Home / RAG chatbot development
Service — Retrieval & RAG
Answers from your product’s knowledge.
Build retrieval over authorised documents, with source citations, access checks and evaluation against your users’ questions.
Make your knowledge usable inside the product
A retrieval-augmented system finds relevant material before a model drafts an answer. It can help staff or customers navigate documents, policies and product information. Citations support review; they do not guarantee that an answer is correct.
The first decision is which questions the system is responsible for and which documents may answer them. A corpus assembled by exporting everything available will also retrieve superseded material that reads as current; one limited to the documents that are current and authoritative is easier to evaluate.
What the implementation can include
A pipeline for agreed document formats, indexing and retrieval, permission filtering, source links and refresh behavior. Hybrid search and reranking are options when your corpus and evaluation justify them.
Ingesting the documents you already have
A corpus usually mixes exported help-center HTML, PDFs from word processors or print layouts, spreadsheets, wiki pages and email threads. Each format needs a parser that preserves reading order, headings and tables, and discards navigation, repeated headers and boilerplate that would otherwise be retrieved.
Parsing also produces the metadata retrieval needs later: title, section path, effective date, source system and the permissions attached at source. Reconstructing those from chunk text afterwards is unreliable.
How documents are split for retrieval
Splitting determines what can be found at all. A passage that answers a question is only retrievable if it survives as a coherent unit: fixed-size splitting cuts tables, clause numbering and multi-paragraph answers apart, so the half carrying the answer loses the half that gives it context.
Structure-aware splitting follows the document instead. Headings become boundaries and travel with each passage as a section path, so a chunk keeps the context its page supplied. Short sections are merged with their neighbors and long ones are divided at a paragraph boundary.
Tables and scanned pages
Pricing, specification and policy documents often hold their answers in tables, and generic parsing handles tables poorly: flattened into a sequence of cell values, a table loses the row and column relationships. A table can instead be kept whole as one passage, with its headers repeated per row. Scanned pages need optical character recognition, whose quality varies with the scan, so we test it on a sample.
Embeddings and where the index lives
Embedding choice affects retrieval quality, cost and how much work a later change requires. A general-purpose model may not separate terms that are distinct in your field, which is visible only in evaluation against your own corpus rather than in published provider benchmarks. Changing the model later means re-embedding everything.
An existing Postgres instance with a vector extension is often sufficient; a dedicated vector database is warranted when corpus size, filtering or query volume require one.
Hybrid retrieval and reranking
Dense vector search finds passages whose embedding is close to that of the question, approximating topical relatedness rather than word overlap. It performs poorly where an exact string is required: part numbers, error codes and field names. Keyword search handles those and misses paraphrase, so retrieval runs both and merges the results through rank fusion, with filters for type, date validity and access applied first.
A reranking step then scores each candidate against the question directly. That is usually more accurate than comparing precomputed vectors, and it costs more, so it runs over tens of candidates rather than the whole corpus. The number of passages passed to the model trades recall against prompt cost and against reliability on long prompts, since passages in the middle of a long prompt are used less than those at either end on many models.
Citations and missing evidence
A resolving citation confirms that the passage was retrieved, not that it supports the statement. Whether it does is what the evaluation set scores.
Where the best retrieved passages fall below the agreed support threshold, the system states that the material is not available. It offers related documents or a route to a person rather than answering from general model knowledge. Similarity scores are not comparable across queries, so the threshold is set on reranker scores or an explicit support check, calibrated against the evaluation set.
Retrieval that respects permissions
Access control is therefore applied as a retrieval filter rather than after scoring. Filtering after retrieval returns a shorter list from a search that already read restricted content, and instructing the model not to use a passage it has been given is not an access control.
A permission captured at ingestion goes stale when the source changes, so permission changes are re-synchronized on the same schedule or change feed as content, and the lag between the two is agreed rather than left implicit.
Freshness, versions and re-indexing
The pipeline also needs content hashing so unchanged documents are not re-embedded, deletion handling so withdrawn documents leave the index, and a record of when each document was last indexed.
Evaluate the questions your users ask
Use representative questions, missing-answer cases, conflicting documents and access boundaries. Agree the evaluation set and acceptance criteria before implementation. Freshness, model quality and source quality all affect results.
The set is built from questions people actually ask, taken from support tickets and search logs, and it has to include questions the corpus does not answer, which answerable questions alone will not surface. Each entry records the question and the passages that should have been retrieved, so retrieval and generation are scored separately. Scoring runs on every change, because a change at one stage can regress another.
What a retrieval project costs
Every engagement starts with a fixed-price discovery sprint at USD 2,500 over two weeks, which produces the architecture, initial screen designs, acceptance criteria, a running-cost model and a fixed price for the build. The sprint fee is deducted from the build.
Indexing is charged per document version, and it recurs whenever documents change or the corpus is re-indexed against a different embedding model.
Deciding whether a requirement needs retrieval at all: prompting, retrieval or fine-tuning → · what it costs to run →
Part of the AI Feature Implementation Sprint → · Explore our work → · Read why naive RAG fails →
Document preparation
Support agreed formats, structure and update requirements.
Retrieval and ranking
Evaluate relevant passages against representative questions.
Permissions and citations
Check source access and provide links for answer review.
FAQ
RAG, answered.
What is RAG?
Retrieval-augmented generation supplies selected source material to a model before it answers. It connects a product assistant to a defined document or data collection.
How accurate will it be?
Accuracy depends on the sources, retrieval and model behavior. We evaluate representative questions and unsupported-answer cases against agreed criteria; no accuracy percentage is promised.
Can it respect user permissions?
Permission-aware retrieval can be part of the scope. We review what the source APIs expose and test user and workspace boundaries before release.
Which sources can you connect?
We review the formats, APIs, permissions and refresh requirements for your corpus. Only the sources listed in the proposal are included.
How much does it cost to build a RAG chatbot?
Every engagement starts with a fixed-price discovery sprint at USD 2,500 over two weeks, which produces the architecture, acceptance criteria, a running-cost model and a fixed price for the build. The sprint fee is deducted from the build, so the build price is agreed before implementation starts.
What does it cost to run?
Cost has three components: indexing, charged per document processed and repeated on a full re-index; answering, charged per question across the query embedding, retrieval and reranking, and the model call; and index storage, charged for as long as the index exists. The discovery sprint produces that model from your corpus size and question volume.
How long does it take to build?
The discovery sprint runs two weeks and ends with a fixed price and an agreed schedule for the build. Build duration depends on the number of sources, the formats involved, whether permissions must be mirrored and the acceptance criteria agreed.
Can it answer from tables and scanned PDFs?
Tables can be preserved during ingestion rather than flattened into text, which is one of the things pricing and specification answers depend on. Scanned documents require optical character recognition, and the output quality depends on the scans, so we test a sample first.
What happens when the answer is not in the documents?
The system is built to state that the material is not available, and to offer related documents or a route to a person, rather than answer from general model knowledge. Those cases form part of the evaluation set and the acceptance criteria.
How does it stay up to date when documents change?
Updates arrive on a schedule or through a change feed, depending on what the source system supports. Unchanged documents are not reprocessed, withdrawn documents leave the index, and effective dates are recorded so retrieval can prefer current material.
Tell us which knowledge your users need to find.
Share the requirements. Kartik reviews your brief and follows up by email to discuss fit, dependencies and next steps.
Discuss an AI Project →