My AI Loop Runs on Vectorless RAG and I Didn't Call It That
I build with an AI loop, and the loop only works if a session that remembers nothing can find the right file by itself. That finding step is retrieval. Mine reads a table of contents instead of a vector index, and it is why the loop runs on so little effort from me.
I build with an AI loop. A session starts blank, orients itself, picks up a plan, does the work, checks it and leaves a note for the next session, whether the session is Claude, Codex or OpenCode. The loop only works if a session that remembers nothing can find the one file that applies, out of thirty-odd standards, without me standing there pointing.
For months I called that keeping good docs. The AI world calls it vectorless RAG, a name I met in a LinkedIn post by Shivani Virdi. This note covers what it is and why it makes my loop cheap and good to run. The tool-by-tool setup lives in a companion note.
The short version
The name is bigger than the idea. Vectorless RAG means pointing your agent in the right direction. You build it a map, a contents page that says what lives where, and it uses the map to find what it needs on its own.
Left: the agent guesses through a pile. Right: it reads the map and opens the one file it needs.
What RAG is
A language model knows what it learned in training and what is in the prompt right now. It has never seen your syllabus, your wiki or your repository, so if you ask about them it guesses, fluently, which is the worst way to be wrong.
Pasting a document into a chat and asking about it is RAG by hand. Retrieval-augmented generation automates the pasting: a program picks the pages most likely to hold the answer, puts them in the prompt beside your question, and the model answers from them. The name comes from a 2020 paper by Patrick Lewis and colleagues.
RAG in four boxes. Every RAG system has all four. The ink box is where they differ, and it is the whole argument of this note.
Support bots search help centers, company assistants search wikis, coding assistants search repositories. Mine is an AI loop that builds software, so it searches my standards, plans and code. That is retrieval for an agent that works, not for a chatbot that answers, so it has to be right at the start of every session with nobody watching.
Two ways to pick the pages
The usual way is to find what looks similar. Cut the documents into chunks, turn each chunk into a list of numbers so that similar meaning gives similar numbers, turn the question into numbers the same way, and fetch the nearest chunks. That works even when the question and the answer share no words. The weakness is that close in meaning is not the same as the right page: a question about this year's revenue sits near every paragraph about revenue, last year's included. When the answer is wrong, the reason is a distance between two lists of numbers. The companion draws the steps.
The other way is to read the contents page. You give the model a tree of sections, each with a title and a short summary. It reads the top, picks a branch, and keeps going until it reaches the page with the answer. No embeddings, no vector database.
The same job done two ways. Left: the nearest chunks win. Right: the model chooses a branch at each level, for a reason it can say out loud.
Two real versions exist. PageIndex, an open-source project, builds the tree for you. Claude Code skips the index and searches live with glob, grep and file reads. Mine is closest to PageIndex, with the tree written by hand. The companion has the details, including a benchmark claim I would not repeat without running it. Shivani's post draws the same line and is fair to both sides: she says vectorless RAG breaks on flat text and on corpora too big for the context window, and that most production systems end up using both kinds.
I thought I was just being tidy
None of this started as retrieval, or as a loop. I am disorganized and the AI is not, and I needed it to find things without me pointing.
Every repo opens with a CLAUDE.md, and the harness loads it first. Mine has a section called Start here, a numbered reading order of ten entries, each a line on what it is and when to open it. That is a table of contents written as onboarding for a new teammate.
I do not only work with Claude, so the file has a second name. AGENTS.md is the open convention other tools read, Codex and OpenCode among them. Here it is a symlink to CLAUDE.md, as it is in the standards folder, PANTRY and GRAIN, and my global instructions link the same way. One contents page, however many readers. The Loop Outlives the Model tells that story.
I was not building a retrieval system. I was writing a table of contents for a reader who reads every word and remembers none of it tomorrow.
The map, in one picture
Once I saw the root, every other layer was something I had built for a different reason.
The tree my sessions walk. The root and the branches are built from files I wrote for other reasons. The dashed box is the part with no tree.
- Skills are the named sections: 29 standards, each with a one-line description of when to read it.
- Code graphs (graphify and tokensave) answer where something is defined and what calls it, with no model involved.
- PANTRY is the project's contents page: what is in flight, what waits on me, what drifted.
- A CLAUDE.md per folder is a subtree that loads when a session first reads a file inside it.
The companion gives each layer its own section.
What one question costs
Here is one real question: can I put a backtick in a note? CLAUDE.md points at the voice standard, its skill description says to read it before any prose with my byline, the standards index lists its sections, and the session opens one of them, lines 159 to 194. The answer is no, not in prose. I traced that by hand from the index, not from a log. The companion draws the walk.
The same file read two ways, one scale. The lit band is everything the question needed. A snapshot of 2026-11-26, counted from the repo.
Opening the voice standard whole reads 49,380 characters. Opening only the section reads 2,848, which is 5.8 percent of the file and 0.6 percent of all the standards together (489,462 characters). The tree is not free, because the 14,257 characters of skill descriptions ride along in every session. What it buys is that the expensive part is read one section at a time.
What it does for the loop
One lap of my loop. The ink box is the retrieval step, and it is the only box this note is about.
The savings are the part I can measure. They are not why I keep it. I keep it for what I no longer do:
- I do not brief a session. I give one line of what I want, and it finds the standard that applies.
- I do not carry state between sessions. A session that stops leaves a resume card in its plan, and the next one, in any of the three tools, starts there.
- I do not babysit the index. A hook refreshes the code graph after every edit, and a check at session start says when a skill or the graph has fallen behind its source.
- I do not guess where it went wrong. I ask which file it read, and the answer is a path. That is watching its hands.
It makes the loop better as well as cheaper. Every session starts from the same standards, so it follows my voice rules because it reads them and not because I remembered to paste them in. A fix compounds: when a session picks the wrong file I reword one description, and every later session in every repo picks better. And the loop survives a switch. When I ran out of Claude mid-task, Codex finished the work on the same branch without a changed instruction, which is the story in The Loop Outlives the Model.
So I steer and I review, and I rarely re-explain. That is what I mean by low effort, and it is my experience, not a measurement. I have not timed sessions with the tree against sessions without it, and every number in this note measures reading, not effort.
Why this kind fits a loop
Nobody chose this. It grew out of onboarding docs, and I only held it up against the alternatives afterward. It fits for reasons about what my loop needs, not about vectorless being better in general:
- The library is small and already has headings. Thirty-one standards and a contents page. Vectors earn their place when there is far more text than a model can scan and no structure to follow.
- A wrong pick is something I can fix. I reword one line of a description. A wrong similarity hit is a distance between two lists of numbers, and there is nothing there to edit.
- It costs nothing to keep, and every tool can read it. The pages are files I write anyway, and Claude, Codex and OpenCode all read plain Markdown and a symlink.
Best is the wrong word. It fits my size and my kind of material, and the decision chain in the companion says where it stops fitting. I have not benchmarked it against a vector index on my own files.
Where it runs out
- Every drill-down is a read. A session walks CLAUDE.md, then a skill, then the file before it has done any work. That is cheap on a big question and silly on a trivial one.
- The tree has to fit. Twenty-nine descriptions work because they are short. PANTRY's index is already bigger, 18,203 characters against 14,257, and it grows with every plan.
- Some of it is not a tree. There are 38 notes in this folder, plus run reports and finished plans in their own. When a session needs to know whether I have already written about something, it has grep and my memory, and my memory is the reason this whole setup exists.
That flat pile is where similarity would earn its place. I have not built that half, and I am labelling it a guess.
The name was the only part missing
I would still describe all of this as "I keep good docs," and I would still be telling the truth. Good docs, written for a reader who reads every word and forgets them by tomorrow, turn out to be a retrieval system with the serial numbers filed off. Other people gave it a name, a benchmark and a GitHub repository. My version has a longer story behind it, and a symlink.
The table of contents was already there.
Sources
What the claims above rest on, and what I did and did not check.
- Patrick Lewis and colleagues, Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks, NeurIPS 2020. The paper that named RAG.
- The AGENTS.md convention. The symlinks are checked in this repo, the standards folder, PANTRY and GRAIN, and in the global links for Claude, Codex and OpenCode.
- PageIndex, the Cherny interview and Anthropic's contextual retrieval are cited in the companion, with what I checked.
- Shivani Virdi, a LinkedIn post, November 2026. It is where I met the name "vectorless RAG", and why I went looking. I read the post, and the primary sources are what the claims rest on.
- The loop, effort and resume-card claims are my own experience of running it, and they are not measured. The counts and character figures are from my own repository on 2026-11-26.
The judgment is human. The typing, by design, is not.