Compare Architectures
Side-by-side: use case, requirements, latency, cost, strengths, weaknesses, failure modes, example — and when to choose each.
Workflow vs AgentSingle agent vs Multi-agentRAG vs Fine-tuningVector search vs BM25Function calling vs MCPDirect API integration vs MCPPlan-then-execute vs ReActShort-term memory vs Long-term memoryLLM-as-judge vs Deterministic evaluatorsHuman-in-the-loop vs Human-on-the-loopSupervisor vs PipelinePrompt caching vs Semantic cachingRouter vs SupervisorFramework vs No framework
| Short-term memory | Long-term memory | |
|---|---|---|
| Use case | Within one session: conversation, working state, scratchpad | Across sessions: user preferences, learned facts, past outcomes |
| Requirements | Conversation buffer plus summarization when it grows | Store (KV, vector, or graph), write policy, retrieval, expiry |
| Latency | None: it is already in context | Retrieval per turn plus extra tokens |
| Cost | Tokens scale with conversation length | Storage plus retrieval plus injected tokens |
| Strengths | Precise, recent, no retrieval errors | Continuity and personalization |
| Weaknesses | Lost at session end; overflows long sessions | Stale, contradictory, or irrelevant memories pollute context |
| Failure modes | Context overflow, lost-in-the-middle | Wrong user, outdated preference, unbounded growth |
| Example | The order ID mentioned three turns ago | "User prefers metric units and terse answers" |
| Choose this when | Choose short-term memory by default; most tasks need nothing more. | Add long-term memory only for facts that must survive a session, with an explicit policy for what is written and when it expires. |