Read-only POS agent retro: near-zero Gemini cache hits, HITL writes on hold

RedaHaloubi · reddit · 2026-09-17

A retro of a read-only POS analytics agent (route → fetch → narrate → ground, Node/TS + Vercel AI SDK): the author is holding human-in-the-loop writes until the read loop tightens, adopting pin semantics, CORE-first schemas, and evals on traces/fetch/step count/DTO coverage.

Model & cost: Gemini 2.5/3.5 Flash Lite in dev; a typical ask costs 4,840 input / 123 output tokens across 2 LLM steps in 2.3s. But Gemini implicit cache hits are just 2.2% overall — 0/96 on the current CORE-12 and 0/51 on pinned requests — so the prefix can cache but doesn't, which is why no second model call was added.

Open questions: pause with UI chips on date ambiguity vs. default window named up front, and EN+FR synonym tables on shared regexes vs. translate-for-routing for bilingual intent matching.

Related event: Read-only POS agent retrospective: cache hit rate near zero, writes on hold(2 posts)→

Original post →

More from coding & agent

coding & agent channel →