Library / Artificial Intelligence

AI Engineer Practice: 100 Python Exercises for LLMs and RAG

On Udemy

About this course

Calling a language model is one line of code. Everything around that line is where AI features succeed or fail: the prompt you assemble, the context you retrieve, the JSON you try to parse when the model wraps it in an apology, the retry when the API times out, the budget check before a runaway loop costs a fortune, the guardrail that stops an injected instruction from reaching a tool. That surrounding code is what AI engineers actually write all day, and it's what this course makes you practice.

This course is 100 coding exercises in the Python editor built into the course. Each exercise describes a small, realistic task from an AI feature and gives you a function or class to complete. When you submit, automated tests run against your code and tell you right away what passes and what doesn't. There's no API key to set up and nothing to pay for, because the exercises focus on the logic around the model: the inputs you prepare, the outputs you handle and the systems you build to keep it reliable, using simulated responses where a real call would go.

What you'll build, section by section

Python essentials for AI data gets you warmed up on the data shapes AI work runs on: cleaning raw text, building chat messages, extracting code blocks from a reply, trimming to a word budget, removing duplicate documents, batching items for an API and turning a conversation into a transcript.

Prompt engineering in code treats prompts as software rather than chat. You'll fill templates, build few-shot prompts and system prompts, trim chat history, wrap untrusted input safely, keep a versioned prompt library, format retrieved context and assemble a grounded RAG prompt.

Parsing and validating model output is the section most tutorials skip.

Read the full description on Udemy on Udemy (opens in a new tab)

Ready to start? Continue on Udemy to enroll.

Start learning on Udemy (opens in a new tab)

Prices, discounts and availability are set by Udemy. We may earn a commission when you purchase through links on this site.