# LLM Ops Guide

> Technical articles on LLM gateways, observability, evaluation, agents, and cost. Written for the engineers who get paged when a model misbehaves.

Articles are organized by the stage of a request they concern. Each article states its answer in the first paragraph, lists key takeaways, and ends with links to primary sources.

## Gateways & Routing

The layer between your application and model providers. Routing, failover, rate limits, and API keys.

- [Kong AI Gateway alternatives: 6 options compared](https://llmopsguide.com/articles/kong-ai-gateway-alternatives): The best Kong AI Gateway alternatives for LLM and MCP traffic: six gateways compared on licensing, MCP support, deployment, and the work of moving off Kong.
- [Rate limiting for LLM APIs: tokens per minute, not requests](https://llmopsguide.com/articles/llm-rate-limiting): Rate limiting caps how fast a caller can use an API. Why LLM rate limits are counted in tokens, how 429s and retry-after work, and how to set per-team limits.
- [Bifrost AI gateway: open source, Enterprise, and pricing](https://llmopsguide.com/articles/bifrost-ai-gateway): The Bifrost AI gateway is a self-hosted, open-source gateway for model, MCP, and agent traffic. What is free, what Enterprise adds, and how it is priced.
- [Enterprise AI gateway comparison: 8 options for 2026](https://llmopsguide.com/articles/enterprise-ai-gateways): An enterprise AI gateway adds single sign-on, access control, audit logs, and private deployment to LLM routing. Eight options compared on nine controls.
- [Claude Code gateway: per-developer keys, budgets, and logs](https://llmopsguide.com/articles/claude-code-gateway): A Claude Code gateway is a proxy between developers' sessions and the model provider. The settings that point at it, what it must forward, and what it costs.
- [LLM failover: retries, fallbacks, and circuit breakers](https://llmopsguide.com/articles/llm-failover): LLM failover is what runs after a model call fails. Which errors to retry, the order to add fallbacks and circuit breakers, and what each one costs.
- [LiteLLM alternatives: 6 gateways compared for 2026](https://llmopsguide.com/articles/litellm-alternatives): The best LiteLLM alternatives for teams that run the SDK or the proxy today: six gateways compared on overhead, footprint, licensing, and migration effort.
- [OpenRouter alternatives: 6 options compared for 2026](https://llmopsguide.com/articles/openrouter-alternatives): The best OpenRouter alternatives for teams that need their own keys, budgets, or data path: self-hosted gateways, hosted gateways, and cloud platforms.
- [Open-source AI gateways compared: 7 options for 2026](https://llmopsguide.com/articles/open-source-ai-gateways): An open-source AI gateway lets you self-host routing, keys, and budgets for LLM traffic. Seven options compared on license, scope, and paid tiers.
- [LLM routing: how to pick a model for every request](https://llmopsguide.com/articles/llm-routing): LLM routing decides which provider and model serve each request. Five strategies, what each one costs, and why provider caches should shape your rules.
- [Virtual keys: per-team budgets and rate limits for LLMs](https://llmopsguide.com/articles/virtual-keys): Virtual keys are gateway-issued credentials that stand in for provider keys. How to structure them, enforce AI budgets and rate limits, and fail callers safely.
- [vLLM vs Ollama vs llama.cpp for self-hosted LLMs](https://llmopsguide.com/articles/vllm-vs-ollama): vLLM vs Ollama vs llama.cpp: what each self-hosted LLM tool is built for, how they differ on concurrency, hardware, and quantization, and which to run where.
- [vLLM vs SGLang vs TensorRT-LLM: choosing an inference engine](https://llmopsguide.com/articles/vllm-vs-sglang): vLLM vs SGLang vs TensorRT-LLM: how each inference engine batches, caches, and schedules, where each one wins, and why you benchmark on your own traffic.
- [What an LLM gateway does, and when you need one](https://llmopsguide.com/articles/what-is-an-llm-gateway): An LLM gateway is a proxy between your applications and model providers. It gives you one API, one place for keys and budgets, and shared failover.

## Context & Caching

What goes into the context window, what it costs, and how to stop paying for the same tokens twice.

- [Context window: what fits, what it costs, when bigger hurts](https://llmopsguide.com/articles/context-window): A context window is the token limit one model call shares between input and output. What fills it, window sizes, what long inputs cost, and where quality falls.
- [LoRA and QLoRA: fine-tuning a model on one GPU](https://llmopsguide.com/articles/lora-fine-tuning): What LoRA is, how rank, alpha, and target layers work, what QLoRA adds, the memory math for a 7B model, and how to serve adapters merged or side by side.
- [Embedding models: how to pick one for retrieval](https://llmopsguide.com/articles/embedding-models): An embedding model turns text into vectors that retrieval compares by angle. What to weigh when picking one, why models can't share an index, and how to test.
- [What is a token in AI? How models count and bill them](https://llmopsguide.com/articles/what-is-a-token): A token is the unit a language model reads, writes, and bills by. How tokenizers split text, why counts differ by model and language, and how to count first.
- [Chunking strategies for RAG: size, overlap, and when to skip](https://llmopsguide.com/articles/chunking-strategies): Chunking strategies decide where documents are cut before retrieval. What published tests say about chunk size, overlap, semantic chunking, and skipping it.
- [RAG vs fine-tuning: which one fixes which problem](https://llmopsguide.com/articles/rag-vs-fine-tuning): RAG vs fine-tuning: RAG fixes what a model does not know, fine-tuning fixes how it behaves. A decision table, real costs, and when a long prompt beats both.
- [Prompt caching: how it works and what it saves](https://llmopsguide.com/articles/prompt-caching): Prompt caching lets a provider reuse its work on the start of a prompt. Repeated prefixes are billed at a fraction of the input price if they never change.
- [Semantic caching: when it saves money and when it is wrong](https://llmopsguide.com/articles/semantic-caching): Semantic caching returns a stored LLM answer when a new prompt means the same as an old one. How it works, where it returns wrong answers, and how to scope it.
- [KV cache explained: memory math, paging, and prefix reuse](https://llmopsguide.com/articles/kv-cache): The KV cache keeps attention keys and values so a model never recomputes old tokens. How big it gets, why it caps batch size, and how engines page and reuse it.
- [Context engineering: what to put in the window and where](https://llmopsguide.com/articles/context-engineering): Context engineering decides which tokens a model sees on each call. How to budget the context window, order it for caching, and load what the model needs late.
- [Context rot: why long prompts make models worse](https://llmopsguide.com/articles/context-rot): Context rot is the drop in output quality as a prompt gets longer, even inside the context window. What causes it and how to keep an agent's context small.

## Agents & MCP

Tool calls, the Model Context Protocol, and the plumbing that lets a model act on other systems.

- [Prompt chaining: when to split a prompt into steps](https://llmopsguide.com/articles/prompt-chaining): Prompt chaining splits one LLM task into steps that feed each other. When a chain beats one prompt, the four patterns, and how to pass data and test each step.
- [Structured outputs: JSON mode, schemas, and how they fail](https://llmopsguide.com/articles/structured-outputs): Structured outputs make a model return JSON that matches your schema. How constrained decoding works, what OpenAI, Claude, and Gemini support, and how it fails.
- [Agent gateway: what it adds beyond an LLM gateway](https://llmopsguide.com/articles/agent-gateway): An agent gateway governs an agent's calls to models, tools, and other agents. What it enforces on each kind of traffic, and how it differs from an LLM gateway.
- [Skills vs MCP: when a skill beats a server](https://llmopsguide.com/articles/skills-vs-mcp): An Agent Skill is a folder of instructions and scripts loaded on demand. An MCP server is a program that exposes tools. What each costs, reaches, and risks.
- [Cursor vs Claude Code: which coding agent, for which team](https://llmopsguide.com/articles/cursor-vs-claude-code): Cursor vs Claude Code compared on how each runs edits, finds code, picks models, and lets admins cap spend, with each vendor's pricing as of November 2026.
- [Multi-agent systems: when to split agents and what it costs](https://llmopsguide.com/articles/multi-agent-systems): Multi-agent systems run one task across several LLM agents, each with its own context. When to split an agent, which patterns fit, and what a split costs.
- [Best MCP servers for engineering teams: 10 worth running](https://llmopsguide.com/articles/best-mcp-servers): The best MCP servers come from the vendor that owns the system, use OAuth, and can be narrowed. Ten that pass, with transport, auth, and what to watch.
- [MCP code mode: how it works and when it beats tool calling](https://llmopsguide.com/articles/mcp-code-mode): MCP code mode has the model write one short program against a typed tool API and run it in a sandbox. How it works, three implementations, and when to use it.
- [A2A protocol: how agents call agents, and where MCP stops](https://llmopsguide.com/articles/a2a-protocol): The A2A protocol lets one AI agent discover another, hand it a task, and follow the result. How agent cards and tasks work, and when MCP is enough.
- [What an MCP gateway does, and when you need one](https://llmopsguide.com/articles/mcp-gateway): An MCP gateway sits between agents and MCP servers. It authenticates callers, filters which tools each one sees, and records every tool call in one place.
- [Agent loop: how AI agents run, and the guards they need](https://llmopsguide.com/articles/agent-loop): An agent loop calls a model, runs the tools it asks for, and repeats. How one run works, where ReAct fits, and the budgets and gates a production loop needs.
- [Tool calling: how LLM function calling works in production](https://llmopsguide.com/articles/tool-calling): Tool calling lets a model ask your code to run a function and send back the result. How the loop works, how to control it, and where the risk sits.
- [What is MCP? The Model Context Protocol in production](https://llmopsguide.com/articles/what-is-mcp): MCP, the Model Context Protocol, lets LLM apps use tools and data through one interface. What an MCP server is, how it works, and what to secure.

## Guardrails & Security

Prompt injection, data leakage, and the checks that run before and after a model call.

- [Amazon Bedrock Guardrails: what it covers and where it stops](https://llmopsguide.com/articles/bedrock-guardrails): Amazon Bedrock Guardrails checks prompts and responses against policies you configure. What each policy catches, how to apply it to any model, and its gaps.
- [AI security tools for LLM apps: 8 compared](https://llmopsguide.com/articles/ai-security-tools): The AI security tools worth comparing for LLM apps, grouped by where they sit: gateway, runtime guardrail, red teaming, and employee AI discovery.
- [AI governance: controls you can enforce and prove](https://llmopsguide.com/articles/ai-governance): AI governance is the set of rules for who may use which AI, with what data, at what cost. Eight controls, where to enforce each, and the evidence it leaves.
- [Netskope AI Gateway alternatives: 5 options compared](https://llmopsguide.com/articles/netskope-ai-gateway-alternatives): The best Netskope AI Gateway alternatives are Bifrost, Zscaler AI Guard, Cloudflare, Kong, and Azure API Management, compared from each vendor's docs.
- [PII redaction for LLMs: when to mask, tokenize, or block](https://llmopsguide.com/articles/pii-redaction): PII redaction removes or replaces personal data before a model, a log, or a trace keeps it. Where to apply it, what detection misses, and which action fits.
- [OWASP LLM Top 10: the 2026 risks and who owns each control](https://llmopsguide.com/articles/owasp-llm-top-10): The OWASP LLM Top 10 ranks the ten most critical security risks in LLM applications. The 2026 list, what changed, and the control and owner for each risk.
- [MCP security: tool poisoning, token passthrough, and fixes](https://llmopsguide.com/articles/mcp-security): MCP security means containing poisoned tool descriptions, misused OAuth tokens, and over-privileged local servers. Nine attacks, each with its control.
- [Shadow AI: how to find it and give people a better path](https://llmopsguide.com/articles/shadow-ai): Shadow AI is AI use your company has not approved or cannot see. Where it shows up, how detection works, where it fails, and why a sanctioned path beats a ban.
- [Prompt injection: why filters miss it and what contains it](https://llmopsguide.com/articles/prompt-injection): Prompt injection is text that makes a model follow an attacker's instructions. How direct and indirect attacks work, and the defenses that limit the damage.
- [LLM guardrails: where to put them and what they cost](https://llmopsguide.com/articles/llm-guardrails): LLM guardrails are checks outside the model that block or change requests and responses. Where to put them, which tools to use, and what they cost.

## Observability

Traces, token counts, and latency. What to record on every request so you can explain a bad answer.

- [Datadog LLM Observability: what it covers and alternatives](https://llmopsguide.com/articles/datadog-llm-observability): Datadog LLM Observability, now Agent Observability, traces model calls next to APM. What it records, how LLM span billing works, its gaps, and the alternatives.
- [Claude Code usage: limits, tracking, and per-developer costs](https://llmopsguide.com/articles/claude-code-usage): Claude Code usage is either drawn from a Claude plan's limits or billed per API token. How to check it with /usage, track it per developer, and cap it.
- [LLM cost optimization: 9 ways to cut the bill, by effort](https://llmopsguide.com/articles/llm-cost-optimization): LLM cost optimization means paying less per request without losing answer quality. How the bill is built, how to measure it, and nine cuts ranked by effort.
- [What is LLMOps? The six jobs between a model and production](https://llmopsguide.com/articles/what-is-llmops): LLMOps is the work of running a model you did not train as a feature users depend on. The six jobs, what breaks without each, and what to build first.
- [AI agent observability: trace the run, not the request](https://llmopsguide.com/articles/ai-agent-observability): AI agent observability records a whole agent run as one trace, with every model and tool call. What to record, OpenTelemetry span names, and what to alert on.
- [Time to first token and the other LLM latency numbers](https://llmopsguide.com/articles/time-to-first-token): Time to first token is the wait before a model's first output token. How it differs from inter-token and end-to-end latency, and where to measure each one.
- [LLM observability: what to record on every request](https://llmopsguide.com/articles/llm-observability): LLM observability means you can explain any single response from recorded data. The fields to record, their OpenTelemetry names, and what not to store.
- [Speculative decoding: how draft tokens cut LLM latency](https://llmopsguide.com/articles/speculative-decoding): Speculative decoding has a cheap draft propose tokens that the target model checks in one pass. How it works, the speedup math, and when it stops paying off.

## Evaluation

How to measure whether an LLM system is right, before release and on live traffic.

- [AI agent evaluation: grade the outcome, then the trajectory](https://llmopsguide.com/articles/ai-agent-evaluation): AI agent evaluation grades a whole agent run: each step, the trajectory, and the end state. Metrics for each level, repeated trials, and what to build first.
- [RAG evaluation: the metrics that show which half failed](https://llmopsguide.com/articles/rag-evaluation): RAG evaluation scores retrieval and generation separately, then checks the answer end to end. The metrics, what each one needs, and how to read a result.
- [Hallucination detection: 3 methods that work in production](https://llmopsguide.com/articles/hallucination-detection): Hallucination detection with grounding checks, consistency sampling, and semantic entropy: what each catches, what it costs, and why models hallucinate.
- [LLM as a judge: how to build an evaluator you can trust](https://llmopsguide.com/articles/llm-as-a-judge): LLM as a judge means grading model output with another model. The three judge types, their measured biases, and how to calibrate a judge against human labels.
- [LLM evaluation: offline evals, online evals, and metrics](https://llmopsguide.com/articles/llm-evaluation): LLM evaluation measures whether an LLM system does its job. How to build the dataset, run offline and online evals, choose metrics, and gate a release.

## Optional

- [About](https://llmopsguide.com/about): Scope, audience, and editorial rules.
- [RSS feed](https://llmopsguide.com/rss.xml): New articles as they are published.
