LGPD-Aware Data Paths in RAG Pipelines
Keep personal data off the wrong RAG hop in Brazil: classify at ingest, split indexes, control prompt and log copies, and make deletion a full graph walk.
10 min read · lgpd
Read patternLibrary
Production architectures for AI systems under real constraints: cost, language, latency and institutional trust across Latin America and Lusophone markets.
Deep Patterns
Keep personal data off the wrong RAG hop in Brazil: classify at ingest, split indexes, control prompt and log copies, and make deletion a full graph walk.
10 min read · lgpd
Read patternA second pass that checks a written constitution—tone, safety, Portuguese UX—then revises. It catches copy. It does not authorize money transfers.
6 min read · safety
Read patternPause agents before money, HR, or production changes: risk gates, durable interrupts, approval UX that shows blast radius, and fail-closed timeouts in ops.
8 min read · agents
Read patternTreat agent memory as a data plane: working, summary, and vector layers with tenant ACL, TTL, consent, and a deletion walk—not an unbounded transcript.
7 min read · agents
Read patternAdd a supervisor only when roles are real: typed handoffs, summarized worker output, cost caps, and one finish path—not a committee of chatbots in prod.
5 min read · agents
Read patternPlan once, execute cheaply: JSON steps with success checks, a smaller executor, and replan only on failed gates—not an unbounded ReAct wander in prod.
6 min read · agents
Read patternShip ReAct loops that actually terminate: typed tools, observation trust boundaries, step and spend budgets, and idempotent side effects in production.
8 min read · agents
Read patternFail closed on model JSON: versioned schemas, constrained decoding, one repair loop, and no side effects until validation passes—treat output like an API.
6 min read · agents
Read patternLeast-privilege tool registries: typed schemas, role ACL, timeouts, idempotency keys, and redacted logs—before a model can touch CRM, SQL, or Pix rails.
6 min read · agents
Read patternReference
Shorter operational notes. Use a Deep Pattern when you need implementation contracts and citations.
Define readable offline, stale and unknown-outcome states for AI workflows, with safe caching, explicit retry boundaries and accessible status messages.
3 min read · ux
Read patternCompare an open-weight retrieval workflow with a hosted alternative using identical permissions, workload, locale gates and fully stated operating costs.
3 min read · open-weight
Read patternRun a locale-aware release gate with synthetic fixtures, critical-action checks, explicit failure exits and a real adapter before a multilingual workflow ships.
3 min read · evals
Read patternEnforce schemas, permissions, approval and duplicate-action checks outside the model before a workflow can quote, refund or change a record.
2 min read · agents
Read patternKeep Brazilian and European Portuguese sources, terms and evaluations distinct where a workflow requires it, without claiming locale tags prevent errors.
2 min read · portuguese
Read patternShow which source and version support an answer, enforce access on citation links and test whether the evidence actually supports the claim being made.
2 min read · rag
Read patternSeparate source applicability, user entitlement and semantic relevance before ranking documents, with an explicit fallback when no permitted source answers.
2 min read · rag
Read patternAuthor locale-specific acceptance cases with expected actions, evidence and severity; keep synthetic smoke fixtures separate from a representative benchmark.
3 min read · evals
Read patternCompare routing paths using accepted-task cost, bounded attempts and explicit escalation rules, rather than assuming a smaller model is always cheaper.
2 min read · routing
Read patternCarry market, language, permissions and source versions through retrieval; return an evidence gap instead of silently borrowing another region’s policy.
2 min read · rag
Read patternStop releases on named critical failures, preserve per-locale evidence and separate a smoke test from the broader review needed to ship an AI workflow.
2 min read · evals
Read pattern