Section 6: Lab: Accurate Retrieval with Hybrid Search
- Where similarity search alone fails on specific terms and document codes
- Hybrid search that fuses dense and sparse results with the Query API and RRF
- Reranking with a locally hosted model to reorder results
- Filter results by metadata such as department, date and confidentiality
- Lab: compare retrieval results before and after tuning
Section 7: LangGraph 1.x Fundamentals
- Why agent work needs a graph rather than a linear chain
- StateGraph, state, nodes, edges and conditional edges
- Designing state with TypedDict and the messages reducer
- Compile the graph and render its diagram to check the logic
- Lab: a graph that takes a question, retrieves data and answers with citations
Section 8: Lab: Agentic RAG
- Let the agent decide whether to retrieve or answer straight away
- Grade retrieved documents for relevance before using them
- Rewrite the question and retrieve again when results are not good enough
- Check that the answer is grounded in the documents, with a maximum number of loops
- Lab: an agent that answers policy questions with a source for every answer
Section 9: Memory and Persistence
- Short-term memory with a checkpointer and thread_id
- Moving from InMemorySaver to PostgresSaver for production
- Handling long chat histories: trimming, summarising and controlling tokens
- Long-term memory with a store for information users have shared
- Lab: a chatbot that keeps its context even after a server restart
Section 10: Lab: Tools, MCP and Human-in-the-Loop
- Let the agent call internal tools such as database lookups or back-office systems
- Connect the agent to MCP servers inside the organisation
- Pause for human approval with interrupt and resume with Command
- Limit tool permissions and log every call
- Lab: an agent that drafts a request which must be approved before it is saved