RAG from the Ground Up with Python and Ollama - Building a Document Interaction System
Overview
Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Dive into a comprehensive 16-minute tutorial on implementing Retrieval Augmented Generation (RAG) from scratch using Python and Ollama. Learn how to parse and manipulate documents, explore the concept of embeddings for describing abstract ideas, and implement an effective method for surfacing relevant document sections based on queries. Follow along to build a script that enables a locally-hosted Language Model to interact with your own documents. Gain insights into environment setup, function implementation, embedding techniques, caching strategies, and cosine similarity for comparison. Explore potential improvements and discover how to provide context to your LLM. By the end, you'll have a solid foundation for creating RAG systems and enhancing LLM interactions with custom datasets.
Syllabus
- Intro
- Environment Setup
- Function review
- Source Document
- Starting the project
- parse_file
- Understanding embeddings
- Implementing embeddings
- Timing embedding
- Caching embeddings
- Prompt embedding
- Cosine similarity for embedding comparison
- Brainstorming improvements
- Giving context to our LLM
- CLI input
- Next steps
Taught by
Decoder