LangChain tutorial: shopping agents and Chroma RAG
Learn LangChain through a shopping agent and telecom RAG chatbot, with local Chroma storage, Streamlit interfaces and cloud model APIs.
Player not loading? Watch on YouTube
This LangChain crash course combines Python examples with explanations of language models, retrieval augmented generation (RAG) and tool use. The instructor states that basic Python knowledge is the only prerequisite. Setup uses uv, VS Code and notebooks, with API keys stored in a .env file. The examples call cloud models through Google and Groq; the course does not demonstrate local language model inference.
The retrieval lessons use Chroma for local vector storage and sentence transformer embeddings. A telecom PDF example splits text into 600-character chunks with 100-character overlap. The final chatbot adds CSV FAQs and SQLite support tickets, stores each source in a separate collection and retrieves matching records before asking an LLM to answer. The speaker distinguishes this RAG pipeline from an AI agent.
The shopping project connects a Streamlit interface to tools for product search, ratings and checkout. Qwen handles text requests, while Llama 4 Scout extracts product attributes from uploaded images. Checkout inserts an order into SQLite; the example does not process payments. Earlier memory exercises cover session memory rather than persistence across restarts.
The course also demonstrates LangSmith evaluation and compares Qwen with GPT-OSS in the instructor's test runs. Guardrail examples mask credit cards and redact email addresses through LangChain middleware.