The Model Is a Router, Never a Data Store
How TiDonna's Assistant Data Layer keeps 4,354 contracts out of model context, cuts the exfiltration leg of Simon Willison's lethal trifecta, and lifted an 87-question eval from 69% to 91%.
Practical notes on building reliable AI systems in production: context engineering, fail-closed guardrails, hand-graded evaluations, real-time voice control planes, anchored PDF extraction, and database-enforced boundaries.
Every note pairs visual architecture schematics with real production defects, tradeoffs, and regression patterns from systems I engineered.
How TiDonna's Assistant Data Layer keeps 4,354 contracts out of model context, cuts the exfiltration leg of Simon Willison's lethal trifecta, and lifted an 87-question eval from 69% to 91%.
Why multi-agent outbound voice AI demands three separated control planes, atomic lead leases, reward-hacking static checks, plus how CoachAI chains Moonshine + DeepSeek-R1 + Kokoro 100% locally.
Coordinate-anchored PDF extraction where printed text wins, duplicate-charge email gates, 191 PostgreSQL RLS policies, SKIP LOCKED outboxes, and cutting coding-agent token spend 7.3x with AST graphs.
Eight crisp rules distilled directly from bugs caught in evaluations, live call sessions, and adversarial reviews.
Keep full datasets in owner-bound Redis under a handle; let the model see only summary stats and up to 5 preview rows.
Models read concrete numbers in worked examples as live facts and skip tool calls. Assert in CI that zero live figures appear in cached prefixes.
Signed URLs inside tool results go straight to third-party LLM logs. Hand the model an
export_id and mint download URLs on UI click.
Callee prompt injection can spoof arbitrary phone numbers if the model picks destinations. Map typed reason enums server-side.
Auto-retrying a "failed" email send after a network timeout bills customers twice. Bind approvals to content hashes and claim conditionally.
Never blindly trust model JSON over billing PDFs. Match extracted strings back to printed text and preserve page, line, and section provenance.
Row-level security fails silently if an app connects as table owner. Enforce boot checks and
run every isolation test as app_user.
Querying an AST code graph cut structural token spend 7.3x in Power Dialer, and separate review passes caught false "done" claims before merge.
External writing from practitioners whose patterns show up directly in the case studies on this site.