Skip to content
GenAI engineer path/Building LLM applications
IntermediateFeatured

Building LLM applications

Tokens, context windows, prompting, structured outputs and function calling

0%

Understand LLMs from the inside out: tokenisation, context windows, prompting, structured outputs, function calling, streaming and multimodal inputs. The foundation for everything generative.

From first API call to a model you can trust in a product

Step 1 of 5

LLM fundamentals

Learn tokens, context windows, sampling and pricing well enough to estimate a request's cost before you send it.

Each chapter adds a layer of control over the model's inputs, outputs or weights.

Who this series is for

This series is for engineers who can build a normal web service and now need to put a language model inside one. It assumes comfort with Python and HTTP APIs and no prior machine-learning background. The goal is a working mental model of what an LLM actually does with your input, because nearly every production problem (cost overruns, truncated answers, invalid JSON, inconsistent behaviour) traces back to a gap in that model.

What each chapter covers

  • LLM fundamentals explains tokens, context windows, sampling parameters and pricing in terms you can act on, such as estimating the cost of a request before you send it.
  • Prompt engineering treats prompts as code: versioned, tested, and structured with clear instructions, examples and output contracts rather than tweaked by feel.
  • Streaming and structured outputs covers server-sent events for responsive interfaces, and schema-constrained outputs so downstream code can trust what the model returns.
  • Local and open-source models covers when running a model yourself makes sense, what hardware it takes, and the quality and latency trade-offs against hosted APIs.
  • Fine-tuning fundamentals explains what fine-tuning is good for (format, tone, narrow tasks) and what it is not (adding knowledge, which is usually a retrieval problem).

How to approach it

Read the chapters in order, since each builds on the vocabulary of the last. Keep an API key and a small script open while you read. Changing a parameter and watching the output change teaches more than any explanation.

Skills you'll gain

LLM APIsPromptingStructured OutputsFunction CallingStreamingMultimodal

Prerequisites

PythonHTTP APIs

Chapters

Labs in this series