Skip to content
fx-blog
Series · 6 parts · 25 min

Building with the AI API

  1. Part 14 min readIntermediateUp next

    Your Prompt Worked in Chat. Why Is the LLM API Different?

    A chat prompt moved into code goes flat, forgets and fails with 400s. Send the history, write the system prompt, set effort and a schema, and read the stop reason first.

  2. Part 24 min readIntermediate

    Build the Agent Loop Yourself, Once

    Tool use and the agent loop in eleven lines of Python, the four changes that harden it, and when one loop stops being enough.

  3. Part 34 min readIntermediate

    Did Your Prompt Change Help? Prove It with an Eval

    A model upgrade can change behaviour with no error. What an eval is, the three graders, the held-out slice, and how evals make upgrades routine.

  4. Part 44 min readAdvanced

    RAG That Works: Why Retrieval Matters More Than the Prompt

    Most bad RAG answers are retrieval problems. How RAG works end to end, the three parts of the grounded prompt, how to measure retrieval alone, and when long context is enough.

  5. Part 55 min readAdvanced

    Your LLM Demo Works. What Every Call Needs in Production

    One timestamp in the system prompt and every call misses the cache. Pricing each call, making failures loud, logging per feature, and treating outside text as untrusted.

  6. Part 64 min readAdvanced

    Your LLM Proxy Retries the Wrong Errors

    What an LLM proxy has to decide on every failure: limits are per organization, which statuses to retry, why nothing is retried after the first streamed byte, and the headroom headers the API already sends.