The Trinity of Modern Intelligent Systems
Agentic AI
Foundations, architecture, multi-agent systems, tool use, planning, memory, safety
Retrieval-Augmented Generation
Chunking, embedding, vector search, hybrid retrieval, evaluation, advanced RAG patterns
Model Context Protocol
Protocol design, transport, tools/resources/prompts, security, ecosystem, real-world use
From passive chatbots to autonomous agents
An agentic AI system perceives its environment, reasons about goals, and takes autonomous actions to achieve them — without step-by-step human instruction.
LLMs provide chain-of-thought, step-by-step planning, and the ability to decompose complex tasks into sub-tasks.
Humans interact in plain language. The agent translates intent into structured actions.
Many agents write and execute Python/shell code as a primary tool for computation and data manipulation.
Agents critique their own outputs, retry on failure, and learn from mistakes within a session.
User messages, sensor data, file contents, web pages, API responses
LLM call with system prompt, tools schema, conversation history, planning instructions
Function calls, code execution, API invocations, file writes, UI actions
Agents declare tools as structured JSON schemas. The LLM selects which tool to call and with what arguments.
Complex tasks are broken into manageable sub-tasks. Two dominant approaches:
Interleaves reasoning traces with actions. Each step: Thought -> Action -> Observation.
LLM generates a multi-step plan upfront, then executes. Supports backtracking and replanning on failure.
Conversation history within the LLM context window. Manages token budgets via sliding window or summarization.
Stores past interactions, outcomes, and reflections. Retrieved via vector similarity when relevant.
Learned skills, reusable patterns, and cached tool outputs. Persists across sessions.
Multiple specialized agents collaborate, debate, and delegate to solve complex tasks.
Each agent specializes. The orchestrator coordinates, reviews quality, and handles failures.
Agents need structured protocols to coordinate, share context, and resolve conflicts.
Agents exchange typed messages (e.g., JSON) containing intent, data, and results. Supports pub/sub or direct routing.
A common data store where agents read and write intermediate results. Useful for parallel execution.
One agent calls another agent as if it were a tool, passing control and receiving results synchronously.
Protocols like A2A (Agent-to-Agent) are emerging to standardize inter-agent contracts.
Graph-based state machine for agents. Nodes = steps, edges = transitions. Built-in persistence, streaming, human-in-the-loop.
Multi-agent orchestration with role-based agents, task delegation, and built-in tooling. Python-native, simple API.
Multi-agent conversations with flexible agent roles, code execution, and group chat patterns.
Lightweight SDK for single and multi-agent apps with guardrails, handoffs, and tracing.
Microsoft's AI orchestration SDK. Planners, memory, connectors. Deep Azure integration.
Visual agent builders with drag-and-drop workflows, tool marketplace, and no-code agent creation.
Autonomous action introduces risk. Every agent system needs layered safety mechanisms.
Agents confidently take wrong actions. Mitigations: verification loops, tool-grounding, confidence thresholds.
Long-running agents exceed context budgets. Solutions: summarization, sliding windows, external memory.
Agents must detect failures, retry intelligently, and know when to escalate to a human.
Multi-step reasoning is expensive. Caching, model selection, and parallel execution help manage costs.
How do you grade an autonomous agent? Complex trajectory evaluation, outcome scoring, and simulation-based testing.
Tool misuse, prompt injection, data exfiltration. Need sandboxing, permission models, and input validation.
Agents that improve from feedback and outcomes across sessions — not just within a single context window.
Buy/sell pre-built agents for specific domains: customer support, data analysis, DevOps, legal research.
Interconnected agents across departments sharing context, tools, and governance — the "operating system" of the company.
Small, fast models running locally for privacy-sensitive tasks. Hybrid cloud/edge architectures.
Emerging frameworks for agent accountability, disclosure (AI acting autonomously), and audit trails.
Agents as copilots, not replacements. Dynamic handoff, shared context, and mixed-initiative interaction.
Grounding LLMs in external knowledge
LLMs are frozen in time at training cutoff. They hallucinate, lack access to private data, and cannot cite sources. RAG solves this by retrieving relevant documents at inference time.
Indexing pipeline (offline) + Retrieval pipeline (online)
Split by token count with overlap. Simple but can break semantic units (e.g., splitting a table in half).
Split at natural boundaries: paragraphs, sections, markdown headers. Preserves meaning.
Use an LLM to identify logical chunks. Most expensive but best quality for complex docs.
Embed full document then extract chunk vectors from contextualized representations. Best of both worlds.
Embeddings convert text into dense numerical vectors. Semantically similar texts produce nearby vectors.
Fully managed, serverless. High performance, hybrid search, metadata filtering. Good for production at scale.
Open-source, hybrid (vector + keyword). Built-in modules for Q&A, summarization, generative search.
Rust-based, fast filtering, quantization support. Self-hosted or cloud. Very developer-friendly.
Cloud-native, GPU-accelerated. Handles billion-scale with sharding and replication.
Lightweight, embedded. Great for prototyping. In-memory with optional persistence.
PostgreSQL extension. Perfect if you already use Postgres. IVFFlat and HNSW indexes.
Vector search finds semantic matches but can miss exact keyword matches. Keyword search (BM25) excels at exact terms. Hybrid combines both with reciprocal rank fusion (RRF).
Reduces search space, improves relevance. Critical for enterprise RAG.
A cross-encoder (e.g., Cohere Rerank, BGE Reranker) scores retrieved chunks against the query for precision. Top-3 from top-20.
LLM extracts only relevant sentences from retrieved chunks. Reduces token usage and noise.
Multiple retrieval sources (vector + keyword + graph) fused into one ranked set before LLM.
Map generated sentences back to source chunks. Enables grounded, verifiable answers.
An agent decides when and how to retrieve. It can ask clarifying questions, iterate on search, and combine multiple sources autonomously.
LLM generates special tokens to reflect on relevance, support, and usefulness of retrieved passages. Decides whether to retrieve at all.
If retrieved docs are irrelevant, the system triggers web search or retries with a different query. Automatic fallback.
Extract entities and relationships into a knowledge graph. Answer questions by traversing the graph + vector retrieval.
Retrieve images, tables, audio alongside text. Use vision-language models for answers grounded in multi-modal context.
Continuously index streaming data (news, logs, chats). Freshness-aware retrieval prioritizes recency.
RAGAS TruLens DeepEval LangSmith Arize — Automated eval with LLM-as-judge and human annotation.
LLMs focus on top/bottom of context, ignore middle. Fix: re-rank, place best docs first and last.
Answer spans across chunks. Fix: overlapping chunks, sentence-window retrieval, or late chunking.
Knowledge changes but index is outdated. Fix: incremental indexing, TTL-based refresh, change detection.
Vague queries retrieve garbage. Fix: query rewriting, clarification agents, HyDE.
Too many chunks exceed LLM context. Fix: compression, stricter top-k, better chunking.
Embedding + retrieval + generation. Fix: caching, async pipeline, smaller models for retrieval.
Document parsing (PDF, HTML, PPTX), cleaning, chunking, embedding.
Async, cached, monitored. A/B testable retrieval strategies.
Trace every step: query, retrieved chunks, reranker scores, LLM response, citations. Alert on low recall or high hallucination.
Log user feedback, mark bad retrievals, re-chunk problematic documents, fine-tune embedding models on domain data.
The convergence: an agent that decides how and when to retrieve knowledge.
Retrieve and reason over images, tables, charts, and audio alongside text.
1M+ token context windows reduce the need for retrieval. But cost and latency still favor RAG for most use cases.
Models that natively learn when and what to retrieve (e.g., RETRO, Atlas). Retrieval as part of the model architecture.
Agents proactively curate knowledge: identify gaps, trigger indexing, summarize and merge documents.
User-specific retrieval: re-rank based on user history, role, preferences. Context-aware personalization.
Standardized eval suites: RGB, CRUD, FRAMES. Better metrics for faithfulness and citation quality.
Managed RAG APIs (OpenAI, Cohere, Google). Bring your own data, get a hosted RAG pipeline in minutes.
Standardizing AI-to-tool communication
MCP is an open protocol (Anthropic-led) that standardizes how AI applications connect to external tools, data sources, and services.
Think of it as "USB-C for AI" — a universal connector instead of a dozen proprietary integrations.
Every agent framework reinvents tool integrations. Fragmented, non-portable, duplicated effort.
One protocol. Any MCP server works with any MCP client. Plug and play.
The AI application — agent framework, IDE, CLI tool. Initiates connection and manages sessions.
Exposes capabilities: tools, resources, prompts. Can run locally or remotely.
Parent process spawns child MCP server. Communication over stdin/stdout. Fast, simple, local-only.
Server-Sent Events over HTTP. Supports remote MCP servers, streaming, and reconnection.
HTTP with streaming responses. Combines request/response with server-sent events.
stdio: Lowest latency, local only
SSE: Remote capable, persistent connection
HTTP: Stateless, firewall-friendly
Tools are functions the model can call. They are the primary way agents take action.
Resources expose data to the model — documents, database records, images, logs. Like a read-only filesystem for AI.
Prompts are templated messages that guide model behavior. Servers expose pre-built prompts for common tasks.
Clients can use these prompts as building blocks for complex agent workflows.
Server-to-client LLM request. A server can ask the client to generate text — enabling agent-to-agent, summarization, and moderation flows.
The client tells the server about its workspace — directories, URLs, or resources the server is allowed to access.
Real-time updates. Servers push changes when resources or tools change. Clients push cancellation or progress.
Together they enable dynamic, responsive integrations — the server adapts to the client's environment.
The host application retains full control over which MCP servers to connect, what resources to share, and which tool calls to approve.
Users must explicitly approve server connections, resource access, and potentially dangerous tool calls (e.g., file write, shell exec).
Servers only access resources within declared roots. No arbitrary filesystem or network access without explicit permission.
All tool calls, resource reads, and sampling requests are logged. Full traceability for security review.
Run remote MCP servers with authentication. Validate all tool arguments server-side. Never expose MCP servers to untrusted clients without sandboxing.
TypeScript, Python, Java, Kotlin. Reference implementations maintained by Anthropic.
Claude Desktop OpenCode VS Code (Cline) Continue.dev Windsurf Cursor
npm @modelcontextprotocol PyPI mcp Smithery MCPHub
Filesystem, GitHub, Slack, Postgres, Brave Search, Puppeteer, Docker, Kubernetes, SQLite
LangChain, CrewAI, AutoGen, Semantic Kernel all support MCP tools natively.
Azure API Management, Kong, Envoy adding MCP support for enterprise governance.
MCP doesn't replace function calling — it standardizes the layer above it.
VS Code extension connects to filesystem MCP, GitHub MCP, terminal MCP. Agent reads files, commits code, runs tests.
MCP servers for CRM, knowledge base, ticketing system, and email. Agent handles end-to-end support workflows.
Postgres MCP + Kubernetes MCP + Monitoring MCP. Agent diagnoses slow queries, scales pods, and optimizes schemas.
Web search MCP + PDF reader MCP + ArXiv API MCP + Note-taking MCP. Agent conducts literature surveys.
CI/CD MCP + Cloud provider MCP + Incident management MCP. Agent triages alerts, rolls back deployments, and runs diagnostics.
SQL MCP + Pandas execution MCP + Visualization MCP. Agent explores data, runs statistical tests, and generates charts.
Retrieval grounds the agent. MCP empowers it. Memory sustains it.
Need factual grounding, citations, dynamic knowledge. Avoid: when all knowledge fits in context or data is highly structured (use SQL instead).
Multi-step tasks, tool orchestration, autonomous decision making. Avoid: simple Q&A, single-turn classification.
Multiple tools, provider-agnostic design, pluggable architecture. Avoid: one-off simple integration with a single API.
Complex enterprise workflows: support bots, research assistants, DevOps automation, code generation platforms.
RAG pipelines are becoming MCP servers. Agent frameworks are becoming MCP hosts. The stack is standardizing.
Small embedding models, small rerankers, small agents. Distillation enables on-device intelligence.
Agents that see, hear, and interact with the physical world. MCP extending to vision and audio tools.
EU AI Act, US executive orders. Traceable agent decisions, grounded RAG outputs, auditable MCP call logs.
Agents that evaluate their own RAG quality, register new MCP tools, and optimize their own prompts at runtime.
Open-source models + open protocols + open tool registries. The AI stack is becoming as standardized as the web.
Questions & Discussion
Full slide deck available at this URL