Retrieval-augmented generation

RAG Development Services for Answers You Can Trace to a Source

Your documents and data, searchable in plain language.

We build retrieval-augmented generation (RAG) systems that let employees and customers ask questions in plain language and get answers grounded in your own documents and data, with citations, access controls and measured retrieval quality.

Source citationsEvery answer traceable to a passage
Permission-awareUsers only see what they may
Measured retrievalTested before and after every change

When RAG is the right tool

Retrieval-augmented generation finds the most relevant passages in your content at the moment a question is asked and gives them to a language model to answer from. It is the right choice when knowledge changes often, when answers must be traceable to a source, and when you cannot or should not train a model on sensitive data. Because the content stays in an index you control, you can update or remove a document and the next answer reflects it, with no retraining.

RAG is not magic search. Most disappointing RAG systems fail at retrieval: the right passage was never found, an outdated policy outranked the current one, or a table was split so badly that the numbers lost their headings. Some fail worse, by showing a user content they were never allowed to see. Our RAG development services treat retrieval as an engineering problem with its own tests, not as a prompt to keep tweaking.

Typical RAG use cases

  • Internal knowledge assistants over policies, procedures, HR and IT documentation.
  • Customer-facing answers from product documentation and help centres, as in our AI customer support agents.
  • Document search and comparison across contracts, specifications and reports.
  • Copilots for your team that draft answers or summaries with sources for a person to check.
  • Hybrid assistants that combine document passages with figures queried from your databases.

RAG systems we build

Knowledge assistants

Plain-language Q&A over approved company documents, with citations and an escalation path for unanswered questions.

Customer answer engines

Help-centre and product-doc retrieval behind your website, app or support agent, tuned for short, accurate answers.

Document search

Semantic search with filters by date, owner and document type, plus summaries and side-by-side comparisons.

Data plus documents

Assistants that answer from text and from live database queries, so figures come from the system of record.

RAG architecture: the layers we engineer

Every layer below changes answer quality. We make each choice deliberately and test it, rather than accepting framework defaults.

LayerWhat we doTypical options
IngestionParse files and API content, clean and de-duplicate it, keep titles, dates, owners and access rules.Python pipelines, LlamaIndex, LangChain, Haystack
Chunking and embeddingsSplit content into overlapping chunks sized to the material, embed them, attach metadata for filtering.OpenAI embeddings, open-weight embedding models
Index and searchVector search combined with metadata and permission filters applied at query time.pgvector, Pinecone, Qdrant, Milvus, Weaviate
RetrievalSelect the best matches above a relevance threshold; return nothing rather than something irrelevant.Tuned per corpus and tested
GenerationNumbered sources in the prompt, answer-only-from-sources rules, citations for the sources actually used.OpenAI, Anthropic Claude, Llama, Mistral
Evaluation and tracingRetrieval hit rate, faithfulness and answer relevance on a test set; traces for every production query.Ragas, LangSmith, Arize Phoenix

A working example: Chat Cactus

In Chat Cactus, our own AI support product, uploaded PDF, DOCX, CSV, Markdown and text files are split into roughly 800-character overlapping chunks and embedded with OpenAI text-embedding-3-small. Each question is matched by cosine similarity, and the four best matches above a relevance threshold go to the model as numbered sources. Only the sources the model actually cites are shown to the user, and when nothing relevant is found the agent says so instead of guessing.

For client systems we adapt that pattern to your data: larger or smaller chunks for different document types, PostgreSQL with pgvector when you already run Postgres, and deployment on AWS or Google Cloud where your data already lives.

Evaluation: proving retrieval works

Start with a test set, not a demo

Before tuning anything we assemble real questions from the people who will use the system, each paired with the passage that should answer it. That set becomes the yardstick for every decision about chunk size, embedding model, filters and prompts.

Measure retrieval and answers separately

  • Retrieval: did the correct passage appear among the top results?
  • Faithfulness: does the answer say only what the sources support?
  • Citations: do the cited sources match the claims they are attached to?
  • Refusals: does the system say it does not know when the answer is not in the content?

Prepare the content, not just the pipeline

Retrieval cannot find what is not there, and it will happily find what should have been retired. Early in a project we review the sources with their owners: which documents are authoritative, which are drafts or duplicates, which contain tables or scans that need special parsing, and how often each source changes. Removing outdated material often improves answers more than any model upgrade.

Keep content owners in the loop

Questions with no good match are logged for the people who own the content. Gaps in your knowledge base become a to-do list instead of a silent failure, and accuracy improves as the content improves, not only when the model changes.

Security and data handling

  • Permissions enforced at retrieval: access rules from the source systems are stored with each chunk and applied before anything reaches the model.
  • Your infrastructure, your data: indexes and services can run in your own cloud account, and you keep control of the data and deployment.
  • Freshness and deletion: sync jobs re-index changed documents and remove deleted ones, so retired content stops appearing in answers.
  • Prompt-injection defences: retrieved text is treated as data, never as instructions, and cannot trigger tools or change system rules.
  • Data minimisation: only the passages needed for an answer are sent to the model provider, under API terms that match your policy.
  • Audit logs: queries, retrieved sources and answers are logged for review, with retention set to your requirements.

Timeline and pricing

We scope a pilot in about a week. A pilot over one document collection typically ships in 2–6 weeks; production hardening typically adds 2–4 more. Well-organised data shortens the work; scattered spreadsheets, scans and duplicated documents lengthen it.

PhaseTypical scopeTimelineRelative cost
PilotOne source collection, one user group, test set, citations, basic monitoring2–6 weeksLower
ProductionSeveral sources, sync and deletion, permissions, single sign-on, monitoring and alertsTypically 2–4 more weeksModerate to high
EnterpriseMultiple departments and systems, governance, audit trails, scale and availability targetsPhased, scoped in discoveryHigh

The main cost drivers are the number and condition of your sources, the permission model, how fresh answers must be, and query volume. The AI agent development cost guide breaks these down and shows how to estimate monthly model spend. If you also want the system to take actions, not only answer, see agentic workflow automation.

RAG development FAQs

What is RAG development?

Retrieval-augmented generation (RAG) connects a language model to your own content. When someone asks a question, the system searches your documents or data for the most relevant passages and gives them to the model to answer from, usually with citations. RAG development covers ingestion, chunking, embeddings, search, prompting, evaluation and the access controls around them.

Do we need RAG or fine-tuning?

For answering questions from company knowledge, RAG is usually the better starting point: content can be updated or removed without retraining, answers can cite sources, and sensitive data is not baked into a model. By default we use retrieval rather than fine-tuning on sensitive data. Fine-tuning can help with tone or narrow output formats and can be combined with RAG.

Which vector database do you use?

The one that fits your stack and scale. We work with pgvector, Pinecone, Qdrant, Milvus and Weaviate. If you already run PostgreSQL, pgvector keeps the system simple; managed or dedicated vector databases make sense at higher volumes or with stricter latency targets.

Can a RAG system respect our document permissions?

Yes, and it should. We carry access rules from the source systems into the index as metadata and filter results at query time, so a user is only ever given passages they are allowed to see. Filtering after the answer is generated is not safe enough.

How do you reduce hallucinations?

The model answers only from retrieved passages, sources are numbered and cited, and when nothing relevant clears the relevance threshold the system says it does not know. We measure faithfulness and retrieval quality on a test set before and after every change.

What file types and sources can you ingest?

Common formats such as PDF, DOCX, CSV, Markdown and plain text, plus content pulled through APIs from knowledge bases, wikis, ticketing systems and databases. Scanned or poorly structured documents need extra preparation, which we assess during discovery.

How long does a RAG project take?

We scope a pilot in about a week. A pilot over one document collection typically ships in 2–6 weeks; production work such as multiple sources, sync jobs, permissions and monitoring typically adds 2–4 more, depending on data quality and integrations.

What does a RAG system cost to run?

Ongoing costs are model usage, embedding new or changed content, vector storage and search, hosting and monitoring. Volume and document size drive most of it. Our AI agent development cost guide shows how to estimate model spend from your own usage.

AI customer support agents

Grounded answers with citations on your website, email and messaging apps, with a clean handoff to your team.

AI MVP development

A scoped, evaluated first version of your AI product, built so it can grow into production instead of being thrown away.

LLM integration

OpenAI, Anthropic and open-weight models wired into your web, mobile and back-office software, with cost and quality controls.

Agentic workflow automation

Agents that run multi-step processes across your tools, with approvals, limits and an audit trail for every action.

AI chatbot development

Website, WhatsApp, SMS and Telegram chatbots that know your business, capture leads and pass hard cases to people.

See the full picture on our AI agent development page, the wider AI automation and data science services, the AI agent development cost guide and the five AI products we build and run.

Find out how well your documents would answer

Tell us which content your team searches most and who should see what. On a 30-minute call we will outline a RAG pilot, the test set and what success would look like.