rag
Technical notes on web development, DevOps, and AI integration.
2 articles
- 21:57ai
Query Rewriting: The Small Brain Before Agent Search
Told to search for "nano banana", an agent without query rewriting gets two worlds of meaning. Here are the 5 rewrite patterns I installed.
TL;DR: The author's fix for ambiguous agent searches: expand every query into five variants—literal, contextual, English, industry synonym, full question—before searching. All five run and merge, so "nano banana" resolves correctly as Google's image model rather than a fruit. The approach costs almost nothing—no extra API calls—though the author honestly admits no benchmark data exists yet.
#query-rewriting#ai-agent#rag - 20:07ai
The follow-up question my AI chat couldn't answer
Chat follow-up questions without server sessions: history lives in localStorage, gets resent per ask, and the backend rebuilds the prompt under a char budget.
#fastapi#llm#stateless