Skip to content

How It Works — LLM

Language models are stateless and forgetful, but applications need chat history, tools, and up-to-date knowledge. These flows show how each of those layers is bolted on top of a plain prompt.

LLM

From a bare prompt to a full agent loop.

Prompt and Completion

Chat with History

System Prompt and Roles

Tool Use / Function Calling

RAG — Retrieval-Augmented Generation

Agent Loop (ReAct)

MCP — Model Context Protocol