AI-ENGINEERING
    intermediate

    AI Architecture & the Feedback Loop

    AI Engineer path · lesson 109 of 124
    The idea
    Nobody designs a water system by drawing the filters first. You lay the pipe, something gets in, and you add a filter where it got in. Every layer here is a filter somebody added after an incident — which is why they appear in this order in almost every company.
    How to use
    Add layers one at a time and read the failure that forced each one. Then open Feedback signals and filter to implicit — that column is the data you already have.
    userguard·incontextcacheroutermodelguard·outtraces · metrics · user feedback…and back into the eval set, the prompts, and the training data
    1 / 6 layers
    Layer 1: The model API
    What forced it
    Nothing yet — this is where every project starts.
    What it adds
    A request goes to a model and a response comes back.

    Close the feedback loop

    Sequence

    Order the loop that turns production traffic into improvement.

    Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.

    1. 1Drop a step here
    2. 2Drop a step here
    3. 3Drop a step here
    4. 4Drop a step here
    5. 5Drop a step here
    6. 6Drop a step here
    6 pieces left to place

    Test your knowledge

    20 questions
    Question 1 of 20
    Score: 0

    The layer added immediately after the bare model API in most AI applications is:

    The short version

    Nobody designs a water system by drawing the filters first. You lay the pipe, something gets in, and you add a filter where it got in. Every layer here is a filter somebody added after an incident — which is why they appear in this order in almost every company.

    In more depth

    AI Architecture & the Feedback Loop

    Every AI application converges on roughly the same architecture, and it grows in the same order — each layer added by a specific failure.

    The layers

    1.Model API — where every project starts.
    2.Context construction — retrieval, tools, memory. The largest lever on answer quality.
    3.Guardrails — input (injection, PII, abuse, size) and output (schema, policy, grounding). Enforced outside the model, because a model cannot be its own boundary.
    4.Router & gateway — one place for keys, limits, retries, fallbacks; easy requests to a cheap model.
    5.Cache — prefix caching for the repeated head, response caching for repeated questions. Usually the cheapest win available.
    6.Observability & feedback — traces of every step, and a channel for users to say whether it was any good.

    Exactly one box is the model. Everything else is engineering you own.

    Feedback signals

    Explicit (thumbs, written feedback): very low volume, skews negative. Use as a queue of failures to read.

    Implicit (regenerate, edit-before-use, copy/accept, re-asking, escalation): orders of magnitude more volume, usually uninstrumented. Use as the metric you trend.

    The edit diff is the most under-used signal in AI products: it hands you the input, the attempt, and the right answer — the shape of both an eval case and a training example.

    Designing the ask

    Ask at the moment of judgement · make the negative path cheap and specific · never block · prefer capturing over asking · show that it mattered · log the whole trace with the vote.

    Limits

    Degenerate feedback loops · you only see what you allowed · feedback is not consent · read it, do not just count it.

    Interview Questions

    Amazon
    Google
    Microsoft
    Meta
    Anthropic
    Microsoft
    OpenAI
    Meta
    Netflix
    Amazon
    Google
    Netflix
    Meta
    Google

    Love this visualization?

    Sign up to track your progress, earn achievements, use the AI assistant, and access your personal learning dashboard.

    100% free • No credit card required