This is a Q&A-based chatbot, not a Large Language Model (LLM).
Run the chatbot using Streamlit:
# example
streamlit run ChatBot.py

When you ask a question, the sentence is embedded first.
The answer() function compares your question with all embedded questions in the question bank and finds the most similar one.
The similarity score ranges from 0 (least similar) to 1 (most similar).
If the highest similarity score is below 0.3, the function returns "I don't know"
This project includes two test files:
EmbeddingTesting.py
0 to 1).AnsweringTesting.py
ChatBot.py, but without the Streamlit GUI.No! you can customize your own question bank.
just use this pattern for questionBank.json :
{
"questions": [
{
"id": "optional",
"question": "your question",
"answer": "the answer returned by the chatbot",
"embedding": []
}
]
}
Sadra Mir Mohammad Rezaei Email: sadrarezaei4@gmail.com
9 commits
Python
100.0%
This is a Q&A-based chatbot, not a Large Language Model (LLM).
Run the chatbot using Streamlit:
# example
streamlit run ChatBot.py

When you ask a question, the sentence is embedded first.
The answer() function compares your question with all embedded questions in the question bank and finds the most similar one.
The similarity score ranges from 0 (least similar) to 1 (most similar).
If the highest similarity score is below 0.3, the function returns "I don't know"
This project includes two test files:
EmbeddingTesting.py
0 to 1).AnsweringTesting.py
ChatBot.py, but without the Streamlit GUI.No! you can customize your own question bank.
just use this pattern for questionBank.json :
{
"questions": [
{
"id": "optional",
"question": "your question",
"answer": "the answer returned by the chatbot",
"embedding": []
}
]
}
Sadra Mir Mohammad Rezaei Email: sadrarezaei4@gmail.com
9 commits
Python
100.0%