Zenler Player
Your course is loading. Hang tight.
Building a RAG Application in Python
Back to curriculum
0% Complete
0% Complete
Introduction
Installing Python
Installing an IDE
Setting up a basic Python application
Setting up the LLM code
Setting up the CLI
Pulling a model from Ollama and trying things out
Getting started with the vector store
Setting up Postgres
Defining the vector store contract
Implementing the Postgres store I
Implementing the Postgres store II
Wiring thngs up
Trying things out
Getting started
Setting up our chunking logic
Creating embeddings from chunks
Trying out our embedder
Setting up the ingestor
Wire up the CLI for the ingestor
Trying out the ingestion pipeline
Getting started with retrieval
Implementing search in the postgres vector store
Setting up the query
Trying out retrieval
Getting started: the system prompt
Wrapping retrieval into a user message
Implement an ask command — RAG end-to-end in one function
Using an external system prompt
Modifying the chat command to use RAG
Adding a spinner
Improving the spinner
Getting started: moving processed files
Safety check: prevent re-triggering ingest of files
Scanning the documents directory on app startup
Setting up a debouncing handler
Starting our watcher to look for files to process
Adding the watch command
Trying things out
Getting started: making the Postgres search method hybrid
Reviewing the code and trying hybrid retrieval
Getting started: Modifying the abstract interface for metadata
Updating the Postgres vector store for metadata
Updating the search method for metadata
Populating metadata
Getting started: starting weaviate and adding the dependency
Getting started with the weaviate store with config entries
Setting up the Weaviate Store: Part I
Setting up has_document
Setting up upsert_document
Setting up delete_document
Setting up search
Trying things out
Adding project dependencies
Getting started with our web application
Setting up the FastAPI application and one route
Going through index.html
Setting up the chat endpoint
Setting up the endpoint to upload to the vector store
The problem we want to address
Getting started with rewriting the query
Using our rewriter in the CLI chat
Using our rewriter in the Web chat
Getting started
Updating config for images
Implementing the vision call and the format-conversion
Getting a vision model and trying things out
Updating the ingestor for images
Modifying the query for images: Part I
Modifying the query for images: Part II
Updating the web app for images: Part I
Updating the web app for images: Part II
Trying things out
Final Changes
Introduction
Introduction
Preview
Installing Python
Preview
Installing an IDE
Getting Started: Chatting with the LLM
Setting up a basic Python application
Setting up the LLM code
Setting up the CLI
Pulling a model from Ollama and trying things out
Setting up the Vector Store
Getting started with the vector store
Setting up Postgres
Defining the vector store contract
Implementing the Postgres store I
Implementing the Postgres store II
Wiring thngs up
Trying things out
Setting up the Ingestion Pipleline
Getting started
Setting up our chunking logic
Creating embeddings from chunks
Trying out our embedder
Setting up the ingestor
Wire up the CLI for the ingestor
Trying out the ingestion pipeline
Setting up Retrieval
Getting started with retrieval
Implementing search in the postgres vector store
Setting up the query
Trying out retrieval
Implementing RAG: Bringing it all together
Getting started: the system prompt
Wrapping retrieval into a user message
Implement an ask command — RAG end-to-end in one function
Using an external system prompt
Modifying the chat command to use RAG
Adding a spinner
Improving the spinner
Automating Ingestion
Getting started: moving processed files
Safety check: prevent re-triggering ingest of files
Scanning the documents directory on app startup
Setting up a debouncing handler
Starting our watcher to look for files to process
Adding the watch command
Trying things out
Hyrbrid Search & Retrieval
Getting started: making the Postgres search method hybrid
Reviewing the code and trying hybrid retrieval
Metadata
Getting started: Modifying the abstract interface for metadata
Updating the Postgres vector store for metadata
Updating the search method for metadata
Populating metadata
Weaviate: An alternative vector store
Getting started: starting weaviate and adding the dependency
Getting started with the weaviate store with config entries
Setting up the Weaviate Store: Part I
Setting up has_document
Setting up upsert_document
Setting up delete_document
Setting up search
Trying things out
Setting up a Web Interface
Adding project dependencies
Getting started with our web application
Setting up the FastAPI application and one route
Going through index.html
Setting up the chat endpoint
Setting up the endpoint to upload to the vector store
Improving the Rewriter
The problem we want to address
Getting started with rewriting the query
Using our rewriter in the CLI chat
Using our rewriter in the Web chat
Adding Support for Images
Getting started
Updating config for images
Implementing the vision call and the format-conversion
Getting a vision model and trying things out
Updating the ingestor for images
Modifying the query for images: Part I
Modifying the query for images: Part II
Updating the web app for images: Part I
Updating the web app for images: Part II
Trying things out
Final Changes
×
This is an unpublished lesson. This lesson will not be shown for students unless you set it as Public.
Back to Dashboard
No contents are available in this lesson!
No lessons available !
Back to Dashboard
Lesson contents locked
Enroll to unlock this lesson.
Enroll to unlock
Next Lesson