A modular Q&A chatbot API that combines:
codeware_bot_flow.json)Supports Bangla, English, and Banglish queries.
phi3:Mini)phi3:Mini. If u wish to use any other models, you can just change it in config.py# Clone the repo
# git clone <your-repo-url>
cd directory
# Create and activate environment
conda create -n chatbot-rag python=3.10 -y
conda activate chatbot-rag
# Install dependencies (conda)
conda install --file requirements.txt
# (Optional, to silence deprecation warnings, use pip for these two only if needed)
# pip install -U langchain-chroma langchain-ollama
.txt files in the company_info/ folder.codeware_bot_flow.json is present in the project root.python embed_company_info.py
chromadb_store/).ollama serve &
ollama pull phi3:mini # or another small model
uvicorn app:app --reload
/chatInput:
{
"user_id": "12345",
"question": "I want to know about packages"
}
Logic:
/chatbot and returns trigger info.Response (RAG):
{
"triggered": false,
"answer": "Our packages include Basic, Premium, and Business plans...",
"sources": ["doc1.txt", "doc2.txt"]
}
Response (Rule-based):
{
"triggered": true,
"trigger_id": "...",
"matched_keyword": "Packages",
"answer": "Rule-based flow triggered for keyword 'Packages'. (Simulated external API call.)"
}
/chatbotInput:
{
"user_id": "12345",
"trigger_id": "..."
}
Response:
{
"user_id": "12345",
"trigger_id": "...",
"message": "Simulated external API response for trigger_id ..."
}
Test with curl:
curl -X POST http://127.0.0.1:8000/chat \
-H "Content-Type: application/json" \
-d '{"user_id":"u1","question":"What packages do you offer?"}'
codeware_bot_flow.json or new docs to company_info/ and re-run embedding.Below are some Postman examples for interacting with the chatbot:



English works fine for both trigger-flow-based and LLM based Q&A. To enable bangla Language support I alternate the embedding model from all-MiniLM-L6-v2
to csebuetnlp/banglishbert. But still the accuracy did not increase. I tried to increase chunk size and relevent info grouping for better chunking. Though it seem to have a good effect but not quite.
I have found the problem. The string match for Bangla language not working. I think resolving this will ensure the Bangla Q&A.
9 commits
Python
100.0%
A modular Q&A chatbot API that combines:
codeware_bot_flow.json)Supports Bangla, English, and Banglish queries.
phi3:Mini)phi3:Mini. If u wish to use any other models, you can just change it in config.py# Clone the repo
# git clone <your-repo-url>
cd directory
# Create and activate environment
conda create -n chatbot-rag python=3.10 -y
conda activate chatbot-rag
# Install dependencies (conda)
conda install --file requirements.txt
# (Optional, to silence deprecation warnings, use pip for these two only if needed)
# pip install -U langchain-chroma langchain-ollama
.txt files in the company_info/ folder.codeware_bot_flow.json is present in the project root.python embed_company_info.py
chromadb_store/).ollama serve &
ollama pull phi3:mini # or another small model
uvicorn app:app --reload
/chatInput:
{
"user_id": "12345",
"question": "I want to know about packages"
}
Logic:
/chatbot and returns trigger info.Response (RAG):
{
"triggered": false,
"answer": "Our packages include Basic, Premium, and Business plans...",
"sources": ["doc1.txt", "doc2.txt"]
}
Response (Rule-based):
{
"triggered": true,
"trigger_id": "...",
"matched_keyword": "Packages",
"answer": "Rule-based flow triggered for keyword 'Packages'. (Simulated external API call.)"
}
/chatbotInput:
{
"user_id": "12345",
"trigger_id": "..."
}
Response:
{
"user_id": "12345",
"trigger_id": "...",
"message": "Simulated external API response for trigger_id ..."
}
Test with curl:
curl -X POST http://127.0.0.1:8000/chat \
-H "Content-Type: application/json" \
-d '{"user_id":"u1","question":"What packages do you offer?"}'
codeware_bot_flow.json or new docs to company_info/ and re-run embedding.Below are some Postman examples for interacting with the chatbot:



English works fine for both trigger-flow-based and LLM based Q&A. To enable bangla Language support I alternate the embedding model from all-MiniLM-L6-v2
to csebuetnlp/banglishbert. But still the accuracy did not increase. I tried to increase chunk size and relevent info grouping for better chunking. Though it seem to have a good effect but not quite.
I have found the problem. The string match for Bangla language not working. I think resolving this will ensure the Bangla Q&A.
9 commits
Python
100.0%