Skip to content

PMWan/rag-tutorial-v2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rag-tutorial-v2

A RAG (Retrieval-Augmented Generation) tutorial project using vector storage and document processing.

Setup

This project uses uv for dependency management.

Prerequisites

  • Python 3.8+
  • uv (install with: curl -LsSf https://astral.sh/uv/install.sh | sh)

Installation

# Install dependencies
uv sync

# Or install individually
uv add pypdf langchain chromadb boto3
uv add --dev pytest

Running the project

# Populate the database first
uv run python populate_database.py

# Run Python scripts with uv
uv run python query_data.py "Your question here"
uv run python test_rag.py

# Launch web chat interface
uv run streamlit run web_chat.py

# Or activate the virtual environment
source .venv/bin/activate
python populate_database.py

Dependencies

  • pypdf: PDF processing
  • langchain: RAG framework
  • chromadb: Vector database
  • boto3: AWS SDK
  • streamlit: Web interface
  • pytest: Testing framework (dev dependency)

About

An Improved Langchain RAG Tutorial (v2) with local LLMs, database updates, and testing.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 57.2%
  • Shell 41.2%
  • Dockerfile 1.6%