Make the model behave
What an LLM request really is, what it costs, and why the model is the smallest problem.
Field notes on agents, voice, retrieval, evals, and the parts of production AI that only show up after software meets real people.
Change an input, inspect the evidence, and follow the result. Every study lives beside the article it explains.
What an LLM request really is, what it costs, and why the model is the smallest problem.
Measurement as the operating system: where golden cases come from and what metrics hide.
Voice, loops, and the judgment calls about where people belong in automated systems.
Working philosophy: listening first, owning failures, and shipping boring systems.

A production agent loop needs external checks, durable state, and hard limits. Without those, it is repeated prompting with a budget.

Our golden cases are anonymized production failures with assertions attached. Keeping the original thread, trace, and expected behavior has made them more useful than cases invented before launch.

In production, the model call sits inside permissions, policy, retries, evals, and traces. Those surrounding systems decide whether a promising demo survives contact with a customer workflow.

Before I build for a new client, I watch the people doing the work: their tabs, workarounds, retyping, and judgment calls. Those first two weeks often change what we build first.

A freight-negotiation agent had become too eager to close, and we could not measure the cost cleanly. An 87-test suite with 19 production cases gave us a release gate for the next model migration.

A voice-agent complaint can originate in speech recognition, model decisions, tool execution, or turn timing. I read the transcript and event trace in that order before touching the prompt.

A recruitment voice agent sounded natural but kept missing tool calls. We replaced one fused speech model with a slower, inspectable pipeline and measured whether reliability justified the extra latency.

A logistics customer receives about 3,000 WhatsApp messages and 500 emails a day. We turn them into CRM demand records with a queue, an LLM extractor, entity resolution, deduplication, and a review lane.

Reviewing every AI output wastes the attention human oversight is meant to provide. Route uncertain and irreversible cases to people, then keep their corrections as evaluation data.

I keep a small file of project claims beside the evidence for each one. It preserves the difference between a measured result, an estimate, and something we believe but have not tested.

Ninety days after a successful AI demo, clients ask about failed batches, monthly cost, and recovery paths. Renewals depend on the answers.

An LLM request crosses rate limits, tokenization, scheduling, inference, streaming, and billing before your application sees a response. That fuller model makes 429s, latency drift, and surprising bills easier to debug.

We run OpenAI and Gemini across client deployments. Prompts need provider-specific work; the eval cases, contracts, and traces are what let us move safely between them.

After watching a friend write carefully about a breakup, I started treating personal failures more like postmortems: record what happened before memory makes my role smaller.

Output generation is sequential and keeps cached state in GPU memory while a response runs. That mechanism helps explain the price gap and changes how I set output limits, prompt order, and streaming.

Six notes I reread before a new project or commitment. Each comes from a decision that cost more than writing the rule down would have.

A logistics customer's transporter table had missing identifiers, aliases, and duplicate companies. Cleaning it improved the downstream systems that depended on those records.

My image-captioning model scored ROUGE-L 39 and BLEU 10.3 on the same outputs. Reading the captions showed where both numbers were misleading.

My Master's work tested dense retrieval where training pairs, benchmarks, and web text were scarce. The hardest part was building evidence that retrieval worked in the target languages.