LLM Engineering

Fine-Tuning LLMsSectionFine-tuning large language models: instruction tuning, RLHF and DPO, LoRA and QLoRA, distillation, and when… AI Systems DesignSectionStaff-level system design walk-throughs for AI/ML systems.

Production patterns for building LLM-backed systems in 2026 — agents that actually work, structured output that actually parses, retrieval that actually retrieves, and inference stacks that actually scale. The pages below are notes from shipping these patterns in real systems, not vendor pitches.

The cluster covers six concrete areas: agent loops and the Model Context Protocol; reliable function calling and structured output across providers; evaluating RAG without fooling yourself; hybrid search and reranking; self-hosting open-weights models with vLLM; and orchestration frameworks (LangGraph, DSPy) — including when none of them are needed.


Pages in this Cluster

Agents and MCPagentsReAct loops, tool-use, multi-agent orchestration, and the Model Context Protocol (MCP) for decoupling tools… Function Calling and Structured Outputagentsgetting reliable JSON out of OpenAI, Anthropic, Bedrock, and Gemini using strict schemas, Pydantic,… RAG Evaluation with RAGASretrievalfaithfulness, answer relevancy, context precision/recall; LLM-as-judge done correctly; offline vs online… Hybrid Search and RerankingretrievalBM25 + dense + Reciprocal Rank Fusion, cross-encoder rerankers (bge, Cohere Rerank v3, ColBERT), and latency… vLLM and QuantizationproductionPagedAttention, continuous batching, AWQ/GPTQ/FP8/GGUF, and how to pick a serving stack (vLLM, TGI, SGLang,… LangGraph and DSPyagentsstateful graph orchestration with checkpointing vs declarative LM programs with prompt optimizers, and when…

Companion pages on the rest of the site: Amazon Bedrock, RAG, Vector Databases, Hugging Face.

1. How the Pieces Fit

LLM Application Stack Applicationchat, copilot, pipelineAgents and Orchestrationtools, MCP, LangGraphRetrievalhybrid search, rerankModel Interfaceprompts, structured outputServing and OpsvLLM, quantization, evalsRetrieval and tools supply context; structured output makes model responses machine-usable; serving and evaluation keep it running.

An LLM application is a stack. At the bottom, a model is served either through a hosted API or a self-hosted engine; the Production folder covers serving, quantization, model comparison and LLMOps. Above that, the model interface turns free text into reliable data through prompt design and structured output; see Prompt Engineering. The Retrieval folder covers grounding answers in your own documents and measuring whether that works. The Agents folder covers loops in which the model calls tools and decides the next step. The Agent Zero folder holds career and role notes, including AI Engineer vs ML Engineer.

2. Where to Start

GoalStart with
Get consistent JSON from a modelFunction Calling and Structured Output
Answer questions over company documentsHybrid Search and Reranking, then RAG Evaluation
Let the model take multi-step actionsAgents and MCP, LangGraph and DSPy
Choose a model or host oneFrontier Model Comparison, vLLM and Quantization
Run it reliably in productionLLMOps and Production

A sensible learning order is bottom-up in risk: first make single calls reliable with structured output and evaluation, then add retrieval, and only then add agent loops, which multiply both capability and failure modes.