mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-05-27 14:48:26 +02:00
The short-conversation skip in `rewriteQueryWithContext` used `userMessages.length <= 2`,
which short-circuits both the very first turn AND the first follow-up. The follow-up is
the moment the rewriter matters most — it's where pronouns and shorthand ("the bars",
"how long does it last?") need to be resolved against earlier turns before the embedding
search runs. With the rewriter skipped, RAG queries against the raw last message, scores
nothing above the 0.3 threshold, and no context gets injected for that turn.
The visible symptom is the assistant treating the first follow-up in any chat as a
brand-new question — e.g. "great - they threw up 2 of the bars it looks like" answered
as if it were a recipe-bars question, with no carry-forward of the prior chocolate-
poisoning context.
Threshold lowered to `< 2`: skip only when there's exactly one user message (nothing to
rewrite from). From the first follow-up onward the rewriter runs, as originally intended
before commit
|
||
|---|---|---|
| .. | ||
| benchmark_controller.ts | ||
| chats_controller.ts | ||
| collection_updates_controller.ts | ||
| docs_controller.ts | ||
| downloads_controller.ts | ||
| easy_setup_controller.ts | ||
| home_controller.ts | ||
| maps_controller.ts | ||
| ollama_controller.ts | ||
| rag_controller.ts | ||
| settings_controller.ts | ||
| system_controller.ts | ||
| zim_controller.ts | ||