Building the Ultimate Chatbot Virtual Assistant for my French Website

Hello fellow forum members,

I hope you’re all doing well! I’m reaching out to this wonderful community today to seek your expertise and guidance in building the ultimate chatbot virtual assistant for my French website.

Firstly, I have a vast number of functional rules, exceeding 200, that I want the chatbot to follow. These rules cover various aspects of user interactions, ensuring that the assistant can provide accurate and relevant responses. I’m wondering how I can effectively combine embedding, long context, and techniques like GPT-4 or fine-tuning gpt3 to optimize the chatbot’s ability to deliver the best answers to users.

Furthermore, one of the major concerns I have is preventing the chatbot from generating responses that fall outside the scope of my data or result in hallucinations. I want to ensure that the assistant remains contextually aware and only responds within the boundaries of its training. So, any insights or strategies to achieve this would be greatly appreciated.

Your input will not only assist me in creating an exceptional virtual assistant for my website but also benefit others who may be facing similar challenges in their own projects. I genuinely appreciate your time and assistance in this matter.

Thank you in advance for your support!

Hi and welcome to the developer forum!

This may be possible via prompt engineering, although 200 rules does sound like a lot to keep track of at any one time, you may be interested in reading more about fine-tuning a chat model, this became available yesterday and you can find the blog entry and documentation links here GPT-3.5 Turbo fine-tuning and API updates

1 Like

Yes, I also agree that this sounds like a task well suited to fine tuning. At its simplest, you could create example Q&A’s that illustrate each of your 200 rules in action, and then fine tune a model that is based on your examples. You’d want to create several examples of each of those questions and answers for every rule, then fine tune your model on it. However, if you’re very confident on your rules and want to create a modular system for altering or improving them in future, you might want to break up your fine tuned model into multiple pieces. First, a piece that takes a customer query and explicitly identifies the rules at play and how they’ll influence the response (without knowing your rules it’s hard to advise a structure for that), and second, another fine tuned model that takes the input of the first (along with or original customer query) and generates a response. I recommend this approach, because in general, making a bot expose it’s own logic or thinking about a response leads to higher quality and more stable responses in general. For example, I’ve notice a big quality improvement in prompts where I ask for both a response along with a reasoned explanation of why the response was chosen. (p.s. that works even when you try saving money/tokens that in reality cutoff the “reasoned explanation” part so that you never even see it, simply asking for it is enough).