Google and Anthropic have both pulled document retrieval out of individual applications and turned it into a standalone retrieval service that AI agents call when they need it. Anthropic’s Model Context Protocol exposes retrieval as a tool, and Google places its RAG Engine under the Gemini agent platform, next to MCP servers. The two companies took different routes to the same design.
Why the old retrieval setup broke down
Early retrieval-augmented generation (RAG) was built as a one-time pipeline inside a single app. Developers split documents into chunks, embedded them, stored the vectors, and queried that index. It worked for a demo. Over months it caused two recurring problems.
The first is stale embeddings. An embedding reflects the source at the moment it was indexed. When a document or a database row changes afterward, the index drifts away from the truth and stays wrong until someone reruns the pipeline.
The second is coupled infrastructure. Because the retrieval logic lives inside one application, a second application that needs the same data has to rebuild the connectors, the chunking and the embedding steps from scratch. Teams end up maintaining several copies of nearly identical code.
What a standing retrieval layer does differently
Both problems have the same fix: separate ingestion from querying, and run ingestion as a permanent layer instead of a script. In this design, ingestion runs continuously and uses content-hash sync. Only data that has changed gets embedded again, so the index follows the source without full rebuilds.
That layer sits behind a single API. A support chatbot and a coding agent can then query the same index instead of each keeping a private one.
The agent’s role changes as well. Rather than retrieving once at the start of a request, it treats the layer as a tool inside a loop. It reasons about the question, runs a search, reads what comes back, and issues a refined query if the first result falls short.
- Naive RAG: a one-time pipeline built into one app.
- The standing layer: continuous ingestion behind one shared API.
- The agent: calls that layer as a tool and searches again as needed.
The chunk problem is still there
The new architecture helps, but it leaves a weakness in place. Across all three stages the unit of retrieval is the same thing: a chunk of text. A chunk has no sense of a semantic boundary, a version or a source.
Splitters mostly cut documents by token count. A single chunk can end in the middle of a table or in the middle of an argument. The result is that a search can return the top half of a table without its rows, or a conclusion without the reasoning that supports it. An agent that reads such a fragment may act on incomplete information without knowing it.
One proposed remedy is to change the unit itself. Instead of storing raw chunks, a system can embed a question together with its validated answer. Retrieval then returns something that was checked and is complete on its own, not an arbitrary slice of a page.
Cost grows with shared access
Sharing one index across every app and agent brings a practical concern. If many clients hit the same store, it has to stay fast and cheap as it grows. Memory is the usual bottleneck for vector indexes, since every embedding has to be held and searched.
One engineer who has written about this setup says an index can be made 32 times more memory-efficient, and has published runnable code showing how. The claim comes from that author’s own work, so teams should test it on their own data before relying on it.
What developers should do next
For teams still running retrieval inside each application, the practical move is to audit where that logic lives. If two or more apps repeat the same connectors and chunking, that duplication is the first thing to consolidate into a shared service.
Teams that already use MCP can expose retrieval through it and let agents decide when to call it. Teams on Google’s stack have the RAG Engine option inside the Gemini agent platform. In both cases the open questions are the ones above: how to keep the index current, and whether chunks are the right thing to store.
Expect the next round of work to focus on structured retrieval units and on trimming the memory cost of large shared indexes. The standalone retrieval service is now the default shape for agent systems from the two largest vendors, and the weak points are moving from plumbing to the data format itself.
Source: X (formerly Twitter)