How 4rqum/its-chatbot works
ITS-Chatbot is a terminal-based assistant for diagnosing common IT problems through guided questions and step-by-step troubleshooting, with escalation guidance when appropriate. The principal flow runs from CLI input through normalization and intent matching, then question selection and a troubleshooting response. JSON files supply intent, question, synonym, and troubleshooting knowledge. Conversation memory supports follow-up answers and session resets. The excerpts establish the CLI, knowledge loader, NLP, matcher, and conversation logic; some chatbot implementation is omitted, so uncertain internal wiring is not shown.
Main entry points: chatbot.cpp Chatbot · main.cpp CLI · knowledge_base.cpp Knowledge loader · conversation_state.hpp Conversation state
Components 14
CLI interface
- CLI
src/main.cpp
Conversation flow
- Chatbot
src/chatbot.cpp - Conversation state
src/conversation_state.hpp - Question selection
src/chatbot.cpp - Answer capture
src/chatbot.cpp - Troubleshooting response
src/chatbot.cpp
Language matching
- Text normalization
src/nlp.cpp - Intent matcher
src/match.cpp
Knowledge content
- Knowledge loader
src/knowledge_base.cpp - Intent definitions
data/intents.json - Synonym maps
data/synonyms.json - Diagnostic questions
data/questions.json - Troubleshooting flows
data/troubleshooting.json
Other components
- User
Connections 17
- User → CLI: enters text
- CLI → Chatbot: initializes
- CLI → Chatbot: submits message
- CLI → Chatbot: submits answer
- CLI → Chatbot: resets session
- Chatbot → Text normalization: normalizes text
- Chatbot → Intent matcher: classifies tokens
- Chatbot → Conversation state: updates state
- Chatbot → Question selection: selects questions
- Chatbot → Answer capture: stores answers
- Chatbot → Troubleshooting response: builds response
- CLI → User: displays response
- Knowledge loader → Intent definitions: loads
- Knowledge loader → Synonym maps: loads
- Knowledge loader → Diagnostic questions: loads
- Knowledge loader → Troubleshooting flows: loads
- Chatbot → Knowledge loader: loads and reads