Skip to main content

Complete learning course

Backend Developer + AI

AI capabilities in reliable backend systems

LLM APIs, RAG, tools, queues, observability, evaluation, and production architecture.

Finish the course with more than a demo that survives one successful request: build a production evidence pack for an AI backend with typed contracts, retries and idempotency, controlled streaming, RAG with ACL and freshness checks, bounded tool actions, an evaluation gate, observability, cost budgets, and a tested rollback path.

0%0/9 lessons

Progress is stored locally in your browser.

10–16 weeks3 modules9 lessons1 assessments

Study operating system

How to complete the course and retain a real result

1. Start from the contract

For every AI feature, define the input/output schema, timeout budget, retry policy, idempotency key, error taxonomy, and authoritative source first. A prompt without a transport and application contract is not yet a backend.

2. Reproduce failure

Add timeout, provider 429/5xx, malformed structured output, duplicate request, client cancellation, and stale retrieval to the happy path. Every failure must end in a predictable system state.

3. Verify the side effect

If the model proposes a tool action, the application layer independently verifies identity, authority, schema, preconditions, and idempotency. Model text is not permission to execute an action.

4. Capture production evidence

Record traces, latency, retries, retrieval evidence, tool decisions, cost per successful task, and regression results. “It answered locally” is a remarkably modest observability stack.

Course rules

Do not merely read it — prove it

  • HTTP 200 from a model provider does not mean the domain result is correct; transport, schema, semantic, and authority checks are separate layers.
  • Retry without idempotency and reconciliation is a duplicate-side-effect generator, not a reliability pattern.
  • Never grant the model authority the authenticated caller does not have; a tool schema does not replace a permission check.
  • Evaluate RAG separately at retrieval and answer layers: a relevant answer from another user’s ACL scope is still a failure.
  • After a production incident, the minimized reproduction becomes a permanent regression case before the next model, prompt, retrieval, or tool change.

Module 1

Shared AI core

Core literacy and output control.

OutcomeSafe and verifiable use of AI.
  1. AI literacy and model limits

    Core

    Capabilities, hallucinations, context limits, privacy, and responsible use.

  2. Prompt and context engineering

    Core

    Instructions, constraints, examples, and output verification.

    Prerequisites: AI literacy and model limits

  3. Structured outputs and evaluation

    Core

    Response schemas, deterministic checks, and test cases.

    Prerequisites: Prompt and context engineering

Checkpoint after module

Backend AI contract baseline

  • ✓ input/output contracts and the failure taxonomy are documented
  • ✓ a verification signal is defined for every AI response
  • ✓ privacy and authority boundaries are marked before integration

Scenario transfer lab

Transfer lab: turn an AI endpoint into a backend contract

Take an endpoint that currently only forwards a prompt to a model. Decompose it into transport contract, model contract, verification, data boundary, and failure states so another backend engineer can implement the client without knowing the magic prompt.

Deliverable

API contract + sequence diagram + failure matrix covering timeout, retry, malformed output, cancellation, privacy boundary, and an owner for every authoritative check.

  • ✓ schema validation happens before domain logic
  • ✓ retry is allowed only for explicitly defined failure classes
  • ✓ the privacy and authority boundary is not delegated to the prompt
  • ✓ critical fields have a deterministic or authoritative verification signal

Module 2

LLM API integration

Contracts, streaming, and reliability.

OutcomeA production-ready AI client.
  1. LLM API contracts

    Core

    Typed schemas, validation, timeouts, retries, and idempotency.

  2. Streaming and backpressure

    Core

    Partial responses, cancellation, and flow control.

  3. Project: production AI API

    Projectpractice + assessment

    Structured outputs, retries, traces, tests, and a cost report.

Checkpoint after module

Resilient LLM API client

  • ✓ timeouts, retries, backoff, and cancellation have executable tests
  • ✓ a duplicate request cannot create a duplicate side effect
  • ✓ structured output is validated before domain logic and streaming cannot bypass final validation

Scenario transfer lab

Transfer lab: retries, idempotency, and streaming under load

Build a resilient AI API client and deliberately break the network and provider path: 429, 5xx, slow stream, disconnect after a partial response, and a repeated request after an unknown outcome. Prove that retry does not multiply side effects or hide terminal failure.

Deliverable

Executable client + failure-injection tests + trace report containing attempts, backoff, cancellation, idempotency key, final state, p95 latency, and cost per successful task.

  • ✓ duplicate delivery cannot create a duplicate write or action
  • ✓ client cancellation actually stops or reconciles the work
  • ✓ partial streaming output is never treated as validated final output
  • ✓ latency and cost are measured per successful task including retries

Module 3

RAG, tools, and production

Knowledge, actions, quality gates, and monitoring.

OutcomeAn AI feature with SLOs, evaluations, and rollback.
  1. RAG service architecture

    Core

    Retrieval, citations, ACL, and freshness.

  2. Tool calling and permissions

    Core

    Typed tools, approvals, and an audit trail.

  3. Milestone: production AI feature

    Milestone

    Evaluations, security review, monitoring, and rollback.

Checkpoint after module

Governed production AI feature

  • ✓ RAG checks ACL, freshness, and citations
  • ✓ tool actions have explicit authority and an authoritative postcondition
  • ✓ quality, latency, cost, and safety gates can stop rollout and rollback has been tested

Scenario transfer lab

Transfer lab: RAG + tool action with a production gate

Build a backend flow where retrieval forms an evidence pack, the model proposes a bounded tool action, and the application layer verifies permission and final state. Then change retrieval or model configuration and run regression checks before canary rollout.

Deliverable

End-to-end trace: identity → query → ACL/filter → ranked evidence → structured decision → tool preconditions → action → authoritative postcondition → evaluation result → release decision.

  • ✓ retrieval cannot return a forbidden ACL scope and stale evidence has an explicit policy
  • ✓ model output cannot execute a tool without an application-side authority check
  • ✓ the side effect is confirmed by an authoritative postcondition or moved into a reconcile state
  • ✓ a critical regression blocks rollout regardless of how polished the demo looks

Capstone contract

Capstone: governed AI backend service

Build one production-style AI feature as a backend service with an API contract, provider/model stage, retrieval or tools, deterministic controls, evaluation, observability, and rollback. The goal is to prove controlled behavior under failure, not to ship another dark-themed chat.

What to submit

  • — OpenAPI or typed API contract, domain schemas, error taxonomy, and timeout/retry/idempotency policy
  • — architecture and sequence diagram covering identity, data, model, retrieval/tool, and authoritative-system boundaries
  • — executable failure-injection suite for 429/5xx, timeout, cancellation, malformed output, duplicate delivery, stale retrieval, and partial side effects
  • — RAG/tool evidence covering ACL, freshness, and citations or permission, precondition, and postcondition traces
  • — evaluation dataset + regression report with quality, safety, and domain-correctness thresholds
  • — observability pack with latency, errors, retries, token/provider cost, cost per successful task, and sampled traces
  • — staged rollout + canary, rollback, and kill criteria + incident-to-regression runbook

When it is ready

  • ✓ the API returns a validated domain result or a controlled typed failure, not “almost JSON”
  • ✓ retry, idempotency, and reconciliation prevent hidden duplicate side effects
  • ✓ the RAG/tool path preserves identity, ACL, and authority boundaries from request to final state
  • ✓ a critical quality or security regression blocks release before canary
  • ✓ SLO and budget are evaluated per successful task including retries and review overhead
  • ✓ rollback or fallback restores a known working envelope and preserves audit evidence

Final practice and assessment

The course ends with a practical artifact and an acceptance rubric. The result is considered complete after the acceptance criteria are met, not merely after reading the materials.