Skip to content
Engineering Notes & Systems Thinking

Technical Writing

Sanitized engineering write-ups and systemic learnings from architecting enterprise agent infrastructure, evaluation harnesses, and multi-tenant systems.

Testing & Evaluation
August 20265 min read

Proving an LLM Migration is Output-Neutral

How to safely migrate live, revenue-bearing agent pipelines using recorded cassettes, golden-set dual-run execution, and CI regression gating.

Migrating live software is standard engineering; migrating a live LLM system carrying enterprise traffic is terrifying because nobody can tell you what "the same answers" means.

When building Olympus, we needed to migrate two active production agents onto the platform SDK. A big-bang rewrite or hopeful cutover was out of the question. To make the cutover provable rather than hopeful, we built a golden-set dual-run regression harness (`olympus_evalkit`).

The harness records real request/response cassettes from production workflows, executes both the legacy and platform code paths against identical inputs, and systematically diffs the structured outputs, reasoning trees, and citations.

Gating this harness in CI ensures that any commit that alters output behavior fails the build before reaching production. For AI systems, the test you actually need is not "is the output good", but "is the output the same as the thing we already trust".

Architectural Takeaways
  • Record production request/response cassettes as golden regression fixtures.
  • Execute legacy and platform code paths side-by-side in CI with diff scoring.
  • Treat behavioral neutrality as a mandatory merge gate, not a post-deploy check.
AI Safety & Grounding
July 20264 min read

Getting Citation Generation Out of the Model

Why generated citations fail in high-stakes domains, and what deterministic exact-text extraction and URL injection look like.

In enterprise compliance and legal review, output is scrutinized by auditors and attorneys. A model generating citations as text will inevitably hallucinate a citation that looks perfectly formatted and entirely plausible — which is far more dangerous than no citation, because it is trusted.

To solve this in Risk Agent, we moved citation generation out of the model entirely. The LLM is tasked with identifying verbatim supporting quotes and evidence bounds, while the platform performs exact-text string matching against the parsed document index.

The platform then deterministically injects verified PDF-page coordinate URLs and formats output as an array of typed segments (text and citation) rather than a monolithic prose block.

This single architectural shift made hallucinated citations structurally impossible.

Architectural Takeaways
  • Never ask an LLM to generate document links or URLs as raw text.
  • Have the model isolate exact text quotes, then let platform code perform deterministic matching.
  • Structure outputs as typed segments (text vs citation) for direct PDF-viewer integration.
Systems & Infrastructure
July 20265 min read

A Cost Surge That Was Really a Concurrency-Boundary Bug

A cost anomaly is almost never a pricing problem. Debugging the compounding collision between serverless execution ceilings and provider rate limits.

When our risk-evaluation volume expanded by roughly 20×, cloud spend surged abruptly. The intuitive explanation — "we are running more evaluations" — was immediately available, and completely wrong.

Root-cause analysis uncovered a compounding interaction between three separate limits: AWS Lambda concurrency caps, provider token rate limits, and Lambda’s 15-minute execution ceiling.

Under heavy load, calls were throttled by the provider. Throttled requests entered retry loops, burning wall-clock time inside the 15-minute window. When functions timed out, the entire batch re-executed from scratch, compounding inference cost on work that had already been completed.

The fix was architectural: migrating off serverless Lambda to ECS/Fargate to remove the arbitrary execution ceiling, establishing explicit queue backpressure, and controlling concurrency deliberately.

Architectural Takeaways
  • Cost spikes in agentic systems are almost always control-loop failures.
  • Serverless execution ceilings turn throttled retries into catastrophic compounding re-runs.
  • Long-running agent workflows require persistent execution environments with explicit concurrency bounds.
Architecture & Multi-Tenancy
August 20264 min read

Documents Are Tenant Assets, Not Agent Assets

Designing cross-agent document repositories keyed by content hash and tenant scope — enabling reuse without re-ingestion while enforcing zero cross-tenant leakage.

In early multi-agent setups, each agent owned its own ingestion pipeline. If a vendor uploaded a SOC 2 for Risk Agent, and later submitted a contract for Contracts Agent, the document was parsed, chunked, and embedded twice into isolated vector collections.

In Olympus, we established the principle: documents belong to tenants, not individual agents. The central Document Platform keys ingested vectors by SHA-256 content hash plus tenant ID.

This allows a single parsed and embedded document to be evaluated across multiple compliance and legal agents without re-indexing, drastically saving parsing and embedding cost.

Crucially, availability is not access: retrieval defaults strictly to the caller’s authorized tenant scope, and reading outside it requires an explicit, audited permission widening, ensuring bulletproof multi-tenant isolation.

Architectural Takeaways
  • Key document vectors by (SHA-256 hash + tenant ID) to eliminate redundant ingestion.
  • Allow multiple specialized agents to query the same indexed document asset.
  • Enforce tenant isolation structurally at the vector query filter level, not by convention.