Using a Language Model in Code › Looking Ahead

Michael BrenndoerferJune 27, 20251 min read
AI Agent HandbookAll chapters
Part 2 of 15Language Models - The Brain of the Agent
Chapter 5Using a Language Model in Code › Looking Ahead
Reading section 12 of 15 · Looking Ahead · 1 minSection 12 of 15 · 1 min

Book contents

Section 12 of 15 · 1 min read

Using a Language Model in Code › Looking AheadOne section · Sections in this chapter12 / 15 ↓

You now know how to call a language model from code. This is the foundation, but it's just the beginning. Our assistant can respond to individual questions, but it can't:

  • Remember previous parts of the conversation
  • Use tools like calculators or search engines
  • Reason through complex problems step by step
  • Plan multi-step tasks
  • Take actions beyond generating text

Each of these capabilities builds on what we've learned here. The next chapter introduces prompting, the art and science of communicating effectively with language models. You'll learn how to craft instructions that get better results, how to guide the model's reasoning, and how small changes in wording can dramatically affect output quality.

The model is now listening. Let's learn to speak its language.