Skip to content

Neural networks and AI

RAG finds, full context decides

Retrieval finds the closest match; judgement needs the whole picture. Why I send the full CV instead of top-k chunks, and when I still use RAG.

Neural networks and AI17 July 2026Updated: 4 min read

RAG is for finding. Full context is for deciding.

The advice in 2026 is settled: chunk your documents, embed them, retrieve top-k, feed those to the model. Don't waste context. Don't waste tokens.

I built a system that deliberately does none of that. Every query gets the expert's entire CV: 69 projects, publications, education, languages. Roughly 34,000 characters, in full, every time.

Here's the reasoning, because it wasn't laziness.

The task decides the architecture

The system finds UN tenders for one specific expert. Every day it crawls 28 sources, normalises and deduplicates thousands of procurement notices, then answers one question per tender: does this person fit?

That looks like retrieval. It isn't. It's exclusion.

  • Retrieval asks: what in this corpus is most similar to the query?
  • Exclusion asks: is there anything here that disqualifies this?

Those are opposite operations. The first wants the strongest matches. The second needs the weakest link, and by definition, the weakest link is the thing least similar to everything else.

Why similarity would have failed

A real pattern from the data.

A tender is titled Public Financial Management. The expert has a dozen public-finance projects. Cosine similarity between tender and profile: very high.

# what a RAG pipeline does here
chunks = retrieve(query=tender.description, corpus=cv_chunks, k=3)
# returns: finance_project_2019, finance_project_2021, education_economics
# verdict: strong match

The tender is for an environmental officer. It says so once, on page five, in the responsibilities section.

Or: the role fits perfectly, but requires a national consultant with a mandatory local language. One sentence, buried in eligibility.

The disqualifying detail is never the semantically closest passage. That's exactly what makes it disqualifying: it's the part that doesn't match the pattern. A retrieval system is optimised to not surface it.

What chunking destroys

Split a CV into chunks and you keep the facts but lose the shape.

Retrieve three chunks about public finance and the model sees an expert in public finance. Send all 69 projects and the model sees which countries he's actually worked in, which languages he actually has, what seniority he operates at, and, critically, what he has never done.

Absence is information. And absence cannot be retrieved. There is no chunk that says "this person has no environmental background". You only learn it by reading everything and noticing nothing is there.

RAG can tell you what's in a document. It can't tell you what isn't.

The economics I was told to fear

34,000 characters is roughly 9,000 tokens of context per judgement. Multiplied by hundreds of tenders a day, this is supposed to be the expensive mistake.

It isn't. The AI and the proxies together run on a few dollars a month.

Two reasons:

1. The prefilter does the cheap work first. Stop-words, theme, territory, language, deadline, expired: all in code, no model calls. The AI only ever sees candidates that survived the rules.

# rules run first, model runs last
candidates = [t for t in tenders if passes_rules(t)]   # cheap
verdicts   = [judge_with_full_cv(t) for t in candidates] # expensive, but few

2. The CV is byte-identical on every call. Same prefix, over and over: the ideal shape for prompt caching.

The panel tracks cost per run and cost per found tender, so this isn't a guess. I watch the number.

The generalisable lesson: token cost is a real constraint, but it's one people apply from memory rather than measurement. Prices moved. Most RAG pipelines I see were designed for an economics that no longer exists.

What the model returns

Not prose. A structured verdict, logged in full:

{
  "fits": false,
  "short_reason": "requires national consultant, local language mandatory",
  "long_reason": "The role matches the expert's PFM background, but eligibility restricts applicants to nationals with working Portuguese...",
  "country": "Mozambique",
  "tor_attached": true
}

It judges the substance of the role, not its title. That's the entire point.

When I would use RAG (and I do)

This is not an argument against RAG. It's an argument against defaulting to it.

RAG is right when:

  • the corpus is unbounded: a knowledge base that grows forever, docs, support history
  • latency matters
  • the task genuinely is retrieval: find the passage, answer from it

I use RAG on other projects for exactly those reasons. Different task, different shape, different answer.

The honest caveat on my side: long context isn't free of problems either. Models attend less reliably to the middle of a long prompt than to its start and end. 34k characters sits comfortably inside what current models handle well. At 300k I'd be having a different conversation, and I'd probably be building a hybrid.

The rule I ended up with

Ask what the model has to do with the document.

  • Find something → retrieve. The corpus can be enormous, and finding is what embeddings are good at.
  • Judge something → give it everything. Judgement needs the whole picture, including the parts that aren't relevant, because irrelevance is half the verdict.

Most business tasks people are wiring RAG into are judgement tasks wearing a retrieval costume. Does this candidate fit. Is this contract risky. Should we bid on this. In every one of those, the thing that decides the answer is the detail nobody would have retrieved.

Related reading

Questions and answers

Why does the tender matching system give the model the whole résumé?

Each request gets the expert's entire résumé: 69 projects, publications, education and languages, about 34,000 characters. The system's job is judging whether the person fits, and to judge, the model needs the whole picture, including what the résumé lacks.

How does retrieval differ from exclusion?

Retrieval searches the corpus for what looks most like the query. Exclusion searches for what disqualifies. These are opposite operations: the first needs the strongest matches, the second the weakest link, which by definition looks least like the rest.

How many UN tender sources does the system crawl every day?

Twenty-eight. The system normalizes and deduplicates thousands of procurement notices and, for each tender, answers one question: is this expert a fit.

Why does cosine similarity fail at selecting tenders?

A Public Financial Management tender and a dozen projects by a public finance expert give very high similarity. But the tender may require an ecologist, mentioned once on page five, or a national consultant with the local language. RAG will return the finance projects and decide the match is strong.

Why doesn't the disqualifying detail surface in top-k?

It is never the semantically closest fragment: that is exactly why it disqualifies, it's the part that breaks the pattern. A retrieval system is optimized to surface similar things and hides just this kind of detail.

What does a résumé lose when split into chunks?

The facts stay, the shape is lost. Three chunks about public finance show the model a finance expert. All 69 projects show where he actually worked, which languages he speaks, what seniority level he works at and what he has never done.

Why doesn't RAG notice missing experience in a document?

There is no chunk saying "this person has no experience in ecology". You can only learn it by reading the whole document and noticing that such experience isn't there. RAG tells you what the document contains, but not what it lacks.

How much does it cost to give the model 9,000 tokens for every tender?

About 34,000 characters is roughly 9,000 tokens per judgment, multiplied by hundreds of tenders a day. In practice AI and proxies together cost a few dollars a month, and the dashboard calculates the cost of a run and the price of each tender found.

How does the prefilter cut model costs?

The cheap work is done by code with no model calls: stop words, topic, territory, language, deadline, expiry. The model only sees candidates that survived these rules, so there are few expensive judgments with the full résumé.

Why does the full résumé cache well in the prompt?

The résumé is byte-for-byte identical on every call. The same prefix repeats again and again, which is the ideal shape for prompt caching: the repeated part of the prompt costs less.

In what form does the model return its verdict on a tender?

As structured JSON that is logged in full: fits, short_reason, long_reason, country and tor_attached. For example, fits: false with the reason "a national consultant is required, local language is mandatory". The model judges the substance of the role, not its title.

When is RAG still needed?

When the corpus is unbounded: a knowledge base, documentation or support history that grows endlessly. When latency matters. And when the task really is search: find a fragment and answer from it. The author uses RAG on other projects for exactly these reasons.

What are the limits of long context?

Models retain the middle of a long prompt worse than the beginning and the end. 34 thousand characters fit within what current models handle well. At 300 thousand, the author would most likely build a hybrid of search and full context.

How do you decide between RAG and full context?

Ask what the model must do with the document. Finding something means retrieval: the corpus can be huge. Judging something means giving it everything, because irrelevance is half the verdict. Candidate matching, contract risk and tender participation are judgment tasks.

Related service

01 AI & automation

Automation from €490 including IVA: AI agents and service integrations.

View the service

Shall we discuss your project?

Calculator request

Leave your contact


    

GeoScan ·

AI search check

Loading the page

Web studioValencia

New services

Ads in ChatGPT

Can ChatGPT see your website?

GeoScan: 172 checks in 8 groups, an answer in 10 seconds, free.

Get in touch

WhatsApp Telegram +34 624 363 806
+34 624 363 806