A modern AI-powered chat interface for TechNova University that provides instant answers to questions about the university's programs, campuses, and services. The application uses RAG (Retrieval-Augmented Generation) to provide accurate and context-aware responses based on the university's documentation.
- 🤖 AI-powered chat interface with natural language understanding
- 📚 RAG-based responses using university documentation
- 🎓 Information about programs, campuses, and services
- 📊 Real-time chat statistics and analytics
- 🔒 Session management for continuous conversations
- 📱 Responsive design for all devices
- 🎨 Modern and intuitive user interface
- Python 3.8+
- Flask: Web framework
- LangChain: AI/ML framework
- Ollama: Local LLM server
- SQLite: Database for storing chat statistics
- Flask-CORS: Cross-origin resource sharing
- HTML5/CSS3: Modern web interface
- JavaScript: Dynamic interactions
- Chart.js: Statistics visualization
- Python 3.8 or higher
- Ollama installed and running locally
- Git (for cloning the repository)
- Clone the repository:
git clone https://github.com/yourusername/python-rag-ollama.git
cd python-rag-ollama- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install the required packages:
pip install -r requirements.txt- Start the Ollama server:
ollama serve- In a new terminal, start the Flask application:
python app.pyThe application will be available at http://localhost:5001
- Open your browser and navigate to
http://localhost:5001 - Enter your name to start chatting
- Ask questions about TechNova University, such as:
- Available programs and degrees
- Campus locations and facilities
- Admission requirements
- Student services
- Research opportunities
Access the backoffice dashboard at http://localhost:5001/backoffice to view:
- Real-time chat statistics
- Popular questions
- System performance metrics
python-rag-ollama/
├── app.py # Main Flask application
├── database.py # Database operations
├── vector.py # Vector store and retrieval
├── static/ # Static files
│ ├── styles.css # CSS styles
│ └── logo.png # University logo
├── templates/ # HTML templates
├── requirements.txt # Python dependencies
└── README.md # Project documentation
python -m pytest tests/The project follows PEP 8 style guidelines. Use a linter to ensure code quality:
flake8 .- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- TechNova University for providing the documentation
- Ollama team for the local LLM server
- LangChain team for the RAG framework
For support, please open an issue in the GitHub repository or contact the development team.
- Add user authentication
- Implement chat history export
- Add support for multiple languages
- Integrate with university's student portal
- Add voice input/output capabilities