The goal is to have a customer service chatbot that can answer to the query based on the product data given.
data = source.fit(path="https://www.lacworldwide.com.my/en/protein-and-fitness_whey-protein/optimum-nutrition/gold-standard-100-whey-double-rich-chocolate-06100030.html?catId=protein-and-fitness", dtype="url", chunk_size=512,chunk_overlap=0)
Embedding model
We use OpenAIEmbeddings, an embedding model from OpenAI.
Define the system prompt, that instructs the model to behave as a customer bot
system_prompt = """ You are a Customer support Assistant who answers user query from the given CONTEXT, sound like a customer service\
You are honest, coherent and don't halluicnate \If the user query is not in context, simply tell `We are sorry, we don't have information on this` \"""query = "What is the price of Gold Standard 100 Whey Double Rich Chocolate?"
The price of Gold Standard 100% Whey Double Rich Chocolate is RM295.00 for a 5 lb container. This is the member price, which allows you to save 32%. The usual price is RM436.90. If you're interested, you can add it to your cart by clicking on the "Add to Cart" button. Let me know if you need any further assistance!