
Discover advanced retrieval augmented generation techniques to build high-quality chatbots with LLMs, learn practical methods for enterprise LLM applications, and avoid common pitfalls.
Prepare by meeting prerequisites in intermediate Python, Docker, SQL, and OpenAI access, and gain basics of terminals, vector databases, and translating natural language to SQL.
Clone the GitHub repository, create a virtual environment, install dependencies from requirements.txt, and configure env with your OpenAI key to run notebooks in VS Code.
Walk through the repository structure from the app folder to back ends and Postgres, learn to configure the OpenAI key, and review data, notebooks, and Rag pipelines.
Explore setting up a fullstack LangChain app with docker compose, switch from back end to master back end, and test the React frontend on port 5555 using a vector database.
Consider avoiding this course if you seek open source lms integration or lack python and lang chain basics, since it concentrates on Rec applications.
Update LangChain content with package restructuring for model and vector providers and switch to GPT four mini. It adds jsonb metadata and guidance from rag v1 to v2.
Explore how LangChain implements a runnable interface to pipe a prompt, a model, and an output parser, building a chain with a topic and invoke method that yields a joke.
Build a small lang chain style expression language by overloading the pipe operator to chain runnables, using an abstract base class with invoke and process methods.
Explore the core LangChain runnables—pass-through, lambda, and parallel—and learn to build nested chains, use extractors, and apply the assign function to create multi-branch pipelines.
Explore real world examples of retrieval augmented generation using a chat prompt template, a vector store, embeddings, and a RAC workflow.
Learn to manage chat history in a rag pipeline by rewriting follow-ups, chaining rephrase with retrieval, and using a vector store with documents for accurate answers.
The indexing API keeps raw documents in sync with the vector store by updating only changed data, preventing duplicates. Use cleanup modes none, incremental, or full with PG vector.
Introduce ragas, a framework for evaluating retrieval augmented generation with metrics like faithfulness and answer relevancy, then build a test set using LangChain with embeddings and a chat model.
Transform a qa csv into a pandas data frame and build a rag pipeline with a chroma vector store, embedding model, retriever, and llm to evaluate against ground truth metrics.
Migrate from v1 to v2 by wrapping the Chadami and embeddings models with the length change wrapper and length chain embeddings wrapper, using the default query distribution.
Explore chunking strategies in LangChain, from character text splitters to semantic and custom LLM splitters, and learn how embedding-driven chunks enhance information retrieval and summarization.
Compare open source embedding models from Huggingface with OpenAI embeddings, and learn to choose model size and dimensions for efficient vector stores and accurate queries.
Learn multi query retrieval to improve vector database queries by generating multiple reformulated questions and retrieving diverse, non-duplicated documents using a multi query chain and deduplication steps.
HyDE uses hypothetical document embeddings to generate five hypothetical answers for a query, then retrieves the best documents, showing a prompt and parsing workflow and foreshadowing parentchild retrieval.
Balance chunk size with a parent document retriever that first retrieves small chunks and then larger context. Build a postgres-backed doc store to persist documents using jsonb serialization.
Serialize documents to jsonb in a Postgres docstore while extending the base store and implementing mget, mset, mdelete, and yield keys.
Explore agent-based rag workflows where a language model drives actions through tools and retrieval, using a react prompt, Lang Chain hub prompts, and a retrieval tool with an agent executor.
Rerank retrieved documents with a cross encoder model and apply an LM based document compression to reduce inputs sent to the language model in a full rag pipeline.
Build an llm-based document compressor and filter using a two-input prompt to evaluate relevance to a question, returning true or false, then post-process and filter documents for rag workflows.
What to Expect from This Course
Welcome to our course on Advanced Retrieval-Augmented Generation (RAG) with the LangChain Framework!
In this course, we dive into advanced techniques for Retrieval-Augmented Generation, leveraging the powerful LangChain framework to enhance your AI-powered language tasks. LangChain is an open-source tool that connects large language models (LLMs) with other components, making it an essential resource for developers and data scientists working with AI.
Course Highlights
Focus on RAG Techniques: This course provides a deep understanding of Retrieval-Augmented Generation, guiding you through the intricacies of the LangChain framework. We cover a range of topics from basic concepts to advanced implementations, ensuring you gain comprehensive knowledge.
Comprehensive Content: The course is designed for developers, software engineers, and data scientists with some experience in the world of LLMs and LangChain. Throughout the course, you'll explore:
LCEL Deepdive and Runnables
Chat with History
Indexing API
RAG Evaluation Tools
Advanced Chunking Techniques
Other Embedding Models
Query Formulation and Retrieval
Cross-Encoder Reranking
Routing
Agents
Tool Calling
NeMo Guardrails
Langfuse Integration
Additional Resources
Helper Scripts: Scripts for data ingestion, inspection, and cleanup to streamline your workflow.
Full-Stack App and Docker: A comprehensive chatbot application with a React frontend and FastAPI backend, complete with Docker support for easy setup and deployment.
Additional resources are available to support your learning.
Happy Learning! :-)