Mirror Code
AI service

LLM integration and RAG, built to be right.

LLM features inside your product that answer from your own data, cite their sources, and stay accurate and affordable as usage grows.

What you get
A production LLM feature with retrieval, evaluations, cost controls and monitoring.
Timeline
Audit in 1 week. First feature live in 2–4 weeks.
How to start
A 30-minute call, then a one-week audit of your data and use case.

Last updated

Accuracy is a design choice

An LLM feature is only as good as the information it’s given. Most poor answers come from retrieval, not from the model: the right paragraph never reached it, or an outdated one did.

So we build retrieval first and measure it on its own, then the answers, then cost and speed. Every step is checked against real questions from your users, which turns “it seems fine” into numbers you can track after launch.

Is it a fit?

Honest about when it isn’t.

A good fit

  • Lots of documents, tickets or records that people search every day
  • A product where users ask the same questions in many different ways
  • Data that changes often, so answers must stay current
  • A need for answers with sources people can check

Not a fit

  • Facts that fit on one page (a well-written FAQ is enough)
  • Tasks that need exact calculations rather than language
  • Projects with no way to tell whether an answer is right
  • Data that may not go to any model, and no budget to host one
What we build

Concrete use cases.

  • Search and Q&A over documents

    Answers from your manuals, policies, contracts or knowledge base, with links to the exact source.

  • Summaries

    Short, consistent summaries of long documents, calls, tickets or reports, in the format your team needs.

  • Extraction into structured data

    Turn PDFs, emails and forms into clean fields in your database, with human review for low-confidence cases.

  • Classification and routing

    Tag, prioritise and route incoming items, with accuracy measured against your own labels.

  • In-product assistants

    An assistant inside your app that knows the user’s context and your docs, and hands over to support when it should.

  • Cost and speed tuning

    Make an existing LLM feature cheaper and faster with caching, model routing and prompt changes, checked by evaluations.

Choosing the right design

The simplest design that works.

Each option has a place. The audit or scoping sprint picks one for your case, with the reasons written down.

RAG (retrieval-augmented generation)

Fits whenLarge or frequently changing data, and answers that need sources.

Watch outRetrieval quality is everything. Chunking, metadata and search need tuning.

Long context

Fits whenA small set of documents per question that fits in the model’s context window.

Watch outGets slower and more expensive as documents grow. Caching helps.

Fine-tuning

Fits whenA consistent output style or format at high volume, where prompts alone fall short.

Watch outNeeds good training data and doesn’t add knowledge. Rarely the first step.

Structured extraction

Fits whenTurning messy inputs into fields with a fixed schema.

Watch outNeeds validation and a review path for low-confidence results.

Week by week

How a feature pilot runs

  1. Week 0

    Data and questions

    We collect real questions and the documents that should answer them, and agree what a good answer looks like.

  2. Week 1

    Retrieval first

    We build the search over your data and measure whether the right sources come back, before any answer is generated.

  3. Week 2

    Answers and evaluations

    Answers with citations, scored against the test set for accuracy, completeness and tone.

  4. Week 3

    Cost and speed

    Caching, model routing and limits, so each answer has a known cost and response time.

  5. Week 4

    In front of users

    The feature goes live for a group of users behind a feature flag, with feedback buttons and monitoring.

Scope

What’s included, and what isn’t.

Included

  • Data ingestion and indexing for your sources
  • Retrieval, prompts and answers with citations
  • An evaluation set and automated quality checks
  • Cost controls: caching, model routing and limits
  • Monitoring for quality, cost and latency

Not included

  • Cleaning up years of outdated documents (we’ll flag what needs it)
  • Model provider fees (billed to you directly)
  • Building your whole product UI (available as a separate build)

Typical stack

  • Claude API
  • OpenAI API
  • Open-weight models
  • PostgreSQL
  • pgvector
  • TypeScript
  • Python
  • FastAPI
  • Next.js
Ways to start

Start small, keep what’s built.

Every step has a fixed scope and quote. You can stop after any of them and keep everything built so far.

  1. Step 01

    AI audit

    1 week

    Use cases ranked by value and risk, an architecture sketch, a running-cost estimate and a written proposal with a fixed quote for the pilot.

  2. Step 02

    Pilot sprint

    2–4 weeks

    One agent or feature built end to end and measured against success criteria agreed before work starts. It ends with a go or no-go decision.

  3. Step 03

    Build & support

    Ongoing

    Roll it out, extend it and keep it running, or hand it to your team with docs and tests.

FAQ

Common questions.

01What is RAG, in plain terms?

Retrieval-augmented generation means the model first searches your own data for the relevant passages, then writes the answer from them and cites them. Answers stay current and checkable without retraining a model.

02How do you stop the model from making things up?

By grounding every answer in retrieved sources, requiring citations, testing against real questions with known answers, and letting the feature say “I don’t know” when the sources don’t cover the question.

03Can our data stay private?

Yes. Business API plans don’t train on your data, access can be limited per user, and if data can’t leave your infrastructure we can use an open-weight model you host.

04Claude or OpenAI?

Whichever scores better on your examples for the cost. We test both, and often use a cheaper model for simple steps and a stronger one where quality matters. The design lets you switch later.

05What will it cost per month?

It depends on volume. The audit gives a cost estimate per question, and caching and routing usually bring it down a lot. Hard limits stop surprises.

06Do we need fine-tuning?

Rarely at the start. Good retrieval and prompts solve most problems. Fine-tuning makes sense later, for consistent formats at high volume.

Next step

Have a workflow that should run itself?

Book a 30-minute call. You’ll get an honest answer, even if it’s “don’t use AI for this”.