The simplest GenAI architecture: assemble context, call a model, and return a response.
◷ Estimated reading time: 5 min
The Core Flow
User input → Prompt / context assembly → Model → Validated response
A direct LLM pattern is appropriate when the task is bounded, no external action is required, and the model already has enough information in the request or supplied context.
Stateless and Stateful Chat
Stateless
Each request stands alone
Easy to scale and debug
Best for classification, rewriting, extraction, and one-off generation
Stateful
Conversation history is assembled for each turn
Supports follow-up questions and continuity
Requires history selection, summarization, privacy, and retention decisions
When It Is Enough
Summarizing supplied text
Drafting or rewriting
Classification and extraction with structured output
Simple conversational support where no private or changing knowledge is required
Limitations
The pattern cannot reliably know private or recently changed facts unless you supply them. It also cannot perform real-world actions without tools. Adding a long chat history can create context bloat, so stateful chat still needs context engineering.
Common mistake
Calling every conversational UI an "agent." A chatbot becomes agentic only when the model gains meaningful runtime control over actions or multi-step execution.
Key Takeaways
A direct model call is the baseline architecture, not an inferior one.
Stateful chat requires explicit history and retention design.
Do not call a chatbot an agent unless it has runtime control over a meaningful execution loop.
A service rewrites customer emails into a friendlier tone using only the supplied text. Which pattern fits best?
What changes a stateless call into a stateful chatbot?