<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Working with LLMs in Python on DATATWEETS</title><link>https://datatweets.com/courses/generative-ai/working-with-llms-in-python/</link><description>Recent content in Working with LLMs in Python on DATATWEETS</description><generator>Hugo</generator><language>en</language><copyright>Copyright (c) 2025 Datatweets</copyright><lastBuildDate>Sat, 27 Jun 2026 09:00:00 +0200</lastBuildDate><atom:link href="https://datatweets.com/courses/generative-ai/working-with-llms-in-python/index.xml" rel="self" type="application/rss+xml"/><item><title>Lesson 1 - How Large Language Models Work</title><link>https://datatweets.com/courses/generative-ai/working-with-llms-in-python/lesson-1-how-llms-work/</link><pubDate>Fri, 14 Nov 2025 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/generative-ai/working-with-llms-in-python/lesson-1-how-llms-work/</guid><description>Before writing any code, build a correct mental model of an LLM: it predicts the next token from a probability distribution, works in tokens rather than words, sees a limited context window, and samples its output.</description></item><item><title>Lesson 2 - Your First Claude Call</title><link>https://datatweets.com/courses/generative-ai/working-with-llms-in-python/lesson-2-your-first-claude-call/</link><pubDate>Fri, 14 Nov 2025 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/generative-ai/working-with-llms-in-python/lesson-2-your-first-claude-call/</guid><description>Get from zero to a working API call: install the SDK, keep your key out of your code with an environment variable, call the Messages API with claude-haiku-4-5, and learn to read the response object — id, content, stop_reason, and usage.</description></item><item><title>Lesson 3 - System Prompts and Roles</title><link>https://datatweets.com/courses/generative-ai/working-with-llms-in-python/lesson-3-system-prompts-and-roles/</link><pubDate>Fri, 14 Nov 2025 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/generative-ai/working-with-llms-in-python/lesson-3-system-prompts-and-roles/</guid><description>Messages to Claude are a list of role-tagged turns, and a separate system prompt sets the model&amp;rsquo;s persona and rules. See the same question answered two ways, then learn to shape behavior on purpose.</description></item><item><title>Lesson 4 - Multi-Turn Conversations</title><link>https://datatweets.com/courses/generative-ai/working-with-llms-in-python/lesson-4-multi-turn-conversations/</link><pubDate>Fri, 14 Nov 2025 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/generative-ai/working-with-llms-in-python/lesson-4-multi-turn-conversations/</guid><description>The model remembers nothing between API calls. To build a chatbot that recalls earlier turns, you keep a messages list that grows — appending each user turn and the model&amp;rsquo;s reply — and resend it every request.</description></item><item><title>Lesson 5 - Tokens, Cost, and Streaming</title><link>https://datatweets.com/courses/generative-ai/working-with-llms-in-python/lesson-5-tokens-cost-and-streaming/</link><pubDate>Fri, 14 Nov 2025 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/generative-ai/working-with-llms-in-python/lesson-5-tokens-cost-and-streaming/</guid><description>Every Claude response reports how many tokens it used. Learn to read those numbers, turn them into a dollar cost, estimate a request&amp;rsquo;s size before you send it, and stream long answers so they print progressively.</description></item><item><title>Lesson 6 - Controlling the Output</title><link>https://datatweets.com/courses/generative-ai/working-with-llms-in-python/lesson-6-controlling-the-output/</link><pubDate>Fri, 14 Nov 2025 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/generative-ai/working-with-llms-in-python/lesson-6-controlling-the-output/</guid><description>Four practical controls let you shape what comes back from the API: cap the length with max_tokens, end generation early with stop_sequences, dial randomness with temperature, and choose the model that fits your budget and difficulty.</description></item><item><title>Lesson 7 - Guided Project: A Command-Line Assistant</title><link>https://datatweets.com/courses/generative-ai/working-with-llms-in-python/lesson-7-guided-project-command-line-assistant/</link><pubDate>Fri, 14 Nov 2025 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/generative-ai/working-with-llms-in-python/lesson-7-guided-project-command-line-assistant/</guid><description>The module capstone: assemble a real command-line LLM app step by step — a system persona, a remembered conversation, streaming replies, per-turn token and cost tracking, and a clean REPL loop with /exit and /reset.</description></item></channel></rss>