This repository contains code utilizing LLMs for advanced RAG applications (Agents, ReAct, CRAG...) over written text, video, and audio. The individual notebooks extensively utilize the OpenAI API and the LangChain library. In addition, LangSmith is used for evaluation.
- Corrective RAG: Implementation of the advanced Corrective RAG technique based on this paper: Corrective Retrieval Augmented Generation.
- The user query is used for regular RAG.
- LLM evaluates the retrieved documents for relevance.
- If at least one document is found not relevant, a transformed query is used for web search.
- Finally, RAG and web search results are used for answer generation.
- LangGraph: The flow of the CRAG logic is implemented using LangGraph.
- LangSmith: The code is traced with LangSmith for evaluation.
- Tool use: Search with Wikipedia API, Tavily Search, perform RAG over a given PDF, perform RAG over a given YouTube link.
- PDF Processing: Load, chunk, and index PDF documents using Chroma DB vector store.
- YouTube Video Processing: Download YouTube videos, generate transcripts via LLM, and chunk and index for RAG.
- Information Retrieval: Vector stores retrieval using Maximal Marginal Relevance (MMR).
- Chat memory: Advanced chat memory with implicit copy of the messages until a variable buffer size is reached, after that a summary is created by the LLM.
- PDF Processing: Load, chunk, and index PDF documents using Chroma DB vector store.
- Information Retrieval: Vector stores retrieval using Maximal Marginal Relevance (MMR).
- Chat memory: Memory is simply adding the chat messages until reset.