Your agent is smart but doesn't know YOUR business — add company knowledge with Retrieval-Augmented Generation
By the end of this session, you'll have both conceptual understanding and hands-on experience with the foundations of AI.
See why general-purpose LLMs fail on company-specific questions and how Retrieval-Augmented Generation (RAG) solves this by grounding agents in your own data.
Load real documents, build a search tool that finds relevant passages, and wire it into your agent loop so Claude answers from YOUR data.
Learn what happens when documents contradict each other, data is outdated, or the retriever returns irrelevant results. Build agents that say 'I don't know' when they should.
Measure whether your agent finds the right documents and gives accurate answers. Introduction to retrieval metrics that matter for business deployment.
A carefully crafted progression from concepts to hands-on building.
Claude knows the internet. It doesn't know your company's SOPs, product catalog, or HR policies. That's a problem — and RAG is the solution.
How RAG works under the hood — from document loading to retrieval to generation.
Build an agent that answers questions about a company using its own documents.
Your agent now knows YOUR business. Next: what happens when the data is wrong?
Your agent is only as trustworthy as its data. What happens when documents are wrong, outdated, or contradictory?
How companies actually deploy RAG — from customer support to internal knowledge bases to compliance.
Your agents now have memory (Session 5), reasoning (Session 6), and knowledge (today). Next: make them work in teams.
Everything you need to explore, experiment, and build.
Watch a RAG agent search company documents, rank results, detect outdated data, and generate a cited answer. Interactive animated trace with real CloudSync data.
Watch the agentProjectable lecture companion — visual slides for the full Session 7 lecture with RAG architecture diagrams, failure mode analysis, and interactive navigation.
Open lecture guideBuild a company knowledge agent with document loading, search, and RAG. Uses Claude's long context window — no vector DB needed.
Open in ColabOfficial guide to building RAG systems with Claude. Covers chunking strategies, retrieval patterns, and best practices.
Read docsClaude can process 200K tokens at once. Learn how to use long context as a simpler alternative to traditional vector search for smaller document sets.
Read docsAnthropic's guide to agent patterns — including RAG as a core capability for grounding agents in real data.
Read guidePrivate dashboard with talking points, demo cues, discussion prompts, and live timers for each lecture section. Open on your laptop while projecting the lecture guide.
Open speaker notesFull-screen projectable 45-minute countdown with 3 phases, auto-transitions, audio chimes, and troubleshooting tips for the hands-on Colab session.
Start timerInteractive demo of three RAG failure scenarios — outdated documents, contradictions, and unanswerable questions. Toggle between broken and fixed agent behaviors.
Explore failuresStep-by-step walkthrough for the Session 7 homework: build a RAG agent, stress-test it, evaluate accuracy, and design a real-world proposal. Includes starter code and rubrics.
Start homeworkColab notebook for the Session 7 homework. All RAG infrastructure is pre-built — pick your domain, load your documents, test your agent, break it, and evaluate it.
Open in ColabThree interactive challenges to build your intuition.
45 minutes in Google Colab. Build an agent grounded in company documents:
Load sample company documents — policies, FAQs, product catalogs. Process them into searchable chunks.
Create a search_documents tool that finds relevant passages for any query. Wire it into your agent loop.
Ask company-specific questions. Compare: does the agent answer from documents or hallucinate? Test edge cases.
Test with contradicting docs, outdated info, and unanswerable questions. Make your agent say 'I don't know' when appropriate.
Evaluate your knowledge agent's trustworthiness:
Write 10 questions: 5 answerable from the documents, 3 partially answerable, 2 unanswerable. Run all through your agent.
For each answer: Did it use the right document? Is the answer correct? Did it hallucinate? Did it cite sources?
Where does your agent fail? Wrong retrieval? Right retrieval but wrong answer? No retrieval when it should have searched?
List 3 specific improvements: better chunking, better search queries, better system prompt instructions, or additional guardrails.
RAG grounds agents in reality. Without RAG, your agent hallucinates about your company. With RAG, it answers from real documents. This is the #1 pattern in enterprise AI.
Your agent is only as trustworthy as its data. Outdated documents, contradictions, and gaps are the real-world challenges. Building trust means handling these gracefully.
Long context is the accessible RAG. Claude's 200K token window means business students can build RAG without vector databases. Start simple, scale later.
'I don't know' is a feature. The best knowledge agents know the limits of their data. An agent that refuses to answer is more trustworthy than one that hallucinates.
Complete these tasks before our next class to prepare for prompt engineering.
One agent is useful. A team of agents is powerful. Build a researcher→analyst pipeline and learn coordination patterns.