How manyacpmanya/ai_assistent works
AI_ASSISTENT is a Flask-based college information assistant. A user submits a question through the browser; the Flask route reads student data from MySQL, uses the RAG utilities to retrieve relevant context, and sends that context and question to Ollama before returning an answer to the UI. The README also describes chat-log persistence, but the sampled backend does not show it; that relationship is included as documented. The graph reflects the sampled implementation and README; other source files were not inspected.
Main entry points: main.py Flask routes · index.html Assistant UI · sample_db.sql Chat logs · rag_utils.py Chunking and retrieval
Components 7
Web interface
- Assistant UI
templates/index.html
Flask application
- Flask routes
main.py - Student records
- Chat logs
sample_db.sql
RAG retrieval
- Chunking and retrieval
rag_utils.py
Answer generation
- Ollama model API
Other components
- Question asker
Connections 7
- Question asker → Assistant UI: asks question
README.md - Assistant UI → Flask routes: posts question
README.md - Flask routes → Student records: reads records
main.py - Flask routes → Chunking and retrieval: runs retrieval
main.py - Flask routes → Ollama model API: requests answer
main.py - Flask routes → Chat logs: saves conversation
README.md - Flask routes → Assistant UI: returns answer
main.py