Guide
Premium
Intermediate
AI

Tool Use and Function Calling: How to Give an LLM Tools Reliably

Learn to design tools (function calling) an LLM can use reliably: strict JSON schemas with enums and useful descriptions, the full agentic loop, parallel tool calls, argument validation with Pydantic, error handling the model can self-correct from, and the security practices you need before executing real actions. With production-ready code in Python and TypeScript. Expanded edition: Anthropic and Gemini APIs, tool_choice, structured output, argument streaming, timeouts and idempotency, context management, evals in CI, observability with OpenTelemetry, prompt injection, subagents, MCP, advanced patterns, a complete case study, and a production checklist. New expansion: human-in-the-loop and async approvals, multi-tenancy and identity (OAuth token exchange), scaling to hundreds of tools with dynamic selection, and programmatic tool calling.

47 minutes read
2 views

Verificando acceso...

Loading comments...

Related Resources

Tutorial

Tutorial: Introduction to LangChain

Learn the basics of LangChain to build AI applications. From installation to your first functional pattern.

Guía
PREMIUM

Context Engineering for AI Agents: Compaction, External Memory, and Subagents

Learn to treat your agent's context window as the finite resource it is: the four levers of context engineering (write, select, compress, isolate), compaction with structured summaries, persistent memory outside the context, just-in-time retrieval, subagents with isolated windows, and tool-result hygiene. With production-ready Python code and the mistakes that silently degrade your agent. New expansion: the context-failure taxonomy (poisoning, distraction, confusion, clash), reasoning budgets with interleaved extended thinking, the real cost of multimodal context, managed memory (Letta, Zep, mem0), effective context length per RULER, and multi-agent handoffs with structured payloads. Latest expansion: the positional anatomy of context (lost in the middle and cache-aware placement), isolating untrusted content by design with Dual-LLM and CaMeL, and generating outputs longer than the window with outlines, rolling summaries, and patch-based revision. August extension: per-section token budgets with a degradation ladder, prompt compression with LLMLingua, semantic retrieval deduplication, self-hosted KV cache (vLLM and SGLang) with cache-aware routing, and memory evaluation with LongMemEval.

Guía

Guide: RAG in Production — Chunking, Embeddings, Hybrid Search, and Reranking

Battle-tested patterns for building production-ready RAG (Retrieval-Augmented Generation) systems in 2026: semantic chunking, embedding selection, hybrid search, and cross-encoder reranking.