Kadong
Kadong2mo ago

Need help with my output.

We are building chatbot that helps us to provide what users need by using OpenAI Assistant and MySQL nodes. One thing we noticed is, we are getting random data or answers like the image attached. Is there a fix with this? Looking forward for your answers. Thank you!
No description
Solution:
Hi @Gaurav Chadha , Thank you for your response! I will take a look. I appreciate you!
Jump to solution
6 Replies
AI Support
AI Support2mo ago
AI Support Bot Information
<@700710888499314720> you can react on the relevant answer (message) with a ✅ in this thread when you think it has been solved, by the bot or by a human! Anyone can react on this message with a ❌ if the GPT bot is unhelpful or hallucinating answers. Please note: Team members will review and answer the questions on best efforts basis.
AI Support
AI Support2mo ago
AI Response
To improve the consistency and quality of the data provided by your chatbot using the OpenAI Assistant and MySQL nodes, here are a few recommendations and best practices: 1. Enhanced Prompt Engineering: - Ensure the instructions and user prompts given to the OpenAI Assistant are specific and well-defined. Vague or overly general instructions can lead to inconsistent results. - If possible, provide examples within your prompts to guide the Assistant on the type or format of the response expected. 2. Context Maintenance: - Properly maintain the conversation history with the help of thread IDs. This helps in generating responses that are contextually relevant over multiple interactions . 3. Validation and Filtering Logic: - Implement validation checks on the data retrieved from the MySQL database before it is sent out as a response. This ensures that only relevant and accurate data is used. - Utilize conditional nodes like Branch (If Else) to add logic that can further refine which data gets passed based on certain conditions【4:10†source】【4:14†source】. 4. Error Handling: - Implement error handling within the workflow to catch and manage unexpected outputs from the OpenAI Assistant or database queries. For instance, setting default responses for when no relevant data is found. 5. Testing and Debugging: - Regularly test the workflow and responses with various scenarios to identify and fix issues early. You can use the testing tools provided by BuildShip to simulate different inputs and verify the outputs appropriate to the conditions set【4:16†source】. If you implement these strategies, you should be able to reduce the randomness of the responses and improve the overall reliability of your chatbot. For specific instances where you're encountering issues, examining the exact workflow setup, including the prompts and validation logic used, can provide further insights into making precise adjustments. If the issues persist, detailed troubleshooting with support might provide more targeted solutions【4:4†source】【4:5†source】.
BuildShip AI Support
Kadong
Kadong2mo ago
Here's my OpenAI Instructions. Is there something wrong? You are an expert chatbot at GP. When user inquires about guides, article, or how-to, find the answer from knowledgebase node and provide to user. If column "staff_article" is equal to 1, provide this link and insert slug at the end of the link. Example: https://crm.globalpresence.support/admin/knowledge_base/view/`slug`. Otherwise, return https://crm.globalpresence.support/knowledge_base/view/`slug`. The link should be hyperlinked and also provide the full url in another text. If article is not available or not able to find, proceed giving articles from web. When user inquires about invoices, use 'client' for searching company name and connect to 'invoices' after getting userid and provide the answers to user. If user message is not clear, ask the user for clarification. Always validate response for user.
Gaurav Chadha
Gaurav Chadha2mo ago
Hi @Kadong, you can use file search and upload knowledge files to your assistant, also for better and relevant answers you can use the RAG system to enhance the quality and relevance of generated content. https://docs.buildship.com/tutorials/rag.
Solution
Kadong
Kadong2mo ago
Hi @Gaurav Chadha , Thank you for your response! I will take a look. I appreciate you!
Kadong
Kadong2mo ago
It's very informative and will help me alot for better prompts. Thanks a lot!