How jnjt2935/ai-powered_security_chatbot works
This is a cybersecurity-awareness learning chatbot: course notes are ingested into a persistent vector store, relevant chunks are retrieved for questions, and an LLM generates grounded answers. The README also describes quiz generation, document upload, and a Streamlit interface, but those implementation files are absent from the tree. The sampled code confirms ingestion, retrieval, answer-generation, and evaluation behavior; UI wiring and quiz internals are therefore shown only where documented.
Main entry points: llm_answering.py Grounded answers · retrieval.py Chunk retrieval · data_ingestion.py Chunking and embeddings · vector_db Vector store
Components 11
Knowledge preparation
- Course notes
data/knowledge_base - Chunking and embeddings
data_ingestion.py - Vector store
vector_db
Question answering
- Chunk retrieval
retrieval.py - Grounded answers
llm_answering.py - LLM provider
- Quiz generation
Evaluation and interface
- Chat and upload UI
- Retrieval evaluation
retrieval_evaluation.py - Scope gate checks
gate_check.py
Other components
- Student
Connections 10
- Student → Chat and upload UI: asks or uploads
README.MD - Course notes → Chunking and embeddings: chunks and embeds
README.MD - Chunking and embeddings → Vector store: stores chunks
data_ingestion.py - Chunk retrieval → Vector store: queries chunks
retrieval.py - Grounded answers → Chunk retrieval: gets context
llm_answering.py - Grounded answers → LLM provider: generates answer
llm_answering.py - Chat and upload UI → Grounded answers: requests answers
README.MD - Chat and upload UI → Quiz generation: requests quizzes
README.MD - Retrieval evaluation → Chunk retrieval: measures retrieval
retrieval_evaluation.py - Scope gate checks → Grounded answers: checks scope gate
gate_check.py