Recap

Foundations + chatlas basics

LLMs, Agents, & Context

  • LLMs are jagged — great at some things, bad at others (e.g. counting).
  • LLMs are really good at coding — so enable them to, and verify the result.
  • Agent = LLM + tools + loop.
  • Correctness and usefulness can (further) improve with the right context, constraints, and tooling.

chatlas, so far

  • One interface (Chat{Provider}) to many LLMs — swap providers, keep your code.
  • .chat() echoes responses; .stream() yields the chunks.
  • Chat objects are stateful — they remember the conversation (get_turns(), set_turns()).
  • A system prompt shapes every response, invisibly, without RAG or tool calling.

Quick check ✅

  • What’s the difference between a system and user prompt?
  • What method yields a chatbot in 1 line of code?
  • Why might you want to use .stream() over .chat()?

Up next

🔧 Tool calling — give the LLM real capabilities

📦 Structured data extraction

💬 shinychat — turn a chat into an app