b300ac5c70c57f043b541777cf6183e920d9d3c1
Kiwix ranks by keyword, not meaning, so a translated question finds song
and TV titles. This asks the resident model for the TOPIC instead: a short
English noun phrase, like a Wikipedia article title.
Locked down three ways, because a wrong query is silently wrong:
- A GBNF grammar, same idea as routeGrammar and responseGrammar. The
reply must be {"query":"..."} with Latin words only. The JSON wrapper
matters: this model always thinks out loud and this llama-server build
ignores the thinking switch, so a bare word-list grammar just captured
"Let me analyze this request carefully" for every question.
- max_tokens 32, since the answer is a few words.
- CleanQuery, which throws away empty, Russian and prose replies rather
than passing them to Kiwix, and drops question words like "why" and
"how much" that a keyword ranker cannot use anyway.
Client side only. Nothing is wired into the daemon or any config.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CGeSZxh1DCtRxmFVSYVGvJ
Description
No description provided
Languages
Go
97.1%
HTML
0.9%
Shell
0.6%
CSS
0.5%
Makefile
0.3%
Other
0.6%