** 🤖 A Simple Self-Learning Chat Bot**
This project is a rule-based chatbot built using Python that can learn from user interactions. Unlike static chatbots, this bot dynamically updates its knowledge base by storing new responses in a JSON file.
- 💬 Interactive command-line chatbot
- 🧠 Self-learning capability using JSON storage
- 📁 Persistent knowledge base (
knowledge_base.json) - 🔄 Dynamically updates responses during runtime
- ⚡ Lightweight and beginner-friendly
- Language: Python
- Libraries Used:
json(for data storage)os(for file handling)
The chatbot follows a simple learning loop:
- User enters a message
- Bot checks the message in
knowledge_base.json - If found → returns stored response
- If not found:
- Bot asks the user for the correct response
- Saves it into the knowledge base
- Future queries will use the learned response
This makes the bot adaptive over time.
Simple-Chat-Bot/ │ ├── chatbot.py # Main chatbot logic ├── knowledge_base.json # Stores learned responses └── README.md
- Clone the repository:
git clone https://github.com/Areeb-code/Simple-Chat-Bot.git
- Navigate to the folder:
cd Simple-Chat-Bot - Run the chatbot:
python chatbot.py
WELCOME TO THE SIMPLE CHAT_BOT ^_____^
CHAT BOT :please ask me any thing : )
YOU : hello
CHAT BOT: I don't know the answer to that question.
So, could you tell me what will be the proper response of this question
YOU : hi there!
CHAT BOT: UPDATING THE KNOWLEDGE....
YOU : hello
CHAT BOT: hi there!