All articles

What an AI Assistant Over Your Documents Costs, Line by Line

Listen to this article (experimental), 14:54

00:00 / 14:54

An assistant that answers questions from a company's own documents, and shows the passage each answer came from, costs €10,500 when I build it. That is the middle tier of my AI applications service, 105 hours at €100 an hour, delivered in three weeks, and the figure is printed on the service page. It is the half of the cost a quote covers. The other half arrives every month after handover, and most of it appears on no quote at all.

This piece is both halves, line by line: what the build pays for, what running it costs at public prices I looked up on 5 December 2026, what moves either number, and what to get in writing before you pay anything. I have worked on systems of this kind for Laiwyer's legal research, MediSearch's medical search and Nestlé's scientific-intelligence platform.

What the assistant does

The technical name is retrieval-augmented generation, RAG for short, and the idea fits in three steps. Someone asks a question. The system finds the passages in your documents most likely to answer it. A language model writes the answer from those passages only, and links each claim to the passage it used.

Every line of the build is one of those steps, or something that lets you check them.

The build, line by line

Ingestion. Your documents leave wherever they live, a shared drive, a wiki, a ticket system, a folder of PDFs, and become text cut into passages. Each passage keeps its address: the document, the page or section, the date. Clean web pages and Word files are quick. Scanned contracts, tables whose layout carries meaning and several languages are slow, and each source system needs its own connector and its own way of noticing what changed. Ingestion is where a fixed price is most exposed, which is why I ask which sources and which formats before I give one.

Retrieval. When a question comes in, the system searches the passages two ways at once: by keyword, which finds names, product codes and clause numbers, and by meaning, which finds the passage that says the same thing in other words. The combination is called hybrid retrieval. Then it gets tuned on your real questions: how long a passage should be, how many to hand the model, which to drop. A wrong answer often starts here, with the right passage never reaching the model, which then does its best with the wrong ones.

The model calls. This line covers the instructions that tell the model to answer only from the passages and to say so when they hold no answer, retries when the provider is slow, a fallback when it is down, and the cost and time of every request, logged from the first day so you can check the monthly bill against the log.

Citations. Every answer links to the passage behind it, and a click opens it. That is what lets a user trust an answer, and it does a second job: a wrong answer with its source attached is one a reader can catch by opening the source.

The eval set. A list of questions your people ask, each with the right answer and the document it comes from, run against the system after every change. It turns "the answers seem good" into a number, and the number tells you whether a new prompt, a cheaper model or a different passage length made things better or worse. It is the last line I would cut, for a reason that comes back in the running costs.

The interface. A web or chat interface where people type a question and read the answer with its sources, deployed and live.

Deployment. The system runs in your cloud account or on a platform you choose, with the infrastructure written as code in your repository, so another team can stand it up again without me.

Handover. The source code, a short handover, and 30 days in which anything that does not work as the agreed scope says is fixed free.

The tier has one price instead of a price per line, because the lines trade hours with each other. A corpus of clean web pages leaves time for retrieval tuning that a corpus of scanned contracts spends on getting the text out.

Here is how the three tiers of the service divide those lines:

The three tiers of AI applications, integrations and chatbots as published on tiagoperes.com in December 2026: price, hours, weeks, what each includes and how it is paid.
Line One integration, shipped Assistant on your own content Production AI application
Price, fixed €4,000 €10,500 €21,000
Hours at €100 40 105 210
Calendar 1 to 2 weeks 3 weeks 6 weeks
A model wired into your system, with retries and fallbacks Yes Yes Yes
Cost and latency logged per request Yes Yes Yes
Ingestion of your documents No Yes Yes
Hybrid retrieval, tuned on your questions No Yes Yes
Citations on every answer No Yes Yes
An eval set No Yes Yes
A web or chat interface, deployed No Yes Yes
Agents and tool calling No No Where they earn their place
Monitoring, tracing and spend limits No No Yes
Human review for the actions that need one No No Yes
Load, cost and failure testing before launch No No Yes
Handover Source code, short handover Source code, short handover Documentation, runbook, team handover
Payment €2,000 to start, €2,000 on handover €5,250 to start, €5,250 on handover €8,400 to start, €6,300 at the midpoint demo, €6,300 on handover

An assistant over your documents is the middle column. The first is for a single AI feature inside a product you already run, such as a model answering from what your existing search returns. The third is for when the assistant has to do things as well as answer, file a ticket or update a record, and has to be watched while it does.

What running it costs

Six lines arrive after handover. I give each one with its assumptions, because a single number without them is a guess you cannot check. Prices are in US dollars, as the providers publish them, and I read every one on 5 December 2026.

The model, per question

Each question costs the tokens sent to the model plus the tokens it writes back, priced separately. A token is a piece of a word, and the count for the same text differs by model: Anthropic's pricing page says its models from Claude 4.7 onward produce about 30 percent more tokens for the same text than the earlier ones. So I count three sizes of question:

  • Light: 3,000 tokens in (the instructions, four short passages and the question) and 300 out.
  • Typical: 6,000 tokens in (the instructions and eight passages of about 600 tokens each) and 500 out.
  • Heavy: 12,000 tokens in (long passages, or a conversation's history carried along) and 1,000 out.

At Anthropic's published prices, a thousand questions cost:

Model cost per 1,000 questions at Anthropic's published API prices, read on 5 December 2026, in US dollars, for three sizes of question.
Model Input, per million tokens Output, per million tokens Light (3,000 in, 300 out) Typical (6,000 in, 500 out) Heavy (12,000 in, 1,000 out)
Claude Haiku 5.5 $0.10 $0.50 $0.45 $0.85 $1.70
Claude Sonnet 5.5 $2 $10 $9 $17 $34
Claude Opus 5.5 $4 $20 $18 $34 $68

The Haiku price is the one for prompts up to 100,000 tokens, which covers all three sizes. OpenAI's price list works the same way, input and output priced separately per million tokens, so the same arithmetic applies to any model on it.

At 10,000 questions a month, the typical size comes to $8.50 on Haiku, $170 on Sonnet and $340 on Opus. That spread, forty to one between the cheapest model and the dearest, is where you have the most control over the running cost. The way to choose is the eval set: run it on the cheaper model, and if it passes, the cheaper model is the right one. Without the eval set the choice is a guess, and a nervous guess picks the bigger model.

Caching trims a little. The fixed instructions at the front of every request can be cached, and a cached token on Sonnet 5.5 costs $0.10 per million instead of $2. The passages change with every question, though, so most of the input is paid in full.

Embeddings

Before retrieval can search by meaning, every passage is turned into a list of numbers by an embedding model, and so is every question. OpenAI's text-embedding-3-small costs $0.02 per million tokens, so a corpus of ten million tokens costs $0.20 to embed, and re-embedding the documents that change each week costs less. Count your own corpus with the provider's tokenizer for the exact figure. It will not be the line that decides anything.

Hosting and the vector store

The passages and their embeddings live in a vector store, and the application runs somewhere. On Cloudflare, which serves this site, the paid Workers plan has a minimum of $5 a month and includes 10 million requests a month, plus 50 million queried vector dimensions a month and 10 million stored ones in Vectorize, its vector database. Cloudflare's own worked example, 50,000 stored vectors queried 200,000 times a month, comes to $1.94 before that allowance is taken off.

If the system has to run in your own Azure, AWS or Google Cloud account, the shape I would start from is a small container and a managed PostgreSQL database with the pgvector extension. Price both in your provider's calculator, for your region, before you sign. It is a fixed monthly line that moves little with the number of questions, until volume calls for a larger machine.

Monitoring

The build logs the cost and latency of every request. Watching quality over time needs traces as well: what was asked, which passages came back, what the model answered. Langfuse, one hosted tool for this, lists a free plan with 50,000 units a month and 30 days of history, and a $29 plan with 100,000 units and 90 days, where a unit is each trace, observation or score it stores. If every question is one trace with two steps inside it, retrieval and generation, that is three units, and 10,000 questions a month is 30,000 units. It can also be self-hosted.

Running the eval set again

Each run of the eval set asks every question once. Two hundred questions at the typical Sonnet 5.5 size cost $3.40 a run, plus the grading calls if a model checks the answers. That is cheap enough to run on every change, which is the point of having one.

It is also what makes a change of model cheap. Models get retired: the same Anthropic page marks four older Claude models as retired. When yours is, moving to its successor is a short job with an eval set and a gamble without one.

The person who keeps the documents current

No quote includes this line, because nobody can sell it to you. The assistant answers from what it is given. A policy replaced in March but still in the folder in June produces an answer that is confident, cited and wrong, and the citation makes it more convincing.

Someone in your company has to own the documents: add the new ones, retire the old ones, and read the questions the assistant could not answer, because those are the gaps in the documents. To price it, multiply the hours a week by that person's hourly cost and by 52. Two hours a week is about a hundred hours a year. Set that next to the model bill for the year; at the volumes above, it can easily be the larger of the two.

What moves the price

These push the build up:

  • Documents that are hard to read. Scans, handwriting, and tables whose layout carries the meaning.
  • More than one source system. Each one needs a connector and its own sync.
  • Documents not everyone may see. Retrieval then has to filter by the person asking. That is outside the middle tier's list, so the written scoping prices it.
  • Actions as well as answers. Filing, updating or sending something on a user's behalf brings agents, tool calling and human review, which are in the €21,000 tier.
  • Data that must stay on your infrastructure, including open-weights models on your own hardware. I have deployed on Azure, AWS, GCP and on-premise Kubernetes, and the scoping prices that infrastructure work.

These bring it down:

  • One source, clean text. A help center, a wiki, a folder of Word files.
  • Search you already have. If it finds the right documents today, a model answering from its results may be the €4,000 tier.
  • Real questions on day one. A list of the questions your people ask, with the right answers and where they live, is the start of the eval set, and saves the hours spent collecting them.

The running cost moves too. The cheapest model that passes the eval set, fewer and shorter passages once the eval set shows they are enough, and caching for the fixed instructions all bring it down. Choosing where requests are processed can push it up: on Amazon Bedrock and Google Cloud, a regional endpoint, the kind that keeps requests inside one geography, costs 10 percent more than a global one, according to Anthropic's pricing page.

What to ask for in writing

Whoever builds it, me or anyone else, these belong in the written offer before any money moves:

  1. The tier and the price, for your sources. Which systems, which formats and languages, roughly how many documents, and what happens if a new source appears halfway: it gets priced in writing before it is built.
  2. The eval set, and the right to rerun it. Who writes the questions, how many there are, how an answer is judged right, the results at handover, and the script in your repository.
  3. The running cost, with its assumptions. A cost per thousand questions at a named model, the tokens in and out it assumes, and the date the price was read. Plus where the cost of each request is logged, so you can check the monthly invoice against it.
  4. Where your documents and questions go. Which model provider, which region, and what the provider keeps.
  5. What it does when the documents do not answer. It should say so and point to a person, and that behavior should be a case in the eval set.
  6. Ownership, payment and what comes after. The code and the infrastructure in your repository from the start, the payment schedule, the fix window, and who owns the documents from the day the fix window closes.

The service and the scoping

The assistant in this piece is the middle tier of AI applications, integrations and chatbots: Assistant on your own content, €10,500 fixed, three weeks, half to start and half on handover, with 30 days of free fixes after it. The other two tiers, at €4,000 and €21,000, are on the same page with everything they include.

If you are not sure which tier your documents fit, or whether they need an assistant at all, the written scoping settles it for €400, plus VAT where it applies. You send a few paragraphs about the documents and the questions. Within three working days you get back what to build first, what to leave out, the tier, the risks and a fixed price. If it is late, the €400 is refunded and you still get the scope. If the build starts within 60 days of the scope, the €400 counts against its price. All of it happens in writing.

Questions this article answers

  • How much does it cost to build an AI assistant over company documents?

    At my published prices, €10,500, fixed, for the tier called Assistant on your own content: 105 hours at €100, three weeks, with ingestion of your documents, hybrid retrieval tuned on your questions, citations on every answer, an eval set and a deployed web or chat interface. A single model wired into a system you already run is €4,000, and a production application with agents, monitoring, human review and load testing is €21,000. Builds up to €10,500 are paid half to start and half on handover.

  • What does a RAG assistant cost per month to run?

    Mostly the model, which is priced per token. At Anthropic's published prices on 5 December 2026, a thousand questions of about 6,000 tokens in and 500 out cost $0.85 on Claude Haiku 5.5, $17 on Claude Sonnet 5.5 and $34 on Claude Opus 5.5, so 10,000 such questions a month run from $8.50 to $340. Cloudflare's paid Workers plan starts at $5 a month with vector search included, embeddings cost $0.02 per million tokens with OpenAI's text-embedding-3-small, and hosted tracing starts free.

  • Which running costs do companies forget when they budget an AI assistant?

    The person who keeps the documents current. The assistant answers from whatever it is given, so an outdated document produces a confident, cited, wrong answer. Someone has to add and retire documents and read the questions the assistant could not answer. Multiply their hours a week by their hourly cost and by 52: two hours a week is about a hundred hours a year. Rerunning the eval set, and moving to a new model when the old one is retired, are the other two lines that are easy to miss.

  • What should the contract for an AI assistant build include?

    The tier and price for your sources, formats and languages; the eval set, with how answers are judged and the right to rerun it; the running cost per thousand questions at a named model, with the token counts and the date the price was read; which provider and region process your data; what the assistant does when the documents do not answer; and code ownership, the payment schedule, the free-fix window and who owns the documents after handover.