Your AI has read the internet. It hasn't read your price list.

Ask a general-purpose AI assistant what your firm charges for a callout in Crawley, or what your returns policy says about bespoke items, and you'll get a confident, well-written answer. It will probably be wrong. The model has read a large slice of the public internet. It has never seen your price list, your contracts, your job sheets or the email where you agreed a discount with your biggest customer.
That gap is why retrieval-augmented generation, RAG, matters more to a 40-person firm than which model tops this month's leaderboard. A bigger brain doesn't help when the problem is that the brain has never been given the right book.
What RAG actually is
The idea is simple. Before the model answers, a retrieval step searches your own material, picks out the few passages that matter, and puts them in front of the model along with the question. The model then answers from those passages, and can cite them.
Think of it as hiring a very fast librarian for a very well-read assistant. The assistant is good at writing and reasoning. The librarian knows where your files are and who is allowed to see them. Most disappointing company chatbots I've looked at have a fine assistant and a terrible librarian.
Why the 2023 version disappoints
The first wave of RAG tutorials went: chop documents into chunks, turn each chunk into an embedding vector, store them, and at question time fetch the nearest few by vector similarity. It demos beautifully and then struggles in a real business, for reasons that are now well understood:
- Pure vector search is fuzzy on exact things. Embeddings capture meaning, so they're good at "what's our policy on late payment?" and weaker at part number
HX-2201-B, a customer's postcode or a contract clause number. Keyword search (BM25, the long-standing workhorse behind most search boxes) is precise on exactly those. - The right passage often arrives, just in the wrong place. Retrievers compress each document into one vector or bag of terms and lose detail. Redis gives a telling illustration: of 50 retrieved chunks, the current documentation page sat at position 23, and the model answered from a deprecated one.
- More context is not free. Research from Stanford and others on "lost in the middle" found models do best when the relevant information is at the start or end of the context and worse when it's buried in the middle. Stuffing in everything, even with today's long context windows, can make answers worse and costs more per question.
- Permissions get forgotten. If the index holds HR files and the chatbot can see everything, so can everyone who asks it.
What good looks like now
The pattern the search vendors and practitioners have converged on looks like this:
- Hybrid first-stage retrieval. Run keyword and vector search side by side and merge the results, usually with reciprocal rank fusion (RRF). Elastic and Redis both now ship this as a built-in operation. Postgres, SQL Server and Azure AI Search can all do some form of it.
- A reranker. Take the top 50 or so candidates and re-score them with a model that reads the question and each passage together (a cross-encoder). This is slower per item but far more precise, and small open models do the job well. Budget for tens to low hundreds of milliseconds, and measure on your own data.
- Keep the context short and well ordered. Send the handful of passages that matter, best first.
- Retrieval as a tool the agent calls. In agent-based systems the model decides when to search and what for, and retrieval becomes one tool among several, often exposed over MCP, which I've written about before. Elastic's phrase for this is that search "isn't dead, it's just moved".
- Search as the user. Retrieval should run with the asking user's permissions, with document-level security, so the agent can only see what that person could.
- Measure it. Build a set of 50 real questions with known good answers from your own staff, and run it every time you change chunking, models or rankers. Without that you're tuning by feel.
The .NET picture
For the C# shops I mostly work with, the building blocks have settled down this year. Microsoft.Extensions.AI gives you IChatClient and IEmbeddingGenerator so you aren't tied to one model provider. Microsoft.Extensions.VectorData gives a common abstraction (VectorStore, VectorStoreCollection, attributes such as [VectorStoreVector], LINQ filters) over stores including Azure AI Search, SQL Server, PostgreSQL, Qdrant, Redis, Cosmos DB and SQLite. Microsoft Agent Framework reached 1.0 in April 2026 and includes an AIContextProvider hook that runs before each agent turn, which is the natural place to put your retrieval step.
Two cautions. Microsoft's own blog and Learn pages currently name the connector packages differently, so check NuGet before you pin versions. And the abstraction doesn't hide whether your chosen store supports hybrid search well; that's a decision about the database.
Why this is a small and mid-size business issue
Large firms have search teams. A 60-person engineering consultancy in Kent or a facilities firm in Brighton doesn't, yet its knowledge sits in exactly the places a naïve chatbot can't reach: SharePoint folders, a job management system, PDFs of past bids. That knowledge is the firm's real edge, and it's the one thing a competitor's off-the-shelf AI tool can't have.
The firms that get the librarian right turn twenty years of past bids into faster, more accurate quotes. The ones that don't either ship a chatbot that confidently invents policies, which is a reputational risk and, if it touches personal data carelessly, a UK GDPR one, or give up on AI as "not ready for us". Both outcomes leave them behind the firm down the road that took the quieter, more careful route.
Where I'd start
Pick one bounded body of knowledge with a clear owner: the technical specs, the HR handbook, or past bids. Get it into a store that does hybrid search. Add a reranker. Write the 50-question test set with the people who'd otherwise answer those questions. Respect existing permissions from day one. Only then put a chat interface on it.
I'm building a .NET RAG system of my own at the moment and the lesson keeps repeating: the retrieval is the product. If you'd like a second pair of eyes on yours, or help choosing where to start, that's what I do as a fractional architect: cheesesharp.com
Andrew Cheeseman