Expose --kind on ai_query so definitional questions can reach the prose
The index already stored chunk origin and search.js already filtered on it; only the wrapper refused the flag. Intent routing boosts PURPOSE for "what is X", which buried README.md and made the system answer that it had no definition of itself.
This commit is contained in:
@@ -59,6 +59,20 @@ Applied as a **score boost, not a filter**. Intent detection is a heuristic, and
|
||||
must never be able to exclude the one chunk that holds the answer. `--section=NAME` forces a
|
||||
hard filter when you actually want one.
|
||||
|
||||
The boost still has a blind spot worth knowing about: **definitional questions.** "What is
|
||||
Varaverk?" matches the `PURPOSE` intent, so every script's one-line PURPOSE gets boosted above
|
||||
the top-level prose that actually answers it — and the model correctly replies that the context
|
||||
does not define the system. The corpus is fine; `README.md` is indexed. The routing simply
|
||||
buries it. `--kind=readme` is the hard filter for that case:
|
||||
|
||||
```bash
|
||||
bash AI/ai_query.sh --kind=readme "what is Varaverk"
|
||||
```
|
||||
|
||||
`--kind` filters on where a chunk came from — `header`, `readme`, `manual`, `template`, `doc` —
|
||||
and composes with `--section`. Prefer it over `--section` for "what is" and "why does this
|
||||
exist" questions, where the answer is narrative rather than a header field.
|
||||
|
||||
---
|
||||
|
||||
## ━━━ NAMED-PARAGRAPH SUB-CHUNKING ━━━
|
||||
@@ -154,6 +168,7 @@ bash AI/ai_index.sh --status # size, counts, last build
|
||||
bash AI/ai_query.sh "what stops rsync and the mover running at once"
|
||||
bash AI/ai_query.sh --search "why are the cache writers lockless"
|
||||
bash AI/ai_query.sh --section=CONFIGURATION "which variable sets the mover grace period"
|
||||
bash AI/ai_query.sh --kind=readme "what is Varaverk" # definitional / narrative
|
||||
bash AI/ai_query.sh --json "..." # for other scripts
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user