r/LocalAIStack • u/CarstenSpraener • 4h ago
"Oh great, another RAG tool nobody asked for." — Why I built prjxp anyway
During my studies, there was a motto I always liked:
"Wissen heißt, wissen wo es steht."
"Knowledge is knowing where to look."
I've carried that idea with me ever since. And it has become the guiding principle behind a project I've been working on: prjxp.
I recently introduced prjxp in a Discord channel. The immediate reaction was:
"Oh great, just another RAG tool nobody asked for."
Honestly, I can understand that reaction. There are already plenty of tools that put embeddings on top of a vector database, retrieve some chunks and stuff them into an LLM's context window.
But that reaction also made me realize that I hadn't explained what I'm actually trying to solve.
I think there's a distinction worth making:
An AI agent doesn't always need more code in its context. It needs to know where the relevant code is.
That's the idea behind prjxp: help the model navigate a codebase before it starts reading large amounts of source code.
prjxp: a navigation-first approach to code intelligence
prjxp builds two complementary graph representations of a software project:
- A structural AST graph that captures concrete code relationships.
- A semantic graph that connects related code and documentation based on vector similarity.
Both graphs are clustered using the Leiden algorithm. Semantic cluster descriptions are generated using c-TF-IDF, without requiring an LLM during indexing.
But the most important part isn't the graphs themselves.
It's how the agent uses them.
Progressive disclosure: pointers first, source code later
Rather than dumping large chunks of code or entire graph neighborhoods into the context, prjxp follows a progressive disclosure approach:
Level 1 — Orientation
The agent receives compact references: files, symbols, keywords, cluster information and relevant pointers.
Level 2 — Navigation
The agent follows relationships, explores graph neighbors, discovers callers or implementations, and investigates relevant clusters.
Level 3 — Source
Only when it knows what it wants to inspect does it retrieve the actual source code — a complete file, class or method.
The agent remains in control of the investigation. prjxp doesn't try to answer every question itself. It gives the agent a map and tools to explore the project.
Don't fill the context window with code before the model knows why it needs that code.
The HUB mode: the code doesn't have to be on your machine
Another aspect of prjxp that I think is worth highlighting is its HUB mode.
The agent does not need a local checkout of the codebase. The code only needs to be available on the prjxp Hub, where it can be indexed and explored.
This is particularly useful for legacy libraries and unfamiliar dependencies.
Take Apache Struts as an example. I can make the Struts codebase available on the Hub and let a locally running Qwen3.8-27B explore it through prjxp. The model does not need to download, install, or have a local copy of the Struts source code.
This separates code intelligence from the agent's local workspace. The agent gets access to a navigable representation of the codebase and can retrieve source code when needed.
The code is available through the Hub; the agent only needs access to the prjxp interface, not a local copy of the repository.
The benchmark: does this actually help?
I wanted to test whether this navigation-first approach makes a measurable difference, rather than just sounding like a nice architectural idea.
I designed a code-understanding benchmark using two codebases:
- The prjxp codebase itself.
- A separate, real-world legacy codebase.
For each codebase, I prepared nine questions covering structural relationships, architecture, implementation details, documentation and internal logic.
Each question was run three times per configuration. Answers were evaluated against predefined answer keys containing individually verifiable facts and source-code evidence. A blinded LLM judge assessed both coverage and precision.
The resulting score is:
Score = Coverage × Precision
In other words, an answer needs to cover the relevant facts without introducing unsupported claims.
Phase 1: Four retrieval approaches, one model
Before comparing different models, I wanted to understand how different retrieval approaches perform when the model stays exactly the same.
For this experiment, I used Qwen3.8-27B-Splash across four configurations:
- Native tools: grep, glob, read and shell
- prjxp: the dual-graph index accessed through MCP
- Graphify: a code graph using Graphify's
--code-onlymode - Vector search: LlamaIndex and Chroma with standard 1000/100 chunking
The results on the prjxp codebase:
| Approach | Coverage | Precision | Score |
|---|---|---|---|
| prjxp | 0.63 | 1.00 | 0.63 |
| Native tools | 0.60 | 1.00 | 0.60 |
| Graphify | 0.41 | 0.99 | 0.41 |
| Vector search | 0.38 | 0.94 | 0.36 |
In this particular experiment, prjxp achieved the highest score.
The result suggests that combining structural and semantic navigation can offer an advantage over both conventional vector retrieval and a code graph alone.
There are important caveats, though:
- I deliberately ran Graphify with
--code-only. My goal was to compare solutions that can realistically be operated locally, without requiring a separate LLM-based extraction pipeline. Graphify's full LLM-based graph extraction is a different configuration with substantially different resource requirements. So this benchmark does not evaluate Graphify's full GraphRAG capabilities — it evaluates the code-only mode, chosen to keep the comparison within a practical local-first setup. - The vector-search baseline used deliberately simple, non-code-aware chunking. The comparison therefore measures chunking quality as well as retrieval.
- The four-way experiment used an eight-tool-call limit, which later turned out to be problematic for exploratory navigation.
So this is a comparison of four concrete configurations, not proof that prjxp is universally better than every graph or vector retrieval system.
Phase 2: Native tools vs. prjxp, across two models
The next question was whether the observed benefit depends on the model.
I therefore extended the benchmark with DeepSeek-V4.1-Flash and compared both models using native tools and prjxp:
- Qwen3.8-27B with native tools
- Qwen3.8-27B with prjxp via MCP
- DeepSeek-V4.1-Flash with native tools
- DeepSeek-V4.1-Flash with prjxp via MCP
This phase also addressed a methodological problem in the original benchmark.
My earlier measurements used an eight-tool-call limit. That turned out to penalize exploratory navigation: the limit was reached in 24 of 27 sessions in the affected legacy-codebase configuration.
A tool call is not necessarily expensive in itself. What matters more is the amount of context returned by the tool. Limiting the number of calls therefore restricted the very kind of exploration prjxp is designed to support.
I repeated the comparison without a tool-call limit, using a token ceiling and timeout instead. The following results are from that corrected measurement.
Each question was run three times per configuration, giving 27 sessions per configuration and codebase.
Legacy codebase
| Model | Native tools | With prjxp | Change |
|---|---|---|---|
| Qwen3.8-27B | 0.583 | 0.655 | +12.4% |
| DeepSeek-V4.1-Flash | 0.683 | 0.723 | +5.9% |
Both models improved when they had access to prjxp.
For Qwen, coverage increased from 0.609 to 0.655, while precision improved from 0.958 to 1.000.
For DeepSeek, coverage was almost unchanged (0.738 to 0.727), but precision increased substantially from 0.926 to 0.995.
prjxp codebase
| Model | Native tools | With prjxp | Change |
|---|---|---|---|
| Qwen3.8-27B | 0.762 | 0.760 | −0.3% |
| DeepSeek-V4.1-Flash | 0.836 | 0.808 | −3.3% |
Here, prjxp did not help. The results were essentially neutral for Qwen and slightly negative for DeepSeek.
I think this contrast is important. It suggests that the benefit depends on the codebase, rather than prjxp being universally better than native tools.
One possible explanation is that a precomputed structural and semantic map becomes more valuable in a complex or unfamiliar legacy system. In a smaller or already well-understood project, an agent may be able to reconstruct the relevant relationships using ordinary tools without much difficulty.
That's a hypothesis, not a proven general rule.
What about context consumption?
The token numbers from the corrected legacy-codebase comparison are also interesting:
| Legacy codebase | Native tools | With prjxp |
|---|---|---|
| Qwen effective tokens | 175,208 | 96,925 |
| DeepSeek effective tokens | 265,092 | 246,694 |
For Qwen, prjxp reduced effective tokens by roughly 45%. For DeepSeek, the reduction was about 7%.
This doesn't mean prjxp always reduces total context or runtime. The number of exploratory tool calls and the size of their responses matter, and the effects vary between models and codebases.
In fact, in the corrected measurement, prjxp did not consistently reduce response time. The larger MCP tool schema and the additional navigation steps have their own costs.
So the benchmark does not prove that prjxp is always faster, cheaper or more accurate. It provides evidence that navigation support can improve answer quality in at least some codebase scenarios.
Limitations
There are obvious limitations to this evaluation:
- Only two codebases were tested.
- Each codebase has nine benchmark questions, with three repetitions per configuration.
- The four-way comparison of native tools, prjxp, Graphify and vector search used the earlier eight-tool-call limit. Only native tools and prjxp were included in the later uncapped re-measurement.
- Graphify and vector search represent specific configurations, not the full range of possible graph-based or vector-based retrieval systems.
- Qwen ran locally using 4-bit MLX, while DeepSeek was hosted through OpenRouter. Model and infrastructure effects cannot be separated.
- The legacy-codebase results are based on one real project. Its name, domain and technology stack are not disclosed.
The results are therefore an initial evaluation, not a general proof that this approach works better across all projects or models.
Why I care about smaller models
I originally started exploring this because I wanted to make codebase analysis more accessible to smaller local models.
Larger models can often reconstruct a project's structure through repeated grep searches, file reads and tool calls. Smaller models may struggle with that process, especially when the codebase is large or unfamiliar.
My hypothesis was that providing navigation guidance could reduce the amount of orientation work the model has to do at query time.
Some of that work is moved into a deterministic, precomputed index.
The model still decides what matters and what to inspect. It just gets better guidance about where to start and where to go next.
The DeepSeek results were interesting in this respect, too: the benefit was not limited to the smaller local model. The larger hosted model also showed a measurable improvement on the legacy codebase.
So, is this just another RAG tool?
Technically, prjxp does use retrieval, embeddings and a vector index. I'm not trying to pretend otherwise.
But I think there's a meaningful difference between:
- retrieving chunks and asking the model to make sense of them, and
- giving the model a structural map so it can navigate to the relevant code itself.
That's the approach I'm exploring.
I'd be interested in hearing what others think:
When building coding agents, are we spending too much effort on retrieving more context and not enough on helping models navigate to the right context?
Maybe that's what prjxp is really about:
"Wissen heißt, wissen wo es steht."
Not putting all the knowledge into the context window. Helping the agent know where to look.
Project: https://github.com/carstenSpraener/prjxp
Homepage and architecture overview: https://prjxp.spraener.de/
