Session 1: Understanding the Model & The Single Call

Presentation slides for Large Language Models for Software Engineers (Session 1).

Downloads: PowerPoint Presentation (.pptx) · PDF Slides (.pdf) · C# Single Call Code (.zip)


Session Overview

This session explains large language models as standard software infrastructure. You will learn how to send requests, read responses, manage conversation memory, and use tools before you build multi-step agents.

Key Concepts Covered

  1. The Engineering Mental Model: LLMs are software components, not magic. Your software engineering skills are what make them reliable.
  2. Three Simple Parts: The model (remote engine), your codebase (application logic), and data integrations (tools).
  3. The Agent Loop: The four basic steps of every agent (send input, get output, run tools, save to history).
  4. Requests and Responses: What travels on the wire in JSON, including message roles (system, user, assistant), stop reasons, and token usage.
  5. The History Array: How conversation memory is an array stored in your code, appended each turn, and resent with each call.
  6. A Glimpse at Tools: How the model asks your code to run database queries and functions without executing code directly.
  7. Statelessness: Why LLMs have zero built-in memory and behave as pure functions (f(messages) -> message).
  8. Control Plane vs Data Plane: How system prompts set security rules and output formats with higher authority than untrusted user input.
  9. Context Windows and Attention: Token budgets, cost, latency, and the U-shaped attention curve ("Lost in the Middle").
  10. Single-Call Tasks and Traps: What a single call can do (classify, extract, summarize) and how to avoid hallucinations, format drift, and truncation.

Workshop Materials & Code