Does your AI Agent provide incorrect or made-up URLs? This can be confusing for users and negatively impact their experience with your AI Agent. The issue may have various causes, such as outdated information in the knowledge base or the AI Agent being overly creative. In this article, we discuss potential causes and solutions to ensure that your AI Agent always provides the correct URLs.
How can you test if the AI Agent provides the correct URLs?
You can conduct test conversations in the Interactive Tester and ask different variations of questions to check if the URLs remain correct. In the Interactive Tester, you can also see the source of the information provided by the AI Agent.
Situation 1: The AI Agent provides old/inactive URLs
The AI Agent generates responses based on Domain Knowledge, Sources, and Instructions. If outdated or inactive URLs are present in any of these areas, the AI Agent may use them.
Solution:
- Re-crawl the URLs using the Web Crawler. If you’ve made many changes to your website, it may help to remove all URLs from the Web Crawler and then re-add the sitemap. This ensures that no old/inactive URLs remain in the Crawler.
- Make sure you upload the most recent version of your sitemap.
- Important: If you have excluded certain links or URLs, you will need to re-add these exclusions after uploading the sitemap.
- Check Domain Knowledge, Document Scraper, and Instructions for old/inactive URLs and update or remove them.
Situation 2: The AI Agent always sends the wrong link in a specific scenario
Sometimes, the AI Agent may always generate an incorrect URL in a particular situation, even if the correct URL is available in the Web Crawler. In such cases, the AI Agent does not clearly understand when to provide the correct link.
Solution:
- Help the AI Agent by writing a clear instruction specifying the exact URL.
Example instruction:
"If someone wants to return a package, inform them that it must be registered online. Always provide the following URL: www.examplewebshop.com/returns"
- Avoid generic instructions like "Check our website for more information" without specifying a URL.
Situation 3: The AI Agent generates non-existent URLs
In some cases, the AI Agent creates URLs because it tries to generate logical links when it does not have a specific URL in its database. This is a common challenge in AI software, but there are ways to minimize the risk of incorrect URLs.
Since website structures vary, you may need to test and combine different solutions to get the desired results.
Solutions:
-
Limit the AI Agent’s knowledge by adding extra instructions in Domain Knowledge. You can also include examples to prevent the AI Agent from inventing URLs.
Example instruction:
"For all questions, only use knowledge from source: https://www.examplewebshop.com. If the information is not available there, say: ‘Unfortunately, I cannot provide an answer.’"Example questions:
- How does the return process work?
- When will I receive a refund?
-
Use filter questions to help the AI Agent find the correct URL. If products are similar, it might struggle to pick the right link. Adding filter questions makes it easier to provide the correct URL.
Example instruction:
"When someone asks about pans, first ask which type of stove they use. Then, only provide URLs relevant to that category." -
Utilize Deep Links to guide the AI Agent in constructing URLs. This helps direct users to specific pages, such as category overviews or pre-filtered search pages.
-
Add an extra document in the Document Scraper that explains which categories can be appended to a URL. This is useful for databases, encyclopedias, or help centers. The document should list all category extensions (everything after "/") that the AI Agent is allowed to use.
Then, add an instruction in Domain Knowledge to ensure the AI Agent only uses the categories from this document.
Example instruction:
"When sharing a link with https://www.examplewebshop.com/helpcenter, only use categories from this source: SOURCEURL."You can find the sourceURL of a document by uploading it to the Document Scraper, then downloading and opening it in a browser. The URL in the address bar is the sourceURL.
Still getting incorrect URLs after these adjustments?
If the AI Agent continues to provide incorrect URLs, contact our support team at support@watermelon.ai. We’re happy to help!