What arrives in full, and what arrives as a name
Relevance decides the form knowledge takes, not just its order. The closest few entries arrive as full content, the rest arrive as a name and an id the assistant can pull, skills are offered by name because a procedure should be asked for, and a prompt that asks two things gets knowledge for both.
On this page
Retrieval has two jobs. Choosing the right knowledge is the famous one. Deciding how much room each chosen entry deserves is the one that determines whether the good answer actually fits.
A simpler design answers the second question with one rule: everything that ranks goes out as full content, in rank order, until the room runs out. The entry ranked eighth gets exactly the treatment the entry ranked first gets, and the next one gets nothing at all, even when it is relevant. Relevance decides the order and nothing else.
In Pathrule, relevance decides the form.
Three forms, one ranking
- The closest few arrive as full content. The assistant reads them and acts, with no separate fetch and no round trip.
- Everything else relevant arrives as a name, an id and one line. Enough for the assistant to recognise it and pull the body when it turns out to matter.
- Skills arrive by name only, however well they rank. More on that below.
The important property is the one at the bottom of the list: a relevant entry is not thrown away for want of room. What does not fit the per-prompt budget is listed by title, and the cheap form is what makes that affordable.
How many bodies arrive in full is chosen to keep the strongest matches whole while costing less than sending every ranked entry in full. The exact budget is part of Pathrule's engine and can change between releases.
Why a skill is never pushed
A memory is a fact. A rule is a constraint. Both are things an assistant should simply know while it works, so both can arrive as content.
A skill is a procedure. Putting a procedure into the context of a turn that did not ask for one does not inform the assistant, it instructs it, and an assistant that has been handed a checklist tends to follow the checklist. So skills are offered by name and the assistant reaches for one when the work is actually the work that skill describes. Invoking it, for example with ::skill-name, brings in its full body. See writing skills for what a skill is meant to be.
Rules earn their room too
If rules skipped the relevance test, a constraint about database migrations could crowd out the memory that would have answered a question about a button. So rules pass through the same relevance test as everything else, and an unrelated rule arrives as a name rather than taking a full slot.
The exception is deliberate: a rule marked strict keeps its body, because a hard constraint whose violation causes a regression is not something to ration. See Rules as guardrails.
The demotion is what makes relevance observable
There is a second reason the cheap form matters, and it is about learning rather than cost.
When every ranked entry is pushed as a body, the layer never finds out whether any of them were wanted. A body that arrives unasked produces no evidence either way. An offered name is different: the assistant either pulls it or does not, and a pull is a deliberate act by the party that knows what the work needed.
That pull is a useful relevance signal, and an entry that keeps being pulled is more likely to arrive in full next time. It fits the wider loop described in how retrieval finds the right knowledge: the layer measures what it delivered rather than asking the assistant to report back.
The bar has to hold in every language
Whether an entry is sent at all depends on a relevance bar, and that bar can quietly depend on language. The same memory can score one way against a prompt written in English and lower against a faithful translation of that prompt, because meaning-based matching does not produce identical results across languages for the same idea. A bar tuned only against English prompts would cut off the other languages without anyone noticing, and the symptom would not be an error. It would be a team that writes its prompts in Turkish getting less context than a team that writes the same prompts in English.
So the bar is set where it holds across languages, and Pathrule tests this with prompts in several languages rather than assuming it. How Pathrule proves hard claims describes how claims like this are checked.
A prompt that asks two things gets knowledge for both
Ask one question and meaning-based matching works well. Ask two in the same message and it has a structural problem: the request becomes a single average of two different ideas, and an average of two things is often close to neither. The entry that answers your first question and the entry that answers your second can both fall short of a bar that either would have cleared on its own.
Pathrule reads a multi-part request as its parts. Each part is matched separately and the results are combined, so a two-part question gets knowledge for both parts, while a single-part question is matched as before.
The room available grows with the question rather than with the workspace. Asking two things costs a little more than asking one. Having ten thousand memories instead of a hundred costs the same.
What to read next
- How retrieval finds the right knowledge for the selection this delivery model sits on top of.
- How hooks work for how the selected slice reaches the assistant before its first tool call.
- How Pathrule proves hard claims for how claims like the cross-language behaviour are tested.