# Learn Backend > You already ship backend systems. Learn to ship LLM systems to production: RAG, agents, evals, cost and latency. A free, text-first track for engineers. ## AI Engineering for Backend Developers A free, text-first track that takes an experienced backend engineer from zero LLM experience to shipping production AI systems: LLM APIs, structured output, RAG, agents, evals, observability, and cost/latency engineering. Every lesson assumes you already know APIs, databases, and queues, because that knowledge is your advantage. - [What LLMs Actually Do](https://learnbackend.com/ai-engineering/llm-foundations/what-llms-actually-do/): A backend engineer's mental model for LLMs: next-token prediction, weights vs context, stateless APIs, and hallucination as a property to engineer around. - [Tokens, Context Windows, and Your New Resource Limits](https://learnbackend.com/ai-engineering/llm-foundations/tokens-context-windows-and-limits/): Tokens are the byte of LLM systems: the unit of billing, latency, and memory. Budget a context window and cost a feature out before you ship it. - [Your First LLM API Call](https://learnbackend.com/ai-engineering/llm-foundations/your-first-llm-api-call/): Demystify LLM APIs with raw curl calls, message roles, the parameters that matter, streaming, and key hygiene, for backend engineers. - [How to Choose an LLM in 2026: A Backend Engineer's Decision Framework](https://learnbackend.com/ai-engineering/llm-foundations/choosing-a-model-like-a-database/): A backend engineer's map of the mid-2026 LLM landscape: model tiers, real costs per million tokens, and a decision framework that actually works. - [LLM Latency, Cost, and Non-Determinism in Production: Where Backend Instincts Break](https://learnbackend.com/ai-engineering/llm-foundations/non-determinism-latency-and-cost/): Three properties of LLM calls that break backend intuition: non-deterministic output, alien latency profiles, and token-based cost. What to do about each. - [The Production LLM Stack: Every Component, Mapped to Backend Infrastructure](https://learnbackend.com/ai-engineering/llm-foundations/the-production-ai-stack/): A component-by-component tour of a production LLM system, each piece mapped to backend infrastructure you already run, and the roadmap for this track. - [Pin Your Model Like You Pin Your Packages](https://learnbackend.com/ai-engineering/working-with-llm-apis/model-versioning-and-deprecations/): Model IDs are versions, aliases move under you, and deprecations have deadlines. How to pin, monitor, and upgrade your LLM dependency like any other. - [The API Is Stateless. Your Chat Isn't.](https://learnbackend.com/ai-engineering/working-with-llm-apis/conversation-state-and-history/): The LLM API keeps no session state, so your chat feature needs a transcript store, a token budget, and a truncation strategy. Build all three. - [What's Actually in the Stream](https://learnbackend.com/ai-engineering/working-with-llm-apis/anatomy-of-an-llm-stream/): What an LLM stream actually sends: OpenAI chunks vs Anthropic events, delta aggregation, mid-stream errors, and canceling generations nobody is reading. - [When the Model Has a Bad Day](https://learnbackend.com/ai-engineering/working-with-llm-apis/failure-modes-and-degradation/): LLM calls fail three ways: real errors, hangs, and 200s that lie. Map each failure to what your API serves instead, from a cached copy to a hidden feature. - [Rate Limits Are a Capacity Contract](https://learnbackend.com/ai-engineering/working-with-llm-apis/rate-limits-and-capacity/): RPM and TPM are capacity contracts, not suggestions. Read the rate-limit headers, throttle client-side, and plan token headroom before the 429s arrive. - [Abstract the Provider, Not the Prompt](https://learnbackend.com/ai-engineering/working-with-llm-apis/provider-abstraction/): Design the one seam every LLM call goes through: a normalized client interface over OpenAI and Anthropic dialects, and when to buy a gateway instead. - [The System Prompt Is an API Contract](https://learnbackend.com/ai-engineering/prompting-and-structured-output/system-prompt-design/): The system prompt is your service's interface definition. Structure it like config, separate instructions from data, and set precedence rules. - [Examples Are Fixtures You Ship on Every Request](https://learnbackend.com/ai-engineering/prompting-and-structured-output/few-shot-examples/): Few-shot examples are test fixtures you ship on every request. When examples beat instructions, how to pick them, and what they cost in tokens. - [Prompts Are Config That Can Take Down Prod](https://learnbackend.com/ai-engineering/prompting-and-structured-output/prompt-versioning-and-rollback/): Prompts are hot-path config written in English. Version them in git, deploy them like code, log the version on every call, and roll back in one step. - [Three Ways to Get JSON Out of a Model](https://learnbackend.com/ai-engineering/prompting-and-structured-output/json-mode-vs-structured-outputs/): JSON mode, structured outputs, and the forced tool call solve different problems. What each guarantees, what it doesn't, and which one to reach for. - [Schemas the Model Can Fill, Tools the Model Can Call](https://learnbackend.com/ai-engineering/prompting-and-structured-output/schemas-and-tool-definitions/): Enums over free strings, flat over nested, descriptions as docs. Design schemas a model can fill, then define your first tool the same way. - [Model Output Is Untrusted Input](https://learnbackend.com/ai-engineering/prompting-and-structured-output/validating-llm-output/): Schema-valid is not correct. Validate model output like user input with Zod, repair failures once, then compose it all into a typed LLM function. - [Retrieval Is a Search Problem You Already Own](https://learnbackend.com/ai-engineering/rag-and-embeddings/when-retrieval-is-the-answer/): Retrieval is an indexing pipeline plus a query path. When RAG beats long context or fine-tuning, and the four-way decision behind the choice. - [Embeddings Are an Index, Not Magic](https://learnbackend.com/ai-engineering/rag-and-embeddings/embeddings-as-an-index/): What an embedding actually is, why the distance metric matters, and how HNSW and IVFFlat trade recall for latency like any index you already tune. - [Chunking Is Schema Design](https://learnbackend.com/ai-engineering/rag-and-embeddings/chunking-is-schema-design/): The chunk is your retrievable unit, so chunking is a schema decision: size, overlap, structure, metadata columns, and parent-document retrieval. - [The Ingestion Pipeline Is an ETL Job](https://learnbackend.com/ai-engineering/rag-and-embeddings/the-ingestion-pipeline/): Extract, chunk, embed, upsert. How to make RAG ingestion idempotent, batched against rate limits, and safe to resume after a failure mid-corpus. - [Fixing Retrieval, Not the Model](https://learnbackend.com/ai-engineering/rag-and-embeddings/retrieval-quality/): Four ways retrieval fails, and the fixes in order: hybrid search, reranking, metadata filters as a security boundary, and a real context budget. - [Capstone: A RAG Service Behind One Function](https://learnbackend.com/ai-engineering/rag-and-embeddings/capstone-rag-service/): One typed function over the module 3 seam: retrieve, ground the answer, fail closed when nothing is found, emit the trace fields that debug it. ## System Design for Backend Developers System design taught properly: estimation, networking, databases at scale, caching, queues, reliability, and case studies. Start from first principles, leave with production instincts and the numbers to defend your designs. - [Estimation Settles Design Arguments](https://learnbackend.com/system-design/foundations-and-estimation/back-of-envelope-estimation/): Two engineers argue about scale until someone does the arithmetic. The four numbers every estimate starts from, and how to run them in your head. - [The Latency Numbers Worth Knowing by Heart](https://learnbackend.com/system-design/foundations-and-estimation/latency-numbers-that-matter/): Memory, SSD, network, cross-region: the ratios between them decide most designs. The numbers worth memorizing, and the two comparisons that matter. - [Your Average Latency Is Lying to You](https://learnbackend.com/system-design/foundations-and-estimation/percentiles-and-tail-latency/): The mean hides the incident. What p99 measures, why tail latency amplifies across fan-out, and why you can never average percentiles together. - [SLIs, SLOs, and the Error Budget](https://learnbackend.com/system-design/foundations-and-estimation/slos-and-error-budgets/): An availability target is a spending decision, not a wish. How to pick an indicator users feel, set a number you can defend, and spend the budget. - [Capacity Planning Without a Crystal Ball](https://learnbackend.com/system-design/foundations-and-estimation/capacity-planning/): Latency does not degrade gently as load rises, it collapses. Little's Law, why 80% utilization is the wall, and how much headroom to actually keep. - [Capstone: Size a System in Ten Minutes](https://learnbackend.com/system-design/foundations-and-estimation/capstone-size-a-system/): One brief, worked end to end: users to QPS, QPS to instances, storage to five years, an SLO, and the headroom to defend it. The same walk every time. ## Interview Prep Interview question decks with production-grade answers, readable as lists or practiced as flashcards. - [Backend Interview Questions, Answered](https://learnbackend.com/interview-prep/backend-fundamentals/): 20 backend interview questions with production-grade answers: HTTP and APIs, databases, caching, queues, auth, and scaling. Readable list or flashcards. (20 questions) - [System Design Interview Questions, Answered](https://learnbackend.com/interview-prep/system-design/): 20 system design interview questions with real answers: estimation, load balancing, sharding, caching, queues, and reliability. Practice as flashcards. (20 questions) - [Database Interview Questions, Answered](https://learnbackend.com/interview-prep/databases/): 20 database interview questions with real answers: query plans, indexes, locking, zero-downtime migrations, partitioning, pooling, and vacuum. (20 questions) ## Guides Decision guides and comparisons for shipping LLM systems from an existing backend stack. - [Keeping Embeddings in Sync With Your Database: Outbox, CDC, and Partial Reindex](https://learnbackend.com/guides/keep-embeddings-in-sync-with-database/): Source rows change and the vector index goes stale. Three patterns for keeping embeddings in sync, with the outbox, CDC, and reindex trade-offs. - [How to Evaluate a RAG Pipeline: Metrics That Can Gate a Deploy](https://learnbackend.com/guides/rag-evaluation-metrics/): Retrieval and generation fail differently, so score them separately. The metrics worth tracking, how to build a golden set, and how to gate CI on it. - [A/B Testing Prompts in Production: Traffic Splits, Guardrail Metrics, and Automatic Rollback](https://learnbackend.com/guides/prompt-ab-testing-and-rollback/): Run two prompt versions against live traffic with the feature flags you already have: consistent splits, guardrail metrics, and automatic rollback. - [Hybrid Search in Postgres: Full-Text + pgvector in One Query, No New Infrastructure](https://learnbackend.com/guides/hybrid-search-postgres-bm25-pgvector/): Combine Postgres full-text search and pgvector with Reciprocal Rank Fusion in one SQL query: schema, the RRF query, tuning, and when you need more. - [LLM Fallbacks in Production: Routing, Retries, and Timeouts](https://learnbackend.com/guides/llm-api-retries-timeouts-fallbacks/): Build an LLM fallback that holds up in production: routing by health, cost, and capability, what to retry, stage-aware timeouts, and how to degrade. - [pgvector vs Pinecone vs Qdrant: Choosing a Vector Store for Your Existing Backend (2026)](https://learnbackend.com/guides/pgvector-vs-pinecone-vs-qdrant/): pgvector, Pinecone, or Qdrant for production vectors? A neutral comparison with a decision table, scale thresholds, and how to benchmark them yourself. - [How to Stream LLM Responses: SSE vs WebSockets (and the Fetch-Stream Option)](https://learnbackend.com/guides/streaming-llm-responses-sse-vs-websockets/): SSE, raw fetch streaming, or WebSockets for LLM tokens? A decision table, a production relay with abort wiring, and the proxy failure modes. - [How to Add an LLM to Your Existing Backend Without Rewriting It: 6 Integration Patterns](https://learnbackend.com/guides/add-llm-to-existing-backend/): Six production patterns for adding LLM features to an existing backend, with code: inline endpoint, queue worker, gateway, pgvector, events, flags. ## Blog - [Relaunching learnbackend.com: AI Engineering for Backend Developers](https://learnbackend.com/blog/relaunching-learnbackend/): Why this site now teaches backend engineers to ship LLM systems to production, and what the free track covers, module by module. ## Feeds - [Full content (plain markdown)](https://learnbackend.com/llms-full.txt) - [RSS](https://learnbackend.com/feed.xml) - [Sitemap](https://learnbackend.com/sitemap.xml)