RAG and LLM systems

RAG and LLM systems that cite their sources and know when to stop

Language systems that answer from your documents and databases, show where each answer came from, respect who is allowed to see what, and say so when they are not confident.

Technology we use for this work

  • Qdrant
  • Milvus
  • Pinecone
  • Weaviate
  • Chroma
  • pgvector
  • Elasticsearch
  • MongoDB
  • Neo4j
  • LangChain
  • Hugging Face
  • vLLM
  • Ollama
  • Anthropic
  • OpenAI
  • Langfuse
  • FastAPI

The problem

A chatbot over your documents is the easy 80 percent

The hard part of retrieval augmented generation is everything a demo skips: chunking tuned to each document class, permissions applied at query time, answers that cite the passage or row they came from, and a way to prove that last week's change did not make answers worse.

In regulated settings there is a further requirement. A system that can write queries against a live clinical or financial estate is a governance problem before it is a feature. We treat it that way.

What we build

What does our RAG and LLM systems service include?

Retrieval over private data, natural language to query and structured extraction, with citations and evaluation.

  1. Hybrid retrieval

    Vector and keyword search combined on Qdrant, Milvus, Pinecone, Weaviate, pgvector, Elasticsearch or MongoDB, with chunking tuned per document class: filings, contracts, clinical notes, tickets and chat threads each get their own strategy.

  2. Permission filters at query time

    Access rules are applied inside retrieval, before content reaches the model, not filtered from the answer afterwards.

  3. Cited answers

    Every generated claim resolves to a document passage, a transcript line or a stored figure. If it cannot be cited, it is not stated.

  4. Natural language to query

    Questions converted to read-only SQL, Cypher or document queries against a cached schema, with the generated query shown to the user for checking.

  5. Structured extraction

    Fields, tables and entities pulled from contracts, reports, forms and other documents into a typed schema, and validated before they reach a downstream system.

  6. Multilingual retrieval

    Retrieval and question answering across languages such as Arabic, Urdu and others, using open-weight models where data must stay in your environment.

  7. Self-hosted models

    Open-weight models served in your cloud or on-premise with vLLM or Ollama when residency, confidentiality or unit cost rules out a hosted API.

  8. Evaluation and regression

    A held-out question set agreed up front, faithfulness and relevance scoring, and regression runs on every prompt, model or index change.

Architecture

How does it work, step by step?

  1. Ingest

    Sources

    • Documents, filings, notes
    • Slack, Jira, CRM
    • Databases and warehouses
  2. Index

    Chunk and embed

    • Strategy per document class
    • Metadata and permissions
    • Vector and keyword index
  3. Retrieve

    Hybrid search

    • Permission filter at query time
    • Re-ranking
    • Schema cache for queries
  4. Answer

    Grounded generation

    • Citations on every claim
    • Confidence threshold
    • Refuse when unsupported
  5. Measure

    Evaluate and trace

    • Held-out question set
    • Faithfulness scoring
    • Every call traced
Retrieval is where most quality is won or lost. We tune it per document class and measure it separately from generation.

Context

Industries and related services

FAQ

RAG and LLM systems: common questions

How do you reduce hallucinations in a RAG system?

By constraining the model to retrieved evidence and measuring it. Answers must cite a passage or record, a confidence threshold decides when the system says it does not know, and a held-out question set scores faithfulness on every change. Most hallucination problems turn out to be retrieval problems, so we measure retrieval separately.

Can the system respect document permissions?

Yes. Permissions are stored as metadata at indexing time and applied as filters during retrieval, so a user can only retrieve content they are allowed to see. Filtering after generation is not enough, because the model has already read the content.

Can you run LLMs inside our own environment?

Yes. We deploy open-weight models in your cloud account or on-premise using vLLM or Ollama. For one publishing client, moving to a self-hosted Llama 3 model avoided roughly $10,000 a month in API fees.

Which vector database should we use?

It depends on scale, filtering needs and what you already run. We have shipped on Qdrant and Chroma, and also work with Milvus, Pinecone, Weaviate, pgvector, Elasticsearch and MongoDB. If you already run Postgres, Elasticsearch or MongoDB, their built-in vector search is often enough. We recommend one in the assessment, with the reasoning written down.

Can users ask questions of a database in plain English safely?

Yes, if the system is designed for it. Our natural language analytics service for a life sciences platform generates read-only queries only, requires the target database on every call and shows the generated query to the user. The read-only rule is enforced in the query layer, not in the prompt.

Start with a two to three week assessment.

Send us the problem and the constraints. You get a written architecture, a risk register and a costed roadmap, and you keep them whatever you decide next.