← Lab
Field note·AI Backend Engineering·5 min read

GenAI System Design — What Nobody Tells You

The teams that succeed in production are not the ones with the most sophisticated architecture. They start simple and let profiling decide where complexity goes.

GenAI System Design — What Nobody Tells You

Sophistication is easy to add and hard to remove. Every hop is latency, another failure mode, and one more thing to trace when something breaks — so complexity has to earn its place with data rather than with a prediction.

Start simple, seriously

Most production systems do not need multiple agents. Across large document corpora, somewhere between 20 and 30 query patterns typically cover about 80% of all use cases. Build for that 80% with a single agent, measure what breaks, and expand only where profiling shows a real bottleneck.

Context is the real bottleneck

The limiting factor is rarely the model — it is what you put in front of it. Three approaches hold up in production.

01Schema-driven stateGive the model only the fields the current decision needs, not everything the system knows.
02Separated layersKeep prompt context, tool context and history apart so a large tool response cannot flood the reasoning window.
03Summarised historyCompress beyond N turns. The full transcript belongs in storage, not in the prompt.

Add complexity where the data points

The sequence that works is the same every time: single agent, measure what breaks, then add complexity only at the specific point profiling identifies. Architecture decided in advance almost always over-builds in the wrong place.

What to take away
  • 20–30 query patterns usually cover 80% of real use cases.
  • Context management, not model choice, is the usual bottleneck.
  • Give each step only what that decision needs.
  • Add complexity only where profiling proves it is needed.

Field notes on building production AI systems — collected, verified and written up so they are useful to anyone working on the same problems.

smoke
“Innovation distinguishes between a leader and a follower.”

Need an AI system that holds up in production? Tell me what breaks today and I'll tell you what I'd build.

Call Me now !

mail

abdelmajidzaddi088@gmail.com

address

Mohammedia, Morocco

phone

+212 695 557 631