Appearance
Nearest neighbor is a weak proxy for usefulness
In-context learning let spoken language understanding skip fine-tuning entirely: drop a handful of labeled utterances into the prompt and let the model label the input. The catch sits in the retriever. Query-based retrieval returns utterances that read like the input, and they often carry a different intent. "Book a flight to Berlin" and "Book a table for two" sit close together in embedding space and mean completely different things to a slot-filling system.
APEX attacks that mismatch with two stages. Stage one picks candidate intents from intent-level prototypes. Stage two retrieves exemplars inside the chosen intent space. On SLURP, measured by joint exact match accuracy, the restructure moved the score 4.34 points with Qwen3 4B and 3.97 points with Gemma-3-4B on full transcripts. Joint exact match requires the intent and every slot to be correct simultaneously, so four points means several percent more utterances get parsed right on the first pass, with no fine-tuning and no new training data.
The gap widens when input quality drops. On high-perplexity transcripts, APEX gained 7.66 points with Qwen3 4B and 2.13 with Gemma-3-4B. That asymmetry is the part worth studying. One model converts noisy ASR into a large retrieval win, the other barely moves. If your pipeline runs on messy transcripts, measure which of your models actually benefits before you pay for the extra retrieval stage.
Quick take: all four systems below win by changing the retrieval unit before anyone touches the generator.
GRAC: retrieve graph-caption pairs, then compare interactions
Surgical operative reports feed documentation, training, and workflow review, and pulling anything useful out of them currently takes manual review by someone with clinical training. GRAC represents a surgical scene as a graph over instruments, actions, and anatomical structures. Given an input scene graph, it retrieves relevant graph-caption pairs from training data, compares instrument-tissue interactions between the retrieved examples and the input scene, and uses those comparison features to condition the retrieved caption representations during generation.
On EndoVis-18, GRAC scored a CIDEr-D of 5.88 against 4.23 for SGT and 3.36 for the strongest conventional Transformer. Those absolute values look tiny next to image-captioning leaderboards, which is expected: surgical captions are short, formulaic, and clinically constrained, so the metric has little room to move. Read the relative jump instead. GRAC sits roughly 39% above SGT on the same benchmark with the same evaluation harness.
The accuracy number matters more for real use. Exact triplet-set accuracy hit 52.6% against 32.7% for SGT and 26.2% for the Transformer baseline. Just over half of generated descriptions now name the correct instrument, action, and anatomical target as a set, up from about a third. For a reviewer skimming generated text during documentation, that difference decides whether the output saves time or creates rework. On TORS, a different procedure mix, GRAC reached 5.06 against 3.80 for the strongest baseline, which says the gain isn't tied to one dataset.
The same shape shows up in four different domains
Strip the domain language and the pipelines converge.
Every one of these systems converts the input into something with explicit parts, retrieves on a signal that matches the task, then compares the input's structure against the candidate's structure before generating. The retrieval unit changes per domain. The comparison step is the constant, and it's where the gains come from. Text similarity tells you two things are about the same topic. Structural comparison tells you whether two things do the same job.
Competitive programming: retrieval needs a control group
The competitive programming work builds an embedding-based retriever with a similarity search over a database of prior problems, plus a dynamically adjusted threshold to cut retrieval noise. It evaluates on CodeContests, restricted to test problems that resemble instances from the training split, under three conditions: description only, description plus randomly chosen training examples, and description plus similar examples from the proposed retriever.
The random-example arm is the piece most RAG evaluations skip, and it's the one that decides whether you have anything. If random examples lift the pass rate nearly as much as retrieved ones, you're buying tokens rather than information. Competitive programming makes that failure expensive, because a wrong algorithm in the prompt is worse than an empty prompt: the model commits to it and writes forty lines of confident nonsense.
The threshold exists for the same reason. Fixed top-k always returns k neighbors, including the ones with no real relationship to the input problem. A dynamic cutoff drops those before they reach the prompt.
There's a second control worth stealing. The authors run a Min-K membership inference analysis to check whether generated solutions came from retrieval or from the model having memorized pretraining data. On a benchmark built from public problems that's not a theoretical worry. If the test problem and the retrieved "analogous" problem both sit in pretraining, the lift you're measuring may be recall wearing a retrieval costume.
Typed centrality gives the graph a vote
GraphRAG systems generally treat a knowledge graph as a homogeneous graph and rank context by text similarity between the prompt and node descriptions. That throws away the thing a KG is for: deterministic structure. The typed-centrality work computes centrality separately for each class in the graph, builds a symbolic representation from those per-class numbers, and hands it to an agent as a deterministic source sitting alongside text similarity. Evaluation ran on a real POLE dataset (person, object, location, event) comparing reasoning and retrieval with and without the symbolic layer, and responses came out more consistent with the context.
Here's what that fixes in practice. In a graph where locations have ten times the average degree of people, a single centrality ranking is dominated by whichever class happens to be denser. A location that's busy for a location looks identical to a person who is the hub of the entire dataset. Computing centrality per class separates those signals, so the model sees that this person is unusually central among people while that location is unremarkable among locations. The other benefit is format: numbers describing graph structure arrive as numbers. The model can quote them instead of paraphrasing a sentence that was itself a lossy summary of a graph.
Where the four systems line up
| System | Domain | What gets retrieved | Selection signal | Reported result |
|---|---|---|---|---|
| APEX | Spoken language understanding (SLURP) | Labeled demonstrations | Intent prototypes, then in-intent similarity | +4.34 EMA with Qwen3 4B, +3.97 with Gemma-3-4B |
| GRAC | Surgical scene captioning (EndoVis-18, TORS) | Graph-caption pairs | Instrument-tissue interaction comparison | CIDEr-D 5.88 vs 4.23 for SGT; triplet accuracy 52.6% |
| CP-RAG | Competitive programming (CodeContests) | Prior problems with solutions | Embedding similarity plus dynamic threshold | Higher pass rates against random-example and no-example controls |
| Typed-centrality GraphRAG | POLE knowledge graph | Subgraphs plus a symbolic centrality summary | Class-scoped centrality, agent-mediated | Responses more consistent with retrieved context |
The axis that separates these four is retrieval granularity. APEX retrieves at the intent level, GRAC at the level of an interaction between two entities, CP-RAG at the level of a whole problem, and typed centrality at the level of a graph class. All four sit above the chunk. That's the shift. Most production RAG still indexes fixed-size text chunks and ranks them by cosine distance, which caps how well the retrieved context can match the task at hand.
None of this is free. GRAC needs graph annotations that somebody has to produce or extract. CP-RAG needs a curated problem database and a threshold calibration pass. Typed centrality needs per-class degree statistics and an agent loop that can consume them. The cost question is whether your retrieval errors are expensive enough to justify a second index. In surgical documentation and competitive programming, they clearly are.
Common pitfalls
Retrieving on the surface form of the prompt is the mistake underneath all of this. If your retriever encodes the user's question and searches a text index, you're matching vocabulary. That works when vocabulary tracks intent and fails when it doesn't, which is most of the time in customer support, code search, and anything with a controlled label set. Classify first, then retrieve inside the class.
Fixed top-k with no similarity floor quietly poisons prompts. A retriever that always returns ten results will return ten results for a query that has no good match, and the model has no way to distinguish the first hit from the tenth. Set a floor, return fewer results when nothing clears it, and make the prompt say so. A short prompt with two good examples beats a long one with eight mediocre ones.
Skipping the random-retrieval control arm makes your numbers unreadable. Add a condition where you inject randomly chosen examples of the same token count. If it doesn't separate from your retrieved condition, the gain came from prompt length or from the model seeing more of the output format. This costs you one afternoon and saves you a quarter of shipping a retriever that does nothing.
Flattening a heterogeneous graph into one adjacency matrix hides the structure you paid to build. Degree distributions differ by class, and untyped centrality just finds the densest class. Compute per class or don't bother with centrality at all.
Indexing text while discarding the structure that produced it wastes the expensive part of your pipeline. GRAC's triplet accuracy gain from 32.7% to 52.6% came from storing graph-caption pairs and comparing interactions, which is impossible if your index only holds caption strings. Whatever schema your extraction step produces, keep it next to the text and make it retrievable.
What the community is saying
I rebuilt the retrieval layer for an internal runbook assistant last year and hit this wall directly. Offline hit rate looked fine. The answers were still wrong. The retrieved passages were about the right service but described a different failure mode, because the embedding model had no idea that "pod stuck in CrashLoopBackOff" and "pod stuck in Pending" need different runbooks. Adding a cheap classification pass that filtered candidates by failure type before similarity search did more for answer accuracy than swapping the embedding model twice.
Teams I've traded notes with hit the same thing in code search: the retriever returns functions with similar names instead of similar call signatures, and the model then invents an API that doesn't exist. The fix each time has the shape of APEX. Filter by the label that actually matters, then rank inside the filtered set. Everyone who tries it reports the same surprise, which is that the classification step is cheap and the retrieval step was the expensive one all along.
The recurring complaint about GraphRAG in production is graph construction cost. Extracting a reliable KG from messy documents takes an LLM pass, a validation pass, and a human looking at samples. The typed-centrality result suggests the payoff scales with how much deterministic structure survives that extraction. If your graph is 60% correct, centrality numbers computed over it are 60% correct too, and they arrive with an air of authority that text similarity never had.
The bottom line
Retrieval quality tracks the retrieval unit more than the embedding model. Swap the encoder and the numbers move a little. Swap "nearest chunk" for "nearest example of the same intent" and they move a lot.
If your prompts carry retrieved examples, insert a label filter before similarity search. APEX got 4.34 EMA points out of that change alone on SLURP and 7.66 on noisy transcripts, with no fine-tuning and no new data.
When your data has structure, index the structure. GRAC's triplet accuracy jump from 32.7% to 52.6% came from storing graphs next to captions and comparing interactions at generation time. The generator stayed the same.
One thing to watch: evaluation hygiene. If you can't show a random-retrieval arm losing to your retriever, you don't yet know whether retrieval is doing the work. Build that arm before you ship, because the alternative is a quarter spent tuning a retriever that mainly adds tokens.