The control pattern
Data asset
Retrieved knowledge
Knobs
Source hierarchy, Chunk size and overlap, Metadata, Freshness rules, Top-k and reranking, Citation threshold
Outcome
Grounded answers tied to current evidence
Measurement
See how to measure this below
What it is
RAG changes model behaviour by changing the evidence placed in the model's context at answer time. The data asset here is the retrieved knowledge, not the model weights.
Its knobs include how documents are divided, how much neighbouring text is preserved, which metadata is indexed, how many results are retrieved, whether results are reranked, and how aggressively stale or low-authority material is excluded. In financial analysis, source hierarchy matters especially: a filed financial statement should outrank a news recap for reported numbers, a transcript may be the best source for management tone, and a market feed may be required for current price information.
Chunk size should vary by content. Narrative sections can use moderate text windows, while tables and footnotes should be preserved as coherent units. Retrieval can then return a small evidence bundle rather than flooding the model with loosely related passages.
The knobs in detail
Each row is one adjustable property of the data asset, and what moving it tends to do.
| Knob | What you adjust | Likely effect |
|---|---|---|
| Source hierarchy | Which document types outrank which | Decides what wins when sources disagree |
| Chunk size and overlap | How documents are divided and stitched | Preserves or destroys table and footnote meaning |
| Metadata | What is indexed alongside the text | Enables filtering before similarity is considered |
| Freshness rules | How aggressively stale material is excluded | Controls answers built on outdated evidence |
| Top-k and reranking | How many candidates, in what order | Trades recall against context noise |
| Citation threshold | How much support a claim requires | Determines when the system should decline |
Applied: Stocks Assistant
For Stocks Assistant, every chunk should carry ticker, company identifier, document type, filing date, fiscal year, fiscal quarter, section, currency, units, source URL and an information-available timestamp. Those properties become retrieval knobs. A question about the latest gross-margin guidance should filter to the correct company, period and source type before semantic similarity is considered at all.
How to measure it
Evidence that the knob produced the intended behaviour, rather than shifting the problem elsewhere.
- Recall at k : did the needed evidence appear in the candidate set?
- Citation precision : did the model use the evidence correctly?
- Freshness compliance against the availability timestamp
- Answer faithfulness to the retrieved bundle
- Percentage of numeric claims traceable to a source
Common mistakes
Measuring only the answer. Retrieval and generation fail differently and need separate metrics.
Filling a retrieval gap from memory instead of saying that current evidence is unavailable.