AGH Regulations Assistant is a tool designed to help users quickly find and interpret regulations and policies at AGH University. It leverages AI to provide accurate, context-aware answers to queries about university rules, procedures, and documentation.
- Natural language understanding of regulation queries
- Fast and relevant responses
- Maintains message history for context-aware conversations
- Detects toxic messages and responds appropriately
- Recognizes queries about Jagiellonian University (UJ) and responds appropriately by clarifying that it is an assistant for AGH University
- Each response is evaluated and receives a rating
Note: The project was developed using Python 3.12.
- Clone the repository:
git clone https://github.com/michalszc/agh-regulations-assistant.git cd agh-regulations-assistant - (Optional) Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate - Install dependencies:
pip install -r requirements.txt
Run the assistant with:
python src/main.py [OPTIONS]--index_path<path>: Path to the FAISS index (default:faiss_index)--model_name<name>: Name of the LLM model to use (default:gemini-1.5-flash-8b)--model_provider<provider>: Provider for the LLM model (default:google_genai)--k<int>: Number of top documents to retrieve before filtering (default:5)--threshold<float>: Minimum relevance score for document retrieval (default:0.5)--delta<float>: Maximum score drop-off allowed from the top score (default:0.05)--token-budget<int>: Maximum total tokens allowed, including the prompt (default:1000)--max_history_tokens<int>: Maximum number of tokens to keep in the message history (default:500)--show-graph: Whether to show the graph of the RAG pipeline (flag; no value needed)
Before running the assistant, create a .env file in the project root directory with your Google API key:
GOOGLE_API_KEY=your_google_api_key_here
This key is required for accessing the LLM model via the Google GenAI provider. Alternatively, you can use a different LLM model and provider by specifying the --model_name and --model_provider options when running the assistant.
python src/main.py --index_path faiss_index --model_name gemini-1.5-flash-8b --model_provider google_genai