AgenticRAG is an intelligent Q&A system for university policies, courses, and assignments based on the Retrieval-Augmented Generation (RAG) framework. It aims to provide accurate, easy-to-understand answers by retrieving real document content, reducing hallucinations in generative models.
Policy documents are often complex and lengthy, making it difficult to quickly extract needed information. This system combines retrieval and generation technologies to provide reliable answers grounded in facts.
The system uses a front-end and back-end separated architecture:
.local_data/ directory, supporting local and cloud configurations.




git clone <repository-url>
cd AgenticRAG
# Activate virtual environment (recommended)
conda create -n rag-agentic python=3.10
conda activate rag-agentic
# Install dependencies
pip install -r requirements.txt
# Set environment variables (create .env file)
# DATABASE_URL=postgresql://postgres:password@localhost:5433/lurag
# GOOGLE_APPLICATION_CREDENTIALS=/path/to/credentials.json # Vertex AI (optional)
# VERTEX_PROJECT_ID=your-project-id
# VERTEX_LOCATION=us-central1
# OLLAMA_BASE_URL=http://localhost:11434 # Ollama fallback (optional)
# OLLAMA_GEN_MODEL=llama3.2
# LOCAL_DATA_DIR=./.local_data # Data directory (optional)
Start PostgreSQL using Docker Compose:
docker-compose up -d
Or use existing PostgreSQL, ensure pgvector extension is enabled:
CREATE EXTENSION IF NOT EXISTS vector;
cd web
npm install
npm run dev # Development mode, visit http://localhost:5173
cd code
python -m backend.main
API Documentation: http://localhost:8536/docs
DATABASE_URL: PostgreSQL connection string (required)LOCAL_DATA_DIR: Data directory path (default .local_data)GOOGLE_APPLICATION_CREDENTIALS / VERTEX_PROJECT_ID / VERTEX_LOCATION: Vertex AI configuration (optional)OLLAMA_BASE_URL / OLLAMA_GEN_MODEL: Ollama configuration (optional)AUTO_CREATE_TABLES: Auto-create tables on startup (default 1)# Build and run
docker build -t agenticrag .
docker run -p 8536:8536 --env-file .env agenticrag
Backend auto-generates Swagger UI: http://localhost:8536/docs
Main endpoints:
/api/v1/auth/login: User login/api/v1/questions/stream: Streaming Q&A interface/api/v1/files/list: File list/api/v1/admin/policies: Upload policies (admin)Issues and Pull Requests are welcome. Ensure code follows project standards.
39 commits
3 commits
Python
86.1%
C++
10.6%
C
1.0%
AgenticRAG is an intelligent Q&A system for university policies, courses, and assignments based on the Retrieval-Augmented Generation (RAG) framework. It aims to provide accurate, easy-to-understand answers by retrieving real document content, reducing hallucinations in generative models.
Policy documents are often complex and lengthy, making it difficult to quickly extract needed information. This system combines retrieval and generation technologies to provide reliable answers grounded in facts.
The system uses a front-end and back-end separated architecture:
.local_data/ directory, supporting local and cloud configurations.




git clone <repository-url>
cd AgenticRAG
# Activate virtual environment (recommended)
conda create -n rag-agentic python=3.10
conda activate rag-agentic
# Install dependencies
pip install -r requirements.txt
# Set environment variables (create .env file)
# DATABASE_URL=postgresql://postgres:password@localhost:5433/lurag
# GOOGLE_APPLICATION_CREDENTIALS=/path/to/credentials.json # Vertex AI (optional)
# VERTEX_PROJECT_ID=your-project-id
# VERTEX_LOCATION=us-central1
# OLLAMA_BASE_URL=http://localhost:11434 # Ollama fallback (optional)
# OLLAMA_GEN_MODEL=llama3.2
# LOCAL_DATA_DIR=./.local_data # Data directory (optional)
Start PostgreSQL using Docker Compose:
docker-compose up -d
Or use existing PostgreSQL, ensure pgvector extension is enabled:
CREATE EXTENSION IF NOT EXISTS vector;
cd web
npm install
npm run dev # Development mode, visit http://localhost:5173
cd code
python -m backend.main
API Documentation: http://localhost:8536/docs
DATABASE_URL: PostgreSQL connection string (required)LOCAL_DATA_DIR: Data directory path (default .local_data)GOOGLE_APPLICATION_CREDENTIALS / VERTEX_PROJECT_ID / VERTEX_LOCATION: Vertex AI configuration (optional)OLLAMA_BASE_URL / OLLAMA_GEN_MODEL: Ollama configuration (optional)AUTO_CREATE_TABLES: Auto-create tables on startup (default 1)# Build and run
docker build -t agenticrag .
docker run -p 8536:8536 --env-file .env agenticrag
Backend auto-generates Swagger UI: http://localhost:8536/docs
Main endpoints:
/api/v1/auth/login: User login/api/v1/questions/stream: Streaming Q&A interface/api/v1/files/list: File list/api/v1/admin/policies: Upload policies (admin)Issues and Pull Requests are welcome. Ensure code follows project standards.
39 commits
3 commits
Python
86.1%
C++
10.6%
C
1.0%