refferences
# 🤝help
f
How to avoid that when searching in the knowledge base at the end of the answer it puts the reference to the documents, I do NOT want the reference to appear.
a
Hey @faint-traffic-426, you can process your answer with regex to split out the references and just leave the answer. For example, if your Knowledge Base answer is stored in
{{turn.KnowledgeAgent.answer}}
, you can try something like this in an execute code card:
Copy code
js
workflow.answerWithoutRefrences = /Refrences:/.text(turn.KnowledgeAgent.answer) ? /Refrences:/.exec(turn.KnowledgeAgent.answer)[0] : turn.KnowledgeAgent.answer
Then you can use a text card and say
{{workflow.answerWithoutRefrences}}
and it should appear without the reference section. Make sure "manual answering" is turned on for your Knowledge agent, too!
c
Hi @User , but may I ask how does it ever make sense to you guys that the chatbot would output the actual names of specific files to the users interacting with it? Considering that the knowledge base could contain sensitive information and that the users do not have access to it? This again sounds like a bug, can you please address this as whatever you do in the AI task or the code execution card, the bots keep on outputting the references to specific files and pointing the users to read them. This is also experienced by many people, and there is no way around this as of now. This seems like a huge liability and bug
Tried to overcome this by saving the output of the knowledge base in a variable and using it as an input of an AI task telling it to remove any references to links, documents or videos. However, whatever instruction is included in the AI task, this does not seem to work as bot keeps on outputting the references to files to the users which don't have access to it. Weirdly this hasn't yet been adressed by you guys
But if the bot uses a slightly different phrasing, this regex wouldn't work. This seems to be a very hacky solution
b
Hi @User , do you have a follow-up here? This is a big problem for me as well, this should really never ever happen that the bot gives out references to specific files in our knowledge base. I am really struggling to understand what is the value of this, this seems like a big liability indeed
Meanwhile, we are really eager to get your input on this to help us solve this huge problem. Could this be overcome by using only small talk and not uploading any files to the knowledge base? As the bot keeps on referring to those files and giving the users answers like: "You can check this specific document to see further steps", or "You can find that information in to see the exact steps". This shouldn't be the case, the bot should output the information as oppose to point users to the documents included in the knowledge base that have this information. Could you please address this bug or at least give us an answer here? We can see many people experiencing this issue, this should be a priority for your guys at this point as it is giving out sensitivie information to the users from our client's knowledge base. Going through discord I can see many people complaining about this, can you please let us know what are you doing about this? You should know that this renders Botpress pretty much useless, and you not replying worries us greatly
Quick update, translating the documents to the plain text makes no difference, as then bot instead of again giving the information contained in the plain text, keeps on referring to the name of the knowledge base. I am really surprised how come this is not addressed yet as this is not an edge case, it keeps on happening half of the time with bot's replies. Does this mean that we have to use custom code to go through the knowledge base? This makes the Botpress pretty much unusable for a lot of people
a
@billowy-sundown-22398 @cool-scooter-96535 Y'all both make good points. Including references is useful for web search knowledge bases, but when the KB is filled with proprietary knowledge it can be an inconvenience at best and security risk at worst. I'm surprised that using an AI task as a filter does not work more consistently- I'll have to do some experimenting on my own. In the mean time, if y'all are using BP Cloud at an enterprise or business level, please bring these concerns to the sales team (especialyl JB). When we get direct, specific feedback from business users it typically gets prioritized in the roadmap.
a
@acceptable-kangaroo-64719 Any update? We have the same problem
a
It's still being worked on
18 Views