Expand description
Local lookups that answer with references — URL + anchor + snippet — inside a token budget, never with document bodies. The recipe:
- IDF-weighted tiered lexical scoring over node/segment labels (exact ×1000, prefix ×100, substring ×1), scaled by squared term-coverage so partial matches of many terms beat a lucky exact match of one.
- Seed selection with a per-term guarantee (every query term seats its best node) capped at a few seeds.
- Bounded BFS expansion that refuses to expand through hub nodes (≥ p99 degree), decaying by hop, edge weight, and confidence.
- Fusion with persisted importance, then deterministic seeds-first rendering that stops before the token budget is exceeded.
Structs§
- Anchor
- A sub-document anchor attached to a hit: fetch
urland slice by the byte range (or resolve the heading) instead of re-reading the whole page. - Hit
- One lookup answer entry. Borrowed from the snapshot; cheap to produce.
- Query
Opts - Query options.
- Token
Budget - Token allowance for a rendered answer (~4 bytes/token estimate).