Debug mode
Last updated
Was this helpful?
Last updated
Was this helpful?
Enable this feature to learn more about what information is being pulled from the knowledge base and what information is being sent to OpenAI.
Objective: This guide explains how to use the Debug Mode feature in GPT4Business to troubleshoot chatbot responses when they donโt behave as expected. Debug Mode helps identify how the chatbot is using knowledge base information and where issues might arise.
Enabling Debug Mode
Access Advanced Settings:
Navigate to the update area in your GPT-4 Business settings.
Scroll down and click on Advanced Settings.
At the bottom of the page, enable Debug Mode.
Ask a Test Question from the AI Agent:
After enabling debug mode, ask the chatbot a relevant question (e.g., โWhere is the headquarter?โ).
Observe the response and analyze whether it aligns with your expectations.
Using Debug Mode to Analyze Responses
Inspect Data Sent to ChatGPT:
Debug Mode provides a detailed log of what the chatbot sends to ChatGPT during a query.
This log includes:
The exact query used for semantic search.
The knowledge base results retrieved and sent to ChatGPT.
Review Knowledge Base Search Results:
Scroll to the Knowledge-Based Search Results section in Debug Mode.
Here youโll find:
The query used for semantic search.
A list of retrieved results, usually limited to three.
Details about each result, such as its type (e.g., question and answer pairs) and content.
Example Debugging Scenario:
Suppose the chatbotโs response is incorrect or incomplete.
In Debug Mode, you might discover:
Relevant information is missing from the retrieved knowledge base results.
Conflicting data is present (e.g., outdated or incorrect entries).
The semantic search query isnโt targeting the correct data.
Resolving Issues:
If the retrieved results are insufficient or irrelevant:
Update your knowledge base to ensure accurate and comprehensive information.
Remove outdated or conflicting entries.
Adjust the formatting of knowledge base entries if needed to improve semantic search effectiveness.
How Knowledge Base Data is Used
Semantic Search Query:
The chatbot uses the userโs query to perform a semantic search in the knowledge base.
The search retrieves the most relevant entries based on the query.
Result Format:
Results are typically structured as question-and-answer pairs.
Debug Mode allows you to see how these pairs are formatted and whether theyโre effectively processed by ChatGPT.
Troubleshooting Formatting Issues:
If a response is not as expected, check whether the format aligns with the chatbotโs expected input.
Adjust formatting (e.g., using clear labels like "Question = Answer") to ensure better understanding by the model.
Missing Information:
Relevant data isnโt included in the retrieved results.
Solution: Add missing entries to the knowledge base.
Conflicting Data:
The chatbot pulls conflicting information (e.g., outdated hours of operation).
Solution: Remove or update incorrect entries.
Hidden Data in Website Scrapes:
Scraped data from websites may include hidden or irrelevant fields.
Example: Debug Mode revealed that a hidden JavaScript field caused incorrect office hours to appear.
Solution: Adjust the scraping process to exclude unnecessary or misleading data.
Best Practices for Debugging
Regularly Update the Knowledge Base:
Ensure all entries are accurate and relevant.
Periodically review and remove outdated or conflicting information.
Use Debug Mode to Verify Changes:
After making updates, test the chatbotโs responses with Debug Mode enabled to confirm improvements.
Iterate and Refine:
If responses are still unsatisfactory, use Debug Mode to identify gaps or inconsistencies.
Modify queries and knowledge base entries accordingly.