Need Custom URLs and Website Page URLs as Citation...
# 🤝help
s
My KB includes both documents and website sources. The bot will be used on an Intranet behind a login. The Intranet has both pages and documents that I have converted to text files in JSON with a link to the source in the meta description. For these documents I need the citation to include the URL from the meta description so users can click the link to view the source. For public website sources, the bot only returns the root URL of the website in the citation. I need the bot to include the URL of the specific web page where it found the information in the citation. For document sources, the bot only returns the name of the document in the citation. I need the bot to return the URL in the meta description in the citation. Does anyone know how how to do this? I've been searching and searching and can't find anything.
b
when you say "the bot only returns [x]", what do you mean?
for instance - the citations in the knowledge agent should be returning specific URLs
n
s
Thanks for the heads up @nice-salesclerk-98217 and fir the reply @bumpy-butcher-41910 I had not received a notification for this and haven't seen it. I will check on it again and reply with what I find. Somebody else had set up the system and since then I have looked closer at their work, and I saw some potential causes for this
I looked into this. When I look at the JSON or if I directly display {{turn.KnowledgeAgent.citations}} I get text only with no url. I tried following this tutorial (https://discord.botpress.com/t/16752180/add-citations-to-replies) but the result is sources with a Botpress URL (https://studio.botpress.cloud/9e840f74-f7be-4004-897d-f68adb3e6019/flows/web-page).
I just looked into this more closely.
Please ignore my earlier message about the root URL. That was an issue created by the previous dev. However, when I look at the citation JSON payload or add {{turn.KnowledgeAgent.citations}} to a response, I only get plain text as a response. When I follow this tutorial (https://discord.botpress.com/t/16752180/add-citations-to-replies) I receive a link that I believe is hallucinated. It's https://studio.botpress.cloud/9e840f74-f7be-4004-897d-f68adb3e6019/flows/web-page Is there a reliable way to extract the URLs from {{turn.KnowledgeAgent.citations}}? Preferably one that doesn't rely on AI.
Please ignore my earlier comment about returning root URLs. That was something caused by the previous dev. When I look at the {{turn.KnowledgeAgent.citations}} JSON payload or try to add the variable directly to a text card, the output is plain text only with no URL. When I try to follow the Discord Tutorial "Add Citations to replies" by able-rocket-15603 (11/16/2023), the only URLs added to the sources are (presumably) hallucinated Botpress workflow URLs. Is there a reliable way to extract URLs directly from {{turn.KnowledgeAgent.citations}}? Preferably one that doesn't rely on AI?
b
not one that doesn't rely on AI - was the AI failing to extract those for you?
s
Yes, when I try to follow the Discord Tutorial "Add Citations to replies" by able-rocket-15603 (11/16/2023), the only URLs added to the sources are (presumably) hallucinated Botpress workflow URLs. Can you suggest a method that's reliable enough for production (or as close as possible)?
@bumpy-butcher-41910 ?
b
I don't think I have any methods that would suit you - I would recommend using some trial and error and see what you can come up with
s
Is there a method you can recommend as a starting point that will extract any URL at all? My trial and error to this point has not resulted in anything useful.
11 Views