Syllabus
Start Here: GenAI Basics
- What is GenAI? – Definition, Google vs ChatGPT, traditional AI vs GenAI
- GenAI in Action – What GenAI creates and what AI engineers build
- What is an LLM? – How an LLM predicts, parameters and tokens
- Prompt to Response – Prompt to response, apps vs code, and how the API works
- Virtual Environment & uv – What a virtual environment is, pip and uv, installing uv, requirements.txt, and the three setup commands
- API Keys and Limits – What an API key is, the .env file, the default key names, free plan limits, and the three common key errors
- Calling Your First LLM – Package and API key for each company, then call Gemini, Groq and Mistral
Build with LangChain
- What's the Issue? – Switch company and every line changes. We need something better
- What is LangChain? – What LangChain is, and the toolbox of building blocks it gives you
- Your First LangChain Call – Install a package, then create the model with a class or init_chat_model
- Temperature & Max Tokens – How random the answer is, and how long it can be
- What is a Prompt? – What a prompt is, the three message types and the system prompt
- Writing Messages – The four roles, three ways to write messages, personalities and role mistakes
- Prompt Templates – The f-string problem, prompt templates, and templates with many blanks
- Your First Chatbot – What a chatbot is, the loop, a first chatbot in a few lines, and what each line does
- Chat History – Why LLMs forget, resending the history, the context window and MessagesPlaceholder
- Output Parsers – What output parsers are and the string, list, JSON and Pydantic parsers
- Structured Output – Structured output with a Pydantic schema: PydanticOutputParser and with_structured_output
- The Story of Chains – Old chains, the 3 repeated steps, deprecation
- Pipe & Runnables – The pipe operator and the Runnable standard
- Common Runnables – The common runnables: your own function as a step (RunnableLambda), RunnableParallel and RunnablePassthrough, and a pointer to more
- Why Tools? – Why LLMs cannot know live data, and how a tool lets them ask for it
- Tool Calling in Code – Make a tool with @tool, attach tools with bind_tools, the five-step tool-calling flow, and Tavily web search
- Crypto Price Project – A small project: a tool that calls a free price API for any coin, and a model that uses it
- Web Search with Tavily
Chat with Your Data (RAG)
- What is RAG? – Why LLMs need your data, what RAG is, and the whole pipeline in one picture
- What Is an Embedding Vector? – What an embedding vector is, a movie example, why we need it, and which models make it
- From Chunk to Vector – A chunk to a vector: the ready-made model, its table, attention, average and normalize
- Store and Search – What a vector database stores, the two jobs (store and search), how one question is searched, and top-k
- Measuring Similarity – Cosine similarity, dot product and Euclidean distance with tables, and where you set the choice in Chroma, Pinecone and Qdrant
- Fast Search (ANN) – Why brute force is slow, what ANN is, its five families, and IVF, HNSW and PQ explained
- Document Loaders – What a Document is and how to use it, what a loader is, the types of loaders, and how PyPDFLoader works
- Web Loaders – BeautifulSoup, WebBaseLoader, RecursiveUrlLoader and PlaywrightURLLoader: what each does, the headless browser, and what to install
- Text Chunking – What chunking is and why, chunk_size and chunk_overlap, the four kinds of text splitters, the recursive splitter, split_text and split_documents
- Build a RAG App – The two parts of a RAG app, load and split, embed and store, first and next run, retrieve, augment and generate, and other models and stores
- Chat with History (RAG) – Multi-turn chat that retrieves
Agents with LangGraph
- Why LangGraph? – Why a chain is not enough, the four levels of AI apps, and what state, node and edge mean
- Six Workflows – The six workflows we build in this unit, and which job needs which shape
- Chains vs Graphs – Linear chains vs cyclic graphs
- What Is State? – Why steps share data, what the state is, and why a node returns only what it changes
- State Types & Reducers – The four ways to write the state, and reducers: overwrite or merge
- Building a Graph – Why we describe the flow, then add_node, add_edge with START and END, and compile and invoke
- Conditional Edges – Conditional edges: a router function that picks the next node, for a loop and for many paths
- The Pipeline Idea – Why one big prompt fails, the assembly-line idea, and the three nodes with their roles
- Build and Run – The full graph, running it, an example result, and why a pipeline beats one prompt
- Fan-Out and Fan-In – Why run independent checks together, fan-out and fan-in, and the three checks
- Merging with Reducers – Three nodes writing one key, the merge reducer, running it, and other reducers
- Write, Review, Rewrite – Why one try is not enough, reflection, the writer and reviewer nodes, and the stop rule
- Run It, Then Add Tools – Running the loop, adding a search tool, and two loops in one graph
- Memory – Persisting state across turns
- Human-in-the-Loop – Pausing for human approval
- Conditional RAG – Adaptive routing between RAG paths