
Learn what an AI engineer does all day, using a bridge-building comparison: researchers invent the material, engineers build things that stand on it. You follow one example, an assistant that answers questions from company policy documents, through five steps: find, prompt, check, serve and watch. You also see where the job starts and stops, the weak spots of an LLM you design around, and the three portfolio capstones the course ends with.
See every AI product as six layers: data, model, retrieval, orchestration, serving and ops, with evals and security running across all of them. A restaurant comparison makes each layer concrete, then one request, can I expense a second monitor for home, is traced through the whole stack. You also see which sections of the course cover which layer, and why a prototype stops at the model while a product needs all six.
Preview the three capstone projects before you start: a production RAG system with citations and an eval score, a research agent built with LangGraph and a human approval step, and a full-stack AI product with a streaming chat page, FastAPI, tracing, a cost guard and guardrails. Each one proves a different skill. You also learn the bar every capstone meets: starter and finished code, a one-command Docker run, eval results in the repo and a short README.
Set up the one environment every project in the course runs in. You install uv, let it bring Python 3.12, pin package versions with a lock file, and run a check-setup script that fails on a plain Python run and passes after uv sync. You point VS Code at the virtual environment, keep your API key in a .env file that stays out of git, and run a first model call. A stand-in test model answers when no key is set, and pytest confirms the setup.
Learn what the course leaves out on purpose, such as research maths, training models from scratch, leaderboards, GPU kernels and framework tourism, and where it goes deep: prompts, RAG, evals, tools, agents, serving and security. You see the four kinds of lecture and the shape of a typical project folder: Docker Compose, pinned versions, a stand-in test model and your own key. You also get a study routine for each section: watch, run, change one thing and commit.
A short guide to claiming a free 6-month licence for JetBrains IDEs such as PyCharm. Follow the steps on the screen, and use the blog post linked in the resources for the full instructions.
Project files and resources for this section. Also see the linked blog post to claim a free 6-month JetBrains IDE licence.
Cover the small part of Python that shows up in almost every AI script: dicts, lists and JSON, typed functions with dataclasses, list comprehensions, f-strings, environment variables and try/except. You work with a small help-desk ticket file, build a chat message as a dict, and catch a model reply that is not valid JSON. You also see which advanced Python topics you can safely skip for now.
Learn NumPy and pandas at the depth this course needs. With NumPy you read array shapes, pick an axis, use broadcasting and write the core of vector search over 1,000 sample embeddings, then compare it with a slow Python loop. With pandas you load a call log of 2,000 rows, fix date types, count missing values, filter, group by model, merge tables, resample by day and hand a column back to NumPy.
Turn the dot product into cosine similarity, the maths behind vector search. A pointing-arrows picture shows that direction carries the meaning, not length. You compute it by hand and in NumPy, see why long documents win on a raw dot product, then run a real search with the all-MiniLM-L6-v2 sentence model. It finds the right help-desk answer even when the query shares no words with it.
Understand supervised learning through one job: sorting support tickets into billing and technical queues. You learn features, labels, training data, models and predictions, and the difference between classification and regression. You also see why a hidden test set matters. A short scikit-learn script with CountVectorizer and LogisticRegression learns from twelve tickets, predicts three new ones and shows how confident it is.
See why a model can score well on data it has seen and fail on new data. A Python script fits curves of degree 1 to 12 to delivery-time data and compares training error with test error. You learn underfitting (high bias), overfitting (high variance), how to pick the right model size from the test error, and four fixes: more data, a simpler model, regularisation and cross-validation. The same idea is applied to prompts tuned on only a few examples.
Find out why we need neural networks, starting with an XOR-style order-flagging rule that no single straight line can learn. Logistic regression scores 0.47 on it, while a network with one hidden layer of eight units reaches 0.96. You see a neuron as weights, a bias and an activation, and a second script shows that too few units, or no activation, brings the failure back. The lecture closes by linking the same idea, scaled up, to large language models.
Understand attention without heavy maths, using the sentence about an animal and a street and the word it. You learn query, key and value as what I am looking for, what I offer and what I pass on. A small NumPy script with hand-made numbers scores each word against the query, uses softmax to turn the scores into weights that add up to one, and draws the result as arrows. You also meet multiple heads and learn why attention replaced older models.
See what a language model receives when you type a sentence: token ids, not letters. Using tiktoken, you check how the word strawberry splits, how a leading space or a capital letter changes the ids, and why letter counting is unreliable for a model. You compare token counts for English, German, Hindi and code across two tokenizers, and learn why character-level work belongs in code, not in the model.
Project files and resources for this section. Also see the linked blog post to claim a free 6-month JetBrains IDE licence.
See how a fraud model can score 99 percent accuracy and catch no fraud at all. Using scikit-learn on 20,000 made-up card payments where 1 in 100 is fraud, you compare a lazy DummyClassifier with a logistic regression. Accuracy is almost identical, but the real model catches 27 of 50 frauds. You learn class imbalance, the lazy baseline and the four outcomes of a confusion matrix.
Learn the confusion matrix and its four counts: true positives, false positives, false negatives and true negatives. A spam filter that is 95 percent accurate still lets half the spam through, and a smoke-alarm comparison explains each cell. You build the matrix with scikit-learn, read rows as truth and columns as guesses, decide which mistake costs more for your job, and extend it to a three-class ticket sorter.
Learn four metrics that show what a single accuracy score hides. Using a small spam filter and a fishing-net picture, you work out precision, recall, specificity and F1 by hand, then confirm them in one short scikit-learn script with classification_report. You also see how lowering the decision threshold trades precision for recall, and which number to watch for spam filtering, medical screening and other jobs.
See how precision and recall carry over to LLM apps. The fishing-net picture is reused for retrieval, where the net is the top k documents and precision and recall are measured at k over six help-desk documents. For generated answers, exact match fails both a good and a bad answer, so you replace the single label with a rubric of small yes or no checks, some by code and some by a judge model, reported as pass rates.
Project files and resources for this section. Also see the linked blog post to claim a free 6-month JetBrains IDE licence.
Draw an honest line around what a large language model can do. It is strong at drafting, summarising, extracting, classifying, translating and writing code. It is weak at fresh facts, exact maths, memory and guaranteed truth. A short offline tiktoken script shows why strawberry and a long number are split into pieces. You learn the fixes engineers add, RAG, tools, history, evals and validation, and three questions to ask before building.
Follow one Help Desk question to see what the model really reads and what it costs. A question of four words becomes 911 input tokens once the policy and brief are added. You see how the context window is filled by a build-messages function, how chat history grows each turn, what a history limit forgets, and how max tokens can cut a reply. You also price a call from a provider pricing page and see what drives the bill.
Learn why the same prompt gives different answers and when you want that. With plain NumPy and hand-made scores for the next word, you see logits, softmax probabilities, drawing one word at random, temperature sharpening or flattening the odds, and top-p cutting off the unlikely tail. A jar-of-marbles picture ties it together. You also get practical settings for extraction, help-desk replies, creative work and evals.
Compare closed API models and open-weight models on four axes: cost, control, privacy and capability. You learn what open weights really means, including licence limits, and see a cost-versus-volume curve for per-token pricing against your own GPUs. Three example workloads, a customer agent, nightly ticket tagging and private hospital notes, get different answers. You also see a hybrid router and why to hide the model behind one client function.
Follow one Help Desk question from the browser to the model and back. You see the page send only the question, a FastAPI route validated by Pydantic, and a service that builds a request with a system brief and a user message. You read the model name, answer text and token count from the response. A follow-up question then shows that the model keeps no memory between calls.
Make an LLM app feel fast and fail politely. You compare a plain call with a streamed one using stream=True, where the first words appear in about 0.14 seconds instead of 1.3. You then handle 429, 500 and timeout errors with retries and a growing wait using the tenacity library, a timeout on every call, a polite fallback message and no doubled SDK retries. The prompt you would give an AI assistant is matched to the code.
Finish a half-built command-line chat tool for a support team. The starter forgets earlier turns, sends /reset to the model and crashes on a 429 error. You add memory, slash commands, friendly error handling and a cap on history, working in the starter file and checking progress with pytest until all five tests pass. A stand-in test model shows the message count, so you can see memory working without a key.
Project files and resources for this section. Also see the linked blog post to claim a free 6-month JetBrains IDE licence.
Learn to replace adjectives like "better" and "professional" with checks a script can pass or fail. Using a customer release note as the example, you turn one vague line into a prompt with a word limit, facts to keep, hedge words to avoid and a bullet format. A small Python checker scores two sample outputs, shows exactly which rule failed, and ends with a five-point checklist for any prompt you write.
Learn how to teach a model a pattern with a few worked examples instead of a long list of rules. Using a support-ticket classifier, you see how many examples to use, why each one should teach something different (easy, hard, edge case and near miss), how order and shape matter, and how test-set leakage makes scores lie. You finish with separate example and test pools and an overlap check.
Learn the common patterns for getting structured, machine-readable output from a language model, so your code can use the reply without guessing. The lecture covers why free text is hard to build on and how to ask for a fixed shape that your application can check before it uses it.
See why sending the same long policy text with every question wastes money, and how prompt caching fixes it. You follow a help-desk app that keeps a stable start in its system prompt, watch a cache hit and a cache miss, compare the input cost with and without caching, and see how Claude, OpenAI and Gemini each switch it on. It also explains the roughly five-minute cache lifetime and how a prompt cache differs from an answer cache.
Treat prompts like code: one file per version, a registry that names the live one, and a hash logged with every answer. Using a ticket-sorting help desk, you score two prompt versions against a golden set of twelve tickets, read the diff, write fast pytest checks with a ninety percent gate, and see a harmless-looking edit caught by a test. It all runs with files, git and pytest.
Get a typed Ticket object back from the model instead of a JSON string you have to parse. You define the schema with Pydantic, see a ValidationError name the exact bad field, then write a retry loop by hand and replace it with Instructor's response model and max retries. The demo runs in a help-desk web app with a stand-in test model, and shows what happens when retries run out.
Learn that a good answer comes from everything the model sees on a turn, not one clever prompt. You measure each part of a twelve-turn support chat with tiktoken, give each part a budget, and order the window so stable rules sit at the top and the task last. Then you compact history, old tool results and retrieved articles, cutting the window from 1,679 to 1,089 tokens.
Fix a support agent that works for a few turns and then forgets who the customer is. You build a small LangGraph agent, plot token use per call against a three thousand token window, then clear old tool results, compact old turns and keep stable facts in a notes file. A before and after eval shows the score go from zero out of four to four out of four.
A practice exercise on a meeting-notes summariser whose one-line prompt gives a different result every run. You rewrite the prompt using four levers: length, required content, excluded content and format. A rubric with five checks and a pytest file tell you when you are done, with a solution folder to compare against afterwards.
Project files and resources for this section. Also see the linked blog post to claim a free 6-month JetBrains IDE licence.
Understand an embedding as a list of numbers that describes meaning, so close numbers mean close meaning. You start with a hand-made two-number word map and a nearest-word function, then build a toy sentence embedder and use it for search. You also see where hand-picked numbers fail, which is why learned embedding models are used.
Learn the four things that decide an embedding model: vector size, context length, domain fit and cost. You calculate how much memory a million vectors need, then compare two small local models, all-MiniLM-L6-v2 and bge-small, on twelve help articles using hit rate and MRR. The lecture ends with a repeatable routine for testing models on your own data.
Run a real embedding model and look at what comes back. You try an open model through sentence-transformers and a provider API, then compare the vector sizes of all-MiniLM-L6-v2 and OpenAI's small and large embedding models. Three small scripts then use embeddings for search by meaning, duplicate ticket detection and reading recommendations.
Learn how cosine similarity, dot product and Euclidean distance each measure closeness, and why they can pick three different winners for the same question. You work through the formulas on small two-number vectors in Python, then normalise every vector to length one so all three agree. A final run with a real 384-number embedding model shows the same ranking from each measure.
Open up a vector database and see what each record holds: an id, the chunk text, metadata and the embedding vector, plus an index for fast search. Using a small employee handbook stored in Chroma, you run a question, add a metadata filter, and read about the HNSW index. You see why the text is kept next to the vector and how the metadata is used.
Store the same twelve help articles in two databases and compare. Chroma runs from a folder on disk, while pgvector runs inside Postgres 17 started with Docker Compose. You write the upsert, the nearest-neighbour query and a category filter in each, and check that both return the same results to four decimals. The lecture finishes with advice on when to choose each one.
A practice exercise where a semantic search over three help documents returns whole files instead of the exact passage. You edit the index-building function so each result is a small passage that holds the answer, and a grader runs ten questions against it. The aim is a score of nine out of ten or better, with a pytest check and a solution folder.
Project files and resources for this section. Also see the linked blog post to claim a free 6-month JetBrains IDE licence.
See why a capable model still cannot answer questions about your own documents: it has a knowledge cut-off, no private data and may guess. You compare three fixes, pasting everything, fine-tuning and RAG, using a refund-policy example, and see why RAG is the one that stays current. You follow one question through the two lanes of the pipeline and learn where RAG still fails.
Walk through all seven stages of a RAG pipeline on a small company handbook: ingest, chunk, embed, store, retrieve, rerank and generate. You follow one question from the folder of files to a cited answer, with real chunk ids, vectors, a cross-encoder rerank and the final prompt. The pipeline code runs with a stand-in test model.
Look at what a RAG system actually receives from a real PDF and an intranet page. You see repeated headers, broken lines, split tables and page chrome, then compare quick loaders with careful ones built on pypdf, PyMuPDF and BeautifulSoup. A small scorecard counts noise and whole table rows so you can measure parse quality instead of judging by eye.
Learn how where you cut a document decides what search can find. On a thirteen-section handbook, you compare fixed-size chunks, sentence chunks and heading chunks, and count cut sentences and mixed topics for each. You see how overlap changes the result, why heading chunks kept every idea whole, and meet recursive, semantic and parent-document chunking.
Build a help bot in plain Python with no framework. You write the chunking, embedding and top-k retrieval files, assemble a prompt with chunk ids, and use a stand-in model or a real one. A minimum score lets the bot say it cannot find an answer instead of guessing, and you trace one question through every layer.
Turn retrieved chunks into a prompt that makes every answer checkable. You number the context blocks, write rules that require a citation per sentence, and fit the blocks inside a token budget counted with tiktoken. A small checker then tests each citation, flagging blocks that do not exist, facts a block does not contain and sentences with no citation.
Watch a simple retriever hand the model the wrong pages in five ways on a small handbook. The cases are different wording, an answer cut in half, an old version that conflicts, a question that needs two sections, and a question with no answer. For each one you see the fix: hybrid search, better chunks, metadata filters, reranking and a minimum score.
Combine keyword search and meaning search into one ranked list. You see BM25 win on an error code and dense search win on a described problem, then merge the two lists with Reciprocal Rank Fusion, which uses ranks instead of raw scores. A run over twelve help articles shows each method failing once and the hybrid getting all three searches right.
Add a second pass to retrieval where a cross-encoder reads the question and each candidate together and re-orders them. You run a small MS MARCO model on twelve golden questions and find it helps some, hurts others and ends up one first place worse. You also test how many candidates to rerank and see why a reranker must earn its place on your own data.
A practice exercise on an HR assistant that answers from an employee handbook but loses the right text before the prompt. Three bugs sit in the pipeline: chunking, retrieval and prompt building. You use an evaluation script with twenty-four golden questions to find each one, fix it and push both hit rates from 83 percent to 95 percent or more.
Project files and resources for this section. Also see the linked blog post to claim a free 6-month JetBrains IDE licence.
Learn what an eval is: a fixed set of test cases, a grader, a pass rate and a threshold that decides ship or block. See the three kinds of graders (rule checks, LLM as judge, human review) and when to use each. A small Python file scores two versions of a support bot prompt, and the friendlier prompt is blocked where a quick look at three examples would have shipped it. You also see where an eval runs: before merge, nightly, and on production samples.
Build the answer key for a support bot: questions, the facts a good answer must include, what it must never say, and tags. Cases come from past tickets, edge cases and attacks, 24 in total. In PyCharm you use a Pydantic schema to reject bad lines, a stats script to find coverage gaps, and a seeded script to split dev and test. The file is versioned like code and covered by pytest.
Score the retrieval half of a RAG system before any answer is written. You compute hit rate, MRR and nDCG with numpy on a small golden set and compare a keyword retriever with a hybrid one. The lecture shows what each number ignores, why averages hide per-question differences, and when to use which metric.
Score the answer itself, one claim at a time, because a good answer has no single correct wording. You split answers into claims and compute faithfulness, groundedness and relevance on four sample answers. Each bad answer fails a different metric: made-up details, off-topic, or a true claim with the wrong citation. A word-overlap rule stands in for the judge model, so it runs without a key.
Write a rubric that defines every score, have a judge model return a verdict, and validate each reply with Pydantic, asking again when it is broken. Then check the judge against human marks using agreement and Cohen's kappa, comparing a vague rubric with an explicit one. You also see position bias, verbosity bias and self-preference, and how to design them out. A stand-in test model means no key is needed.
Run RAGAS faithfulness on four RAG answers and see what it misses: a wrong citation and a missing required fact both score perfectly. You then write your own checks in plain Python for citation accuracy, required facts and phrases never to say. Finally you combine both in one report with a gate that exits with code 1, so CI can block a release.
Run an eval on every pull request so a prompt edit that makes answers worse cannot merge. Small graders turn saved answers into pass or fail, and pytest checks a pass-rate threshold and a drop from the baseline. A GitHub Actions workflow runs it automatically. You also cover flaky answers, cost, and changing the baseline only in a reviewed pull request.
A practice exercise on a Cartly order help bot. You write three checks (includes, excludes, cites), grow a golden set to at least eight cases across five categories, and add reference answers. Then you run the gate on the current bot and explain why it is blocked. pytest grades your work, and a stretch task is to improve the bot until the gate says ship.
Project files and resources for this section. Also see the linked blog post to claim a free 6-month JetBrains IDE licence.
See the standard parts LangChain provides: chat models, prompt templates, retrievers, tools and output parsers, joined with the pipe symbol. You write the same one-question job with the plain provider SDK and with a chain, and compare size and dependencies. You learn when LangChain pays off (many parts, changing providers, LangGraph and LangSmith) and when the plain SDK is the better choice.
Build a refund assistant three ways: as a chain, as plain Python with if and while, and as a LangGraph graph. The chain has no branch, no retry and no pause. The graph adds a branch on intent, a retry loop that fetches more policy lines, and a pause for human approval on large refunds. You see when a chain is still the right choice.
Learn the three building blocks of LangGraph with one small graph and no LLM. State is a TypedDict, nodes are plain functions that return only what they changed, and edges, including a conditional edge, pick the next step. You stream two messages through the graph and watch different paths run. You also see how Annotated with operator.add turns a field from overwrite into append.
Build the smallest useful LangGraph: it classifies a customer message as billing, howto or spam, then answers it. You write the state, a classify node, an answer node and a route function that sends spam straight to the end. A scripted test model runs it without a key, and a switch uses a real model when you add one. You compare invoke with stream in values and updates modes.
Build a refund assistant that pauses for a person and resumes where it stopped. Small refunds are approved automatically, larger ones call interrupt. A checkpointer (in-memory, then SQLite) saves state after every step under a thread id, so a new process can continue with Command(resume=...). You also read the saved history of a thread step by step.
Learn the hub and spoke pattern with a support assistant that handles billing, tech and account questions. One agent holding six tools gets confusing, so a hub routes each request to spokes that own two tools each. Spokes get a short brief, run in parallel, and never talk to each other. The hub retries a failed spoke once, then hands over to a person. You compare latency, cost, clarity and testing against a single agent.
Build a LangGraph research agent with five steps: plan, search, read, write and check. It answers from a small set of notes and cites each claim. The check node compares what was cited with what was actually read, and sends a draft that cites an unread note back to write. A max-drafts cap stops the loop. A scripted model runs it without a key.
Project files and resources for this section. Also see the linked blog post to claim a free 6-month JetBrains IDE licence.
The model only sees a tool's name, description and inputs, so those carry the whole job. You compare a vague tool (do stuff, handles orders, data) with a clear one (get order status) on a small order store. A great tool has a single purpose, a verb and noun name, a description of when to use it and when not, and a small result with ids. You also see how to split tools by intent, not by database table.
Write tool descriptions the model can act on. The formula is an active verb, a when-to-use hint, and a when-not-to-use line that names the alternative tool. You rewrite three real descriptions: a file search tool, a weather tool and a SQL tool. You also see why a description is a hint, not a lock, and why risky tools need real permissions in code.
Design a tool's input schema so wrong arguments are hard to send. You compare a loose Pydantic model where everything is a string with a tight one using an enum for priority, a date type, length limits, a customer id and defaults. Pydantic generates the JSON Schema the model receives. Short validation errors are sent back so the model can fix its own call. Rules: prefer enums, ids, defaults and flat fields.
A tool that only says operation failed makes an agent retry for nothing. You build structured errors in four categories: transient, validation, business and permission. Each carries an error category, an is_retryable flag and a customer-friendly message, with is_error set. A stand-in agent decides what to do for each one. You also see why an empty search result is a success, and how a subagent retries locally before escalating.
Understand the Model Context Protocol as one standard plug between AI apps and tools, which turns N times M connectors into N plus M. You meet the host, client and server roles, and the tools, resources and prompts a server can offer. A small server and client run in PyCharm, and a wire-level script shows initialize, tools/list and tools/call. You also compare stdio with streamable HTTP, and cover trust, scope, secrets and audit.
Turn a small orders API into an MCP server in Python. A decorator makes functions into tools, the name, docstring and type hints become the schema, and a resource exposes an order summary. A client launches the server over stdio, lists the tools and calls them, and a missing order comes back as a clear error result. You also see how a host config starts the server, and apply least privilege.
Project files and resources for this section. Also see the linked blog post to claim a free 6-month JetBrains IDE licence.
This course contains the use of artificial intelligence.
Do you want to build AI features that work in production, not just in a demo?
This course is a focused, hands-on path into AI engineering. You write Python, call language models, and learn how to make their answers reliable, cheap and safe. It is for developers who want to move into AI work, and for engineers who already ship software and want a clear map of the AI stack.
Start with just enough foundations. You set up Python with uv, learn the Python, NumPy and Pandas you need, and cover the core ideas of machine learning, neural networks, attention and tokenization. No research maths. You then learn evaluation basics: the accuracy trap, the confusion matrix, precision, recall and F1, and how these ideas turn into LLM evals.
Treat the LLM as an engineering material. You see what a model can and cannot do, how context windows, tokens and cost work, and what temperature and top-p change. You compare open and closed models, make your first API call, add streaming and error handling, and build a small CLI chat tool.
Control the model with prompts and context. You write explicit criteria, use few-shot examples, get typed output with Pydantic and Instructor, use prompt caching, and keep prompts under version control with tests. You also learn context engineering: what belongs in the window and how to manage it for a long-running agent.
Embeddings, vector databases and RAG. You learn what an embedding is, how to choose a model, and how similarity search works. You use Chroma and pgvector, load and parse real documents, chunk them, build a RAG pipeline from scratch, add citations, and fix the ways naive RAG fails with hybrid search and reranking.
Evaluate everything. You build a golden dataset, measure retrieval with hit rate, MRR and NDCG, measure generation with faithfulness and groundedness, write and validate an LLM judge, use RAGAS, and run regression tests in CI.
Agents, tools and MCP. You learn when to use LangChain and why chains break, then build with LangGraph: nodes, edges, state, human-in-the-loop, checkpointing and multi-agent patterns. You design tools with clear descriptions, input schemas and structured errors, learn what MCP is, configure MCP servers and build one for your own API.
Fine-tuning, serving and LLMOps. You learn when not to fine-tune and how full fine-tuning, LoRA and QLoRA differ. You serve AI apps with FastAPI, stream responses, package services in Docker and prepare a RAG service for deployment. You add observability, cost tracking and budget guards, caching, versioning, prompt injection defences, secrets and PII handling, guardrails and hallucination mitigation.
Finish with three capstones. You build a production RAG system over a real corpus, a multi-step research agent, and a full-stack AI product. The last section helps you present your work to employers and plan what to learn next.
Course highlights
What you will learn
How the course works
Lectures use slides with real code and real output. Most examples run with a stand-in model when you have no API key, so you can follow along at no cost. Each section ends with practice, and the capstones put it all together.
About the instructor
Chaand Sheikh teaches software and AI courses at StudyEasy. He explains each idea in plain words and shows it working in code.