#RAG
RAG is a production-grade Agentic Retrieval-Augmented Generation system. This project is built using Python, and uses PostgreSQL with pgvector for scalable, persistent vector storage.
pgvector extension installed.Ensure PostgreSQL is running on your machine. You need to create an empty database (the default expected database name is ragdb, with user postgres).
CREATE DATABASE ragdb;
Note: The pgvector extension must be installed in your PostgreSQL environment.
Navigate to the rag_project directory and copy the environment template:
cd rag_project
cp .env.example .env
Fill out the required configuration variables in the .env file, especially your database credentials and API keys (e.g., OpenAI, Gemini, or Github).
It is highly recommended to use a virtual environment. From the project root folder, run:
python -m venv .venv
# On Windows:
.venv\Scripts\activate
# On Linux/Mac:
source .venv/bin/activate
pip install -r requirements.txt
As this project uses Alembic to manage database migrations, you must apply the initial schema before running the application:
cd rag_project
alembic upgrade head
Create a data/ directory at the root of the project and place any PDFs, PowerPoint files, or text data you want the RAG system to index inside it. The system's document loaders are configured to automatically scan the <repo_root>/data/ path by default.
To start the interactive DRAGON chat interface, run:
cd rag_project
python main.py
/refresh : Scans for new or changed files incrementally and updates the vector database./reset : Completely wipes the database and forces a full re-index from scratch.exit : Quits the application.This repository has its database schema migrations consolidated to a single baseline. If you make modifications to the rag/db.py models, you can generate a new migration by running:
alembic revision --autogenerate -m "describe changes"
alembic upgrade head
5 commits
Python
99.8%
#RAG
RAG is a production-grade Agentic Retrieval-Augmented Generation system. This project is built using Python, and uses PostgreSQL with pgvector for scalable, persistent vector storage.
pgvector extension installed.Ensure PostgreSQL is running on your machine. You need to create an empty database (the default expected database name is ragdb, with user postgres).
CREATE DATABASE ragdb;
Note: The pgvector extension must be installed in your PostgreSQL environment.
Navigate to the rag_project directory and copy the environment template:
cd rag_project
cp .env.example .env
Fill out the required configuration variables in the .env file, especially your database credentials and API keys (e.g., OpenAI, Gemini, or Github).
It is highly recommended to use a virtual environment. From the project root folder, run:
python -m venv .venv
# On Windows:
.venv\Scripts\activate
# On Linux/Mac:
source .venv/bin/activate
pip install -r requirements.txt
As this project uses Alembic to manage database migrations, you must apply the initial schema before running the application:
cd rag_project
alembic upgrade head
Create a data/ directory at the root of the project and place any PDFs, PowerPoint files, or text data you want the RAG system to index inside it. The system's document loaders are configured to automatically scan the <repo_root>/data/ path by default.
To start the interactive DRAGON chat interface, run:
cd rag_project
python main.py
/refresh : Scans for new or changed files incrementally and updates the vector database./reset : Completely wipes the database and forces a full re-index from scratch.exit : Quits the application.This repository has its database schema migrations consolidated to a single baseline. If you make modifications to the rag/db.py models, you can generate a new migration by running:
alembic revision --autogenerate -m "describe changes"
alembic upgrade head
5 commits
Python
99.8%