AI for Engineers · Intermediate

Building LLM Applications

Design, build, evaluate, and deploy applications on top of large language model APIs, with structured outputs, tool calling, streaming, and safety built in.
LevelIntermediateDuration14 hoursFormatLive online cohortSchedule7 live online sessions x 2 hours, including guided hands-on lab time in every session

Course overview

What you'll learn

Building LLM Applications takes working programmers from a first API call to a deployed, evaluated feature. You learn how to shape model output into data your code can trust, let models call your functions, stream responses, and keep cost and latency in check. Every session pairs concise engineering explanations with a lab you build and run yourself.

Who it's for

Developers, Software Engineers, Technical Leads

By the end you will be able to

  • Call OpenAI, Anthropic, and Gemini APIs from code and explain the differences in their request and response formats
  • Return validated structured output using JSON schemas and a typed validation library, with a retry strategy for invalid results
  • Implement function and tool calling so a model can invoke your own code safely
  • Stream model responses to a client and handle partial output, errors, and cancellation
  • Estimate and reduce cost and latency using token budgeting, caching, and model selection
  • Build an evaluation set and automated checks that detect regressions when prompts or models change

Industry use cases

Examples from the work you do

Fintech

Extract structured fields from loan and statement documents with schema-validated outputs, and route low-confidence results to a human reviewer.

Healthcare IT

Build an internal assistant that summarizes de-identified clinical notes, with logging and guardrails that keep protected data out of prompts.

E-commerce

Generate and validate product attributes from supplier descriptions, with a regression set that catches quality drops after a model change.

SaaS

Add an in-product assistant that calls existing REST endpoints through tool calling and streams answers into the interface.

Manufacturing

Turn free-text maintenance reports into structured work orders and compare model choices on accuracy, latency, and cost.

Telecom

Classify and summarize support tickets at volume, using caching and batching to control per-request cost.

Syllabus

7 modules, 14 hours.

Every module ends with a hands-on lab you can apply to your own work.

01LLM API Fundamentals2 hours

Make your first calls to the major provider APIs and understand the request, response, and token model underneath them.

  • Chat message roles, system prompts, and conversation state managed by the client
  • OpenAI, Anthropic, and Gemini SDKs compared side by side
  • Tokens, context windows, and max output settings
  • Sampling parameters such as temperature and top-p
  • Rate limits, timeouts, retries, and error handling
  • Keeping API keys out of source control

Hands-on lab: Write a small client that sends the same prompt to three providers, logs token usage and latency for each, and handles a forced rate-limit error gracefully.

02Prompt Engineering for Software2 hours

Treat prompts as versioned code: structured, testable, and parameterized.

  • Separating instructions, context, and user input
  • Few-shot examples and when they help
  • Prompt templates and variable injection
  • Prompt injection basics and why input must be treated as untrusted
  • Versioning prompts alongside application code
  • Multimodal inputs such as images and PDFs

Hands-on lab: Refactor a hard-coded prompt into a versioned template with examples, then run it against ten varied inputs and record where it breaks.

03Structured Outputs and Tool Calling2 hours

Make model output machine-readable and let models invoke your functions in a controlled way.

  • JSON mode versus schema-constrained structured outputs
  • Defining schemas with Pydantic or Zod-style validation
  • Repair and retry loops for invalid output
  • Function and tool definitions across providers
  • The tool-call loop: model request, your execution, result returned
  • Parallel tool calls and tool error handling

Hands-on lab: Build an extraction service that returns schema-validated JSON from messy text, then add two tools the model can call and test a case where a tool fails.

04Streaming and Application Architecture2 hours

Deliver responsive experiences and structure an LLM feature inside a real service.

  • Server-sent events and token streaming
  • Streaming with tool calls and structured output
  • Backend API design with FastAPI
  • Conversation memory and context trimming strategies
  • Background jobs and batch APIs for non-interactive work
  • Timeouts, cancellation, and fallback providers

Hands-on lab: Expose your extraction and chat features through a FastAPI endpoint that streams tokens to a simple client and cancels cleanly when the client disconnects.

05Cost and Latency Optimization2 hours

Understand where money and time go in an LLM request and how to reduce both without hurting quality.

  • Input versus output token pricing and how to calculate request cost
  • Prompt caching offered by providers
  • Application-level caching of repeated requests
  • Choosing smaller or larger models per task
  • Reducing latency with shorter prompts, streaming, and parallelism
  • Usage tracking and budget alerts

Hands-on lab: Instrument your service to log per-request tokens and cost, then apply two optimizations and report the measured before-and-after difference.

06Evaluating LLM Features2 hours

Replace guesswork with repeatable tests that tell you whether a change made things better or worse.

  • Building a golden dataset from real examples
  • Deterministic checks versus model-graded evaluation
  • LLM-as-judge: strengths, biases, and calibration against human labels
  • Regression testing prompts and model upgrades
  • Running evaluations in CI
  • Online feedback and sampling production traffic

Hands-on lab: Create a 30-example evaluation set for your service, write automated scorers, and run it against two prompt versions to choose between them.

07Safety, Deployment, and Operations2 hours

Ship the feature with guardrails, monitoring, and a deployment you can maintain.

  • Input and output validation and content moderation endpoints
  • Defending against prompt injection and data leakage
  • PII handling and redaction before sending data to a provider
  • Containerizing the service with Docker
  • Logging, tracing, and alerting for model calls
  • Handling provider outages and model deprecations

Hands-on lab: Containerize your service, add a redaction step and an output check, and run a short red-team session where peers try to make it misbehave.

Capstone project

Build something you'll use

Build and present a deployable LLM-powered service for a use case of your choice: it must return schema-validated output, use at least one tool call, stream responses, include a documented evaluation set with results, report per-request cost, and include a short safety review of the risks you addressed.

Tools and requirements

What you'll work with

OpenAI APIAnthropic APIGoogle Gemini APIPythonPydanticFastAPIDockerGitPostman

Prerequisites

  • Working proficiency in Python or TypeScript, including installing packages and calling REST APIs
  • Comfort with the command line and Git
  • Your own API keys for at least one model provider (guidance provided before the first session)

Frequently asked questions

Before you book.

How do I book this course?

Select "Book a seat" and complete the short form. We email you the next cohort dates, timings and fees, and your seat is secured when you confirm. Requesting a seat is free.

How is the course delivered?

Live and online. The 14 hours run as 7 live online sessions x 2 hours, including guided hands-on lab time in every session, led by an instructor, with hands-on labs in every session.

What do I need to join?

Working proficiency in Python or TypeScript, including installing packages and calling REST APIs Comfort with the command line and Git Your own API keys for at least one model provider (guidance provided before the first session)

Can my team take this course together?

Yes. We can run this course for a team with examples from your own roles and tools. Send a team request through the contact page.

Continue exploring

Related courses.

Live online

AI for Engineers

RAG and Vector Search Systems

Build retrieval-augmented generation systems with embeddings, vector databases, hybrid search, and reranking, and learn to evaluate and run them in production.

Advanced16 hours

Ready to start?

Join the next Building LLM Applications cohort.

Book a seat
Book your seat