RAG Demoted to a Sensor

SF Scott Farrell July 13, 2026 scott@leverageai.com.au LinkedIn

Agent memory architecture

RAG Demoted to a Sensor

When you already have a wiki and a vector index, the hard problem is not “which one wins.” It is how they compose — without stuffing raw chunks into the main agent’s head.

TL;DR

  • Demote RAG from substrate to sensor: one retrieval axis beside wikilinks, bronze grep, and time.
  • A backend search agent runs the axes and returns shaped, typed results — never raw paragraphs into the main agent.
  • Similarity-warranted hits rank below concluded-edge hits. Different warrants, different weight. That is the trust architecture.
  • Load-bearing RAG hits become candidate edges for the janitor. The graph absorbs what rhyming keeps finding. RAG’s job shrinks by design.

I almost shipped the wrong interface.

I already had a wiki tool that walks claims and edges. I was about to hang a second tool on the main agent: “run a RAG search.” It would have returned paragraphs — chunks — straight into the conversation context. Classic stack. Tutorial-complete. Wrong.

The fix was a demotion, not a deletion. Put similarity behind the wiki search. Give it to the backend agent that already rummages the graph and the bronze. Do not present the paragraphs. Do not present the chunks. Treat RAG as just another axis.

RAG stops being an architecture and becomes a sensor — one more axis alongside wikilink traversal, bronze grep, and time.

That sentence dissolves a fight most teams are still having. The substrate question — which corpora should be a wiki versus a vector index — is real, and it has its own rule of thumb: query shape × reuse × loss tolerance, settled elsewhere.1 This piece is the next problem: you already have both. How should they compose?

The hybrid that isn’t a hybrid

Most “wiki + RAG” stacks are two co-equal tools bolted onto one orchestrator. The main agent calls vector search, gets slabs of similar text, and tries to reason while swimming in them. Or it calls the graph, gets a walk, and still pastes chunks “for coverage.”

That is not composition. That is competition for attention.

Original RAG was designed as non-parametric memory for language generation: retrieve, augment the prompt, generate.2 That pattern fits chat turns and single-shot Q&A. Agent work is different. Agents need to traverse relationships, hold state across steps, and not re-derive the same join every time someone asks a multi-hop question. That is why agents need a wiki-shaped memory in the first place.3

Vector search still matters. It finds semantically adjacent material when no edge exists yet. What it does not do is know how facts connect.4 Similarity is a real capability with a limited warrant. Treat it like a smoke detector, not like the building’s structural steel.

Multi-axis search: every axis is a sensor

The moment that made the demotion obvious was not a vector leaderboard. It was a missed axis in a walk I thought I understood.

We were reconstructing how an agent had found an old internal email that corroborated a claim — a pivot that never made the client proposal. I narrated the graph path. Someone pointed out I had skipped the date axis.

The pivot was foundational. Foundational ideas predate the proposal. The proposal has a date. The client relationship has a start. That is a bounded window. Add the client name (entity), the email corpus (source), and a multi-decade archive collapses to a short set of bronze records — small enough that a grep is decisive in both directions. Presence and absence both become honest.

That temporal bound was not a filter bolted on after retrieval. It was a causal ordering heuristic used as a search plan: ideas precede artifacts. Date, subject, corpus, wikilink, bronze grep, similarity — each axis is a sensor with its own warrant. Stack them and the search becomes reasoning about how evidence was laid down, not a single similarity lottery.

Sensor rack (not a product checklist)

  • Wikilink / edge walk — concluded relationships; highest structural warrant
  • Time — causal and chronological bounds
  • Subject / entity — who and what the question is about
  • Corpus / source class — which store is allowed to answer
  • Bronze grep — exact-ish off-road access to full text
  • Similarity (RAG) — recall net under the graph; finds what has no edge yet

Chunks never touch the main agent

The double tax of query-time discovery is well named: you pay once to re-infer relationships from loose chunks, and again when the bloated payload dilutes attention.5 Models do not use long contexts uniformly. Performance can collapse when the useful span sits in the middle of a long stack,6 and frontier systems get less reliable as input length grows — even on simple tasks, well inside advertised windows.7

So the hard rule is simple:

Hard rule

Do not present the paragraphs. Do not present the chunks. Similarity never writes raw text into the main agent’s context.

The backend search agent does the messy work. It walks edges, greps bronze, runs a vector pass on a few terms, and returns a shaped result: wiki references, short summaries, pointers, and — if similarity found something the graph missed — a typed hit at lower rank. The main agent inherits curated signal, not exploration sludge. That matches the broader discipline of keeping structured memory and re-fetchable tool output outside the long-lived decision window.8

Industry hybrids often weave graph features into retrieval itself.9 Fine — when that is the product you are building. If your primary substrate is already a navigable wiki, the composition move is different: keep the graph as the map, demote raw similarity to a sensor under it, and type every route so the senior agent knows what it is holding.

Type discipline: the typed-result schema

Trust is not “the vector score was 0.82.” Trust is knowing whether a result arrived via an edge someone concluded or a vector that merely rhymed. Same discipline as derived cache pages: guesses are typed and ranked below sources.10

Here is the minimum shape the backend should return — enough for the main agent to weight, cite, and escalate, not enough to recreate the double tax.

Field Concluded-edge hit Similarity-warranted hit
warrant edge (typed relationship id + label) similarity (embedding index + score band)
rank_band High — prefer first Low — never above edges on the same question
payload Page id, claim gist, edge path crumbs Source pointer, 1–3 sentence gist — not full chunk text
support Links to bronze / source pages Links to raw document spans (for double-click, not stuffing)
escalation Optional: contradiction edges Optional: candidate_edge: true if used load-bearing in the walk

Sketch: shaped response (illustrative)

hits[0] warrant=edge · rank=1 · “proposal ↔ client project (concluded 2024)” · path=…
hits[1] warrant=edge · rank=2 · “project ↔ internal deliberation thread”
hits[2] warrant=similarity · rank=9 · “nearby email span may corroborate pivot language” · candidate_edge=true · pointer=bronze://mail/…
note main agent sees gist + warrant only; full text stays behind the pointer

If the main agent cannot tell those rows apart, you do not have a hybrid architecture. You have vibes with two indexes.

Absorption: RAG proposes; the graph keeps

Sensors that only read forever are a tax. The composition closes when a load-bearing similarity hit becomes a candidate edge for the janitor — the same “query is a write in disguise” loop as filing walks back into the map.10

Worked example (from a real pattern, not a fake dashboard)

Before. Certifications live in a dump-ground store. Pricing relationships between successive certs never existed as a schema column. Every few months someone asks “what certs do I have / what discounts applied?” The backend vector pass (or a lucky bronze rummage) surfaces an email: Lotus Notes 5 exam discounted 50% because of the Notes 4 cert. Useful. Fragile. No edge. Next quarter, same discovery tax.

During. A walk marks the similarity (or grep) hit as load-bearing — the answer depended on it. The shaped result sets candidate_edge: true. Telemetry of the walk goes to the janitor queue: propose cert:LN4 —qualifies-for-discount→ cert:LN5 with support pointers to the email and the cert record.

After. The edge is filed at the appropriate type and rank. The next query resolves primarily via graph walk. Similarity may still fire as a safety net; it is no longer the only way to know. You did not “migrate the RAG corpus.” You absorbed one recurring rhyme into structure.

That is the design property people want when they ask for a “RAG-hit-share declining over time” chart. If the absorption loop is running, the share of answers that depend on similarity should trend down for stable regions of the graph. Measure it if you instrument typed warrants. Do not invent a percentage to look scientific. The architecture earns the curve; the curve does not invent the architecture.

Writable, consolidating memory is the direction agent systems are already being pushed toward in the wider literature — remember outside the window, reduce re-token cost next time.11 Filing edges from sensors is the same instinct with typed provenance attached.

What this is not

  • Not a re-litigation of which corpus should be wiki versus RAG. That is the substrate rule.1
  • Not a full treatment of walk telemetry and derived-page filing mechanics. That is File Back the Walk.10
  • Not “RAG is dead.” Demotion keeps the sensor. It forbids the main agent from drowning in it.

Build checklist

  1. Expose one search tool to the main agent: multi-axis, backend-owned.
  2. Implement sensors with explicit warrants: edge, time, entity, corpus, grep, similarity.
  3. Return shaped results only — gists, ids, paths, pointers.
  4. Type every hit; rank similarity below edge.
  5. Ban raw chunk injection into the main context (hard fail in code review).
  6. When a similarity hit is load-bearing, enqueue a candidate edge for the janitor.
  7. Log warrant mix per query so you can later observe whether absorption is shrinking the sensor’s share — without faking the number today.

Closing

The wiki-versus-RAG argument was always slightly the wrong altitude once both systems exist. The useful move is demotion: similarity as a recall net under the graph, typed and ranked, never allowed to impersonate a concluded edge, never allowed to dump its guts into the senior agent’s attention budget.

Put RAG behind the wiki search. Keep the chunks offline. Let the janitor promote what keeps proving itself. The graph gets denser. The sensor’s job gets smaller. That is composition with a trust architecture — not two retrieval products arguing in the same context window.

Related: Don’t Migrate Your RAG to a Wiki (substrate choice), RAG Was Built for Chatbots — Agents Need a Wiki (why agents need a map), File Back the Walk (absorption loop).

References

  1. LeverageAI. “Don’t Migrate Your RAG to a Wiki.” — Substrate choice is per corpus by query shape × reuse frequency × loss tolerance; stratification over blind migration. https://leverageai.com.au/dont-migrate-your-rag-to-a-wiki/
  2. Lewis, Patrick et al. “Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks.” arXiv:2005.11401 — “models which combine pre-trained parametric and non-parametric memory for language generation.” https://arxiv.org/abs/2005.11401
  3. LeverageAI. “RAG Was Built for Chatbots — Agents Need a Wiki.” — Agents need traverse, write-back, durable state, and compound; RAG is chat-native single-generation memory. https://leverageai.com.au/rag-was-built-for-chatbots-agents-need-a-wiki/
  4. Neo4j. “How to improve multi-hop reasoning with knowledge graphs and LLMs.” — “Vector search retrieves semantically similar content but lacks awareness of how facts are connected.” https://neo4j.com/blog/genai/knowledge-graph-llm-multi-hop-reasoning/
  5. LeverageAI / wiki concept query-time-discovery. — Double tax: discovery round-trips plus payload dilution (Lost in the Middle / Context Rot). Anchored to The Index Is the Data line of work; external evidence in refs 6–7.
  6. Liu, Nelson F. et al. “Lost in the Middle: How Language Models Use Long Contexts.” TACL 2024 / arXiv:2307.03172 — “performance can degrade significantly when changing the position of relevant information.” https://arxiv.org/abs/2307.03172
  7. Hong, Kelly et al. / Chroma Research. “Context Rot: How Increasing Input Tokens Impacts LLM Performance.” 2025 — Evaluating 18 LLMs: “performance grows increasingly unreliable as input length grows.” https://www.trychroma.com/research/context-rot
  8. Anthropic. “Effective context engineering for AI agents.” — Structured note-taking / agentic memory persists notes outside the context window; related cookbook guidance on clearing re-fetchable tool results. https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents
  9. Guo, Zirui et al. “LightRAG: Simple and Fast Retrieval-Augmented Generation.” arXiv:2410.05779; Edge et al. “From Local to Global: A Graph RAG Approach…” arXiv:2404.16130 — Industry graph+retrieval hybrids improve multi-hop / dual-level retrieval; cited as adjacent pattern, not identical to sensor demotion. https://arxiv.org/abs/2410.05779
  10. LeverageAI. “File Back the Walk.” — A query is a write in disguise: typed derived cache, walk telemetry, janitor feeds for missing edges so the map improves from use. https://leverageai.com.au/file-back-the-walk/
  11. Chhikara, Prateek et al. “Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memory.” arXiv:2504.19413 — Writable consolidating memory direction for agents (quality / token-cost claims as reported by authors). https://arxiv.org/abs/2504.19413

Discover more from Leverage AI for your business

Subscribe to get the latest posts sent to your email.

Leave a Reply

Your email address will not be published. Required fields are marked *

© 2026 Leverage AI, Scott Farrell. All rights reserved. This content is made available on a limited, revocable, read-only basis only. No licence or right is granted to copy, reproduce, republish, scrape, store, adapt, summarise, index, embed, or use this content to create derivative works, work product, deliverables, methodologies, training materials, prompts, templates, software, services, research, or commercial outputs, whether by humans or machines, without prior written permission. This restriction includes internal business use, client work, consulting, advisory, implementation, and any use in or for artificial intelligence, machine learning, data extraction, retrieval, evaluation, fine-tuning, or knowledge-base construction.