Skip to content

dwhogan/rag-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RAG System

A Retrieval Augmented Generation (RAG) system built with LangChain and Anthropic's Claude.

Project Structure

rag-project/
├── src/
│   └── rag_system/
│       ├── __init__.py
│       ├── llm.py
│       └── document_loader.py
├── tests/
│   ├── __init__.py
│   └── test_llm.py
├── setup.py
├── requirements.txt
├── .env.example
├── .cursorignore
└── README.md

Requirements

  • Python 3.9+
  • OpenAI API key (or other LLM provider)

Setup

  1. Clone the repository:
git clone <repository-url>
cd rag_system
  1. Create and activate a virtual environment:
python -m venv venv
  1. Activate the virtual environment:
  • On macOS/Linux:
source venv/bin/activate
  • On Windows:
venv\Scripts\activate
  1. Install the package in development mode:
pip install -e .
  1. Copy .env.example to .env and add your Anthropic API key:
cp .env.example .env
# Edit .env and add your ANTHROPIC_API_KEY

Usage

  1. Ingest documents:
python -m rag_system.cli ingest documents/your_file.pdf
  1. Query the system:
python -m rag_system.cli query "Your question here"
  1. Interactive mode:
python -m rag_system.cli interactive

Development

  1. Run tests:
python -m pytest
  1. Run specific test file:
python -m pytest tests/test_llm.py

Features

  • Document ingestion from various formats (PDF, TXT, HTML)
  • Web content ingestion
  • Semantic search using embeddings
  • RAG implementation with Anthropic's Claude
  • Interactive query interface
  • Vector database storage with ChromaDB

Dependencies

  • langchain
  • langchain-community
  • langchain-anthropic
  • chromadb
  • python-dotenv
  • sentence-transformers
  • beautifulsoup4
  • requests
  • pypdf
  • pytest

License

MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages