How bipinmaurya146/campus_assistant_bot works
This is a Streamlit university student-support chatbot. A student submits a question through the chat UI; the classifier embeds it, checks intent confidence against saved prototypes, searches dataset questions within the predicted intent, and returns the matching stored response or a fallback. The UI also displays classifier metadata in a debug panel. The README documents startup embedding caching and dataset grounding; source shows resource loading and caching, though its question-similarity threshold is 0.60, not the README’s 0.80.
Main entry points: classifier.py Classifier · streamlit_app.py Chat UI · AI-Powered Chatbot.xlsx - Chatbot_Student_Support.csv Support Dataset · intent_prototypes.pkl Intent Prototypes
Components 14
Chat Interface
- Chat UI
streamlit_app.py - Debug Panel
streamlit_app.py
Question Classification
- Classifier
backend/app/classifier.py - Resource Cache
streamlit_app.py - Question Embedding
backend/app/classifier.py - SentenceTransformer
- Intent Matching
backend/app/classifier.py - Intent Threshold
backend/app/classifier.py
Grounded Knowledge
- Question Search
backend/app/classifier.py - Similarity Threshold
backend/app/classifier.py - Response Retrieval
backend/app/classifier.py - Intent Prototypes
model/intent_prototypes.pkl - Support Dataset
data/AI-Powered Chatbot.xlsx - Chatbot_Student_Support.csv
Other components
- Student
Connections 18
- Student → Chat UI: asks question
streamlit_app.py - Chat UI → Resource Cache: loads classifier
streamlit_app.py - Resource Cache → Classifier: loads resources
streamlit_app.py - Chat UI → Classifier: submits question
streamlit_app.py - Classifier → Question Embedding: encodes question
backend/app/classifier.py - Question Embedding → SentenceTransformer: encodes text
backend/app/classifier.py - Classifier → Intent Prototypes: loads prototypes
backend/app/classifier.py - Classifier → Support Dataset: loads dataset
backend/app/classifier.py - Intent Matching → Intent Prototypes: compares vectors
backend/app/classifier.py - Classifier → Intent Matching: scores intents
backend/app/classifier.py - Intent Matching → Intent Threshold: checks confidence
backend/app/classifier.py - Classifier → Question Search: searches intent rows
backend/app/classifier.py - Question Search → Support Dataset: reads questions
backend/app/classifier.py - Question Search → Similarity Threshold: checks similarity
backend/app/classifier.py - Classifier → Response Retrieval: selects response
backend/app/classifier.py - Response Retrieval → Support Dataset: retrieves exact answer
backend/app/classifier.py - Classifier → Chat UI: returns result
streamlit_app.py - Chat UI → Debug Panel: shows metadata
streamlit_app.py