Skip to content

michalszc/agh-regulations-assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AGH Regulations Assistant

AGH Regulations Assistant
Image generated by AI

Overview

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.

Features

  • 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

Installation

Note: The project was developed using Python 3.12.

  1. Clone the repository:
    git clone https://github.com/michalszc/agh-regulations-assistant.git
    cd agh-regulations-assistant
  2. (Optional) Create and activate a virtual environment:
    python3 -m venv venv
    source venv/bin/activate
  3. Install dependencies:
    pip install -r requirements.txt

Usage

Run the assistant with:

python src/main.py [OPTIONS]

Parameters

  • --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)

Configuration

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.

Example

python src/main.py --index_path faiss_index --model_name gemini-1.5-flash-8b --model_provider google_genai

License

Licence

About

AGH's AI assistant for navigating university policies.

Resources

License

Stars

Watchers

Forks

Contributors

Languages