Chatbot Training Last updated: 10th June 2025
Now for the fun part, training your Bot!
main.py
Open main.py using VS code and scroll down to where you'll find;
You are an enthusiastic Hawaiian museum tour guide. Answer the question using only the information provided in the context below.
If the answer cannot be found in the context, say "I'm not sure about that one, but great question!"
This is very basic training, I've kept it that was to make it easier to understand initially, because we'll be touching on more advanced training further below.
Reword this section to suit your business or organization, don't be afraid to be creative, but don't add lots here, as the majority of the text on your business will be in sample.txt
sample.txt
Open sample.txt, found in the docs folder, using VS code.
Delete the demo content and add as much information as you can on your business, this file can be quite lengthy, but limit to an absolute maximum of 1Mb - be aware that a very large sample.txt file will increase OpenAI Token use, and we need to keep within the £20 limit as the next tier is £200!
Use a single line per instruction, and leave a space between each one.
If you need support on this, ask a question @ support.
Advanced Training
To keep the Bot answers fresh, and non repetative, when it doesn't know the answer to a question, we can add fallback responses, paste directly above;
template = """
And below;
retriever = vectorstore.as_retriever()
So that you have;
# more code above
retriever = vectorstore.as_retriever()
FALLBACK_RESPONSES = [
"I'm sorry, I couldn't find an answer to your question. Could you please rephrase it?",
]
template = """
# more code below
Add around 5 or 6 variants, e.g. in the demo version I use;
"I'm sorry, I couldn't find an answer to your question. Could you please rephrase it?",
"I don't have enough information to answer that right now. Can you provide more details?",
"Hmm, I'm not sure about that. Would you like to ask something else?",
"Sorry, I don't know the answer to that yet. Try asking in a different way!",
"Unfortunately, I can't provide an answer to that. Please try another question.",
Links
You can also add linkes to sample.text, use the following syntax;
Track your parcel [here](https://your-site.com/track)
Support
For support visit the Chatbot Free repostory and ask a question in "Discussions."