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
| Vector search | BM25 | |
|---|---|---|
| Use case | Semantic matches: paraphrases, synonyms, cross-lingual | Exact matches: IDs, error codes, product names, rare terms |
| Requirements | Embedding model, vector index (HNSW / IVF), consistent embedding on write and read | Inverted index, tokenizer; no model |
| Latency | Embed query (~10-50 ms) + ANN search | Sub-millisecond lookups on modest corpora |
| Cost | Embedding calls plus vector store memory | Cheap: CPU and disk only |
| Strengths | Finds meaning without shared vocabulary | Precise, explainable, zero drift when the model changes |
| Weaknesses | Misses exact tokens; opaque failures; re-embed on model change | Vocabulary mismatch: "cancel" does not match "terminate" |
| Failure modes | Semantically close but factually wrong chunks rank top | Zero results for paraphrased queries |
| Example | "how do I stop my plan" → cancellation policy | "ERR_4471" → the one runbook that mentions it |
| Choose this when | Choose vector search when users phrase things differently from the documents. | Choose BM25 when queries contain exact identifiers, or as the baseline before adding embeddings; combine both as hybrid when in doubt. |