Advanced 2 days · 12 hours

Building with LLM APIs

For developers shipping a first AI feature: tool use, retrieval, evaluation and cost

About this course

The first call to a language model API takes about ten minutes. Everything after that is the actual work: output that will not parse, a tool called with the wrong argument, a request that hangs, a bill nobody forecast, and a user who has discovered that pasting instructions into a support ticket makes interesting things happen. This course is two days on that second part, written for developers who have to put an AI feature in front of real users and then keep it running.

You work in Python against both the OpenAI and Anthropic APIs, close enough together to see where the two differ and where the pattern is identical. Day one covers the request and the response in detail: system prompts and message history, token limits and stop conditions, streaming into a user interface, reading usage back so a request can be costed, and a thin client wrapper that keeps keys out of the codebase. Then structured output against a JSON schema, validated before anything downstream is allowed to see it, and the tool-use loop: writing a tool definition the model calls with the right arguments, executing the call, returning the result, and constraining what a tool may do when its side effects cannot be undone.

Day two opens on retrieval, treated as an engineering problem rather than an architecture diagram. You chunk documents so an answer is not cut in half at a page break, index them with an embedding model, query a vector store, and add reranking for the cases where pure vector search confidently returns the wrong passage. You add citations and a grounded refusal, so the feature says it does not know rather than filling the gap. The session also covers the Model Context Protocol as a standard way of exposing tools and data to a client that supports it.

The final half day is what separates a demonstration from a service. You build an evaluation suite from real failures, with deterministic assertions where the answer is checkable and a model-graded rubric where it is not, and wire it into CI so a prompt change cannot regress in silence. You reduce cost and latency with prompt caching, batch requests, tiered model choice and a shorter context, and you measure the difference rather than assuming it. You handle rate limits, timeouts and provider outages with backoff, fallback and idempotent retries, and you defend the endpoint against instructions hidden in untrusted content.

You leave with a repository you built during the two days: an endpoint that streams, calls tools, retrieves from a document set, is covered by an evaluation suite and reports its cost per request. Bring your own API keys, since the exercises use a small amount of credit on your own account. Runs live online, in the classroom in Colombo or privately for a development team, priced in LKR for Sri Lanka and USD internationally.

What you'll be able to do

  • Call the OpenAI and Anthropic APIs from Python and stream a response into a user interface as it arrives.
  • Read a response properly: content, stop reason, token usage and error types, and log what billing and debugging need.
  • Return output against a JSON schema, validate it, and repair or reject what fails instead of passing it downstream.
  • Implement a tool-use loop that defines tools, executes calls, returns results and copes with the wrong tool being chosen.
  • Build a retrieval pipeline over a document set with chunking, an embedding model, a vector store, reranking and citations.
  • Write an evaluation suite from real failures, combining deterministic assertions with a model-graded rubric, and run it in CI.
  • Reduce cost and latency with prompt caching, batch requests, tiered model choice and a shorter context, and measure the effect.
  • Handle rate limits, timeouts and provider outages with exponential backoff, provider fallback and idempotent retries.
  • Defend an endpoint against prompt injection in untrusted content, and constrain what a tool call is permitted to do.
  • Deploy the service with secrets managed outside the codebase, request logging that respects personal data, and cost tracked per request.

Who it is for

  • Backend and full-stack developers adding an AI feature to an existing product
  • Data engineers and analysts moving from a notebook to a service other people call
  • Technical founders building the first version of an AI product
  • Team leads who have to review AI code and estimate what it will cost to run
  • Integration developers replacing a brittle rules engine with a model and a schema

What you need first

  • You should write Python comfortably, use a virtual environment and git, and have called an HTTP API before. TypeScript examples are supplied for teams working in Node.
  • You need your own API key for at least one of OpenAI and Anthropic, ideally both. A few US dollars of credit covers the exercises.
  • Experience of prompting is useful but not required. Advanced Prompting and Evaluation is the companion course for people who do not write code.

Upcoming dates

Upcoming dates, with prices and places remaining
When How Where Places Price Book
6–7 Oct 2026 09:00–16:00 +0530 Live online Online Places available $945.00
13–14 Oct 2026 09:00–16:00 +0530 In person Places available $1,134.00
27–28 Oct 2026 09:00–16:00 +0530 Live online Online Places available $945.00
17–18 Nov 2026 09:00–16:00 +0530 Live online Online Places available $945.00
24–25 Nov 2026 09:00–16:00 +0530 In person Places available $1,134.00
8–9 Dec 2026 09:00–16:00 +0530 Live online Online Places available $945.00
Start any time Self-paced Online Always available $149.00

What we cover

About 12 hours of taught content

Day 1, Morning — The API surface, properly

Both SDKs, the full request and response, streaming, and a client wrapper worth keeping.

  • OpenAI and Anthropic side by side: authentication, request shape, response object and error types 35 min
  • System prompts, message history, temperature, token limits and stop conditions 35 min
  • Streaming: server-sent events, partial output, cancellation and what the user sees 40 min
  • Token accounting: estimating before you send, reading usage back and costing a request 35 min
  • Project setup: keys out of the codebase, a thin client wrapper and typed responses 35 min
Day 1, Afternoon — Structured output and tool use

Making the model return something a program can trust, and letting it act without letting it loose.

  • Structured output against a JSON schema, validated before anything downstream sees it 40 min
  • Repair, retry or reject: handling output that does not parse 30 min
  • Tool definitions the model calls with the right arguments, and the ones it ignores 40 min
  • The tool loop: executing calls, returning results, multiple and parallel calls 40 min
  • Constraining tools: allow lists, dry runs, confirmation and side effects you cannot undo 30 min
Day 2, Morning — Retrieval over your own data

Building a retrieval pipeline that cites its source and refuses when it should.

  • When retrieval is the answer, and when a longer prompt or a database query is 25 min
  • Chunking documents so an answer is not cut in half 35 min
  • Embeddings and a vector store: choosing a provider, indexing and keeping the index fresh 40 min
  • Hybrid search and reranking for the queries pure vector search gets confidently wrong 35 min
  • Citations, grounding checks and an honest refusal 25 min
  • Exposing tools and data over the Model Context Protocol 20 min
Day 2, Afternoon — Evaluation, cost and going live

The work that turns a working prototype into something you are willing to be on call for.

  • An evaluation set built from real failures, with deterministic assertions where possible 35 min
  • Model-graded evaluation, judge bias, and running the suite in CI on every change 35 min
  • Cost control: prompt caching, batch requests, tiered model choice and a shorter context 35 min
  • Latency: streaming, parallel calls, timeouts and what users actually notice 25 min
  • Rate limits, exponential backoff, provider fallback and idempotent retries 25 min
  • Prompt injection, untrusted content, output handling and logging without leaking personal data 25 min

Who teaches it

MyLearnPlus AI Faculty

Working practitioners teaching the AI and generative AI track

The AI track is taught by people who use these tools in paid work every week: prompt and workflow design, assistants deployed inside real teams, automation built and maintained, generative imagery taken to a finished deliverable, and the governance conversations that follow. We are deliberate about credentials here. There is no independent, universally recognised certification for generative AI practice in the way there is for Adobe software, so we do not display one. What we require instead is evidence: work that shipped, tools used in production rather than demonstrated once, and the ability to say clearly where a model is unreliable. An instructor who cannot show you a failure case is not ready to teach this material.

Because the tools change between cohorts, the AI faculty carry an obligation the Adobe faculty do not: every course is re-checked against the current versions of the products it teaches before each scheduled run, and anything that has moved is corrected in the slides, the exercise files and the workbook. Classes are staffed one instructor per cohort, named in your joining instructions, with a second instructor assisting on large private groups and on hands-on build sessions where people need help at their own screen. A new instructor teaches the syllabus under observation before running it alone, and a substitute teaches the same syllabus from the same materials.

Read more about the faculty

What's included

  • Class recording, available for 12 months
  • Course repository: Python and TypeScript examples, a retrieval pipeline and an evaluation harness
  • Course workbook with each API pattern and the failure case that motivates it
  • Evaluation set template and a cost and latency tracking sheet
  • MyLearnPlus certificate of completion
  • Instructor email support after the class for questions on your own implementation
  • One free repeat of the same live class, terms shown on the booking page

What learners say

No reviews yet. This course is newly published, and we would rather show you nothing than show you something we wrote ourselves. Reviews appear here as learners leave them.

Questions people ask

What do I need to bring?
A laptop you can install software on, with Python 3, a working virtual environment, git and an editor you know. You also need your own API key for at least one of OpenAI and Anthropic, and ideally both so you can compare them. The exercises are sized to use a few US dollars of credit across the two days, charged to your own account, and whatever you do not spend stays there.
Which language are the examples written in?
Python, using each provider's official SDK. A parallel set of TypeScript and Node examples is included in the course repository for teams working in that stack, and the patterns transfer directly. You do not need to know both languages to take the course.
Do you cover fine-tuning or training a model?
Not as a hands-on exercise. The course covers where fine-tuning sits against prompting and retrieval, what it costs to maintain as models change, and the questions to answer before choosing it. Most features people expect to need fine-tuning for are better served by a clearer prompt, structured output and retrieval, and the course is honest about the cases where that stops being true.
How is this different from Advanced Prompting and Evaluation?
That course works at the level of the prompt itself, in a spreadsheet and an assistant interface, and requires no programming. This one is a development course: SDKs, tool loops, retrieval infrastructure, CI, deployment, rate limits and cost per request. They overlap on evaluation by design, and teams often send the same engineer to both.
Will what I learn work with other providers or open models?
The patterns are provider-independent, and many other services, including local runtimes for open-weight models, expose an interface compatible with the OpenAI SDK that the same client code can call with a different base URL. The course teaches OpenAI and Anthropic because that is where most teams start, and it covers what to check before swapping a provider in: tool-calling behaviour, context limits, structured output support and how your evaluation suite scores the replacement.
What if I miss a day, and do you issue a certificate?
Both days are recorded and available to you for twelve months, and every live booking includes one free repeat of the same class, with the terms shown on the booking page for each date. You receive a MyLearnPlus certificate of completion recording the course title, hours and date, which is a record of training rather than an industry credential.
Can my employer be invoiced, and can you run this for our development team?
Yes to both. We invoice organisations against a purchase order, in LKR for Sri Lankan companies and in USD internationally. A private run can be built around your own codebase, so the retrieval exercises index your documents and the evaluation suite is written against the failures your users have actually reported.

Advanced 2 days

Advanced Prompting and Evaluation

Two days on prompt architecture and measurement: decomposition, structured output, grounding, golden sets, model-graded scoring and regression testing.

Intermediate 1 day

AI Governance and Responsible Use

Build an AI register, classify risk, design human oversight and disclosure, run a fairness check and prepare for an audit or a client questionnaire.

Need this for a team?

We run this course privately, on your dates, at your office or online, tailored to the work your team actually does. Tell us what you need and we will send a quote.

Get a quote