how to limit the bot not to answer outside from kb
# 🤝help
s
I had made the bot which uses kb and stack ai api ,but the bot is also giving the answer which is not there in kb ,I only want the answer which is there in kb not outside of that .please help with this
q
I have the same doubd
f
I tried out your bot and it wouldn't answer anything else than what was in your KB. Could you provide me with an example of something that it would answer that isn't in the KB?
You can add a text card after the capture information card with {{turn.KnowledgeAgent.citations}} in it to see where it got the answers from.
s
Like who is the prime minister of x County or similar like question
Basically I had also used stack ai api also
To get the desired output
The bot answer this questions also
The abhove questions are not in kb
f
Does it answer it from StackAI or from the KB from Botpress?
q
My use case is quite different cause I use the platform of OpenAI to create my assitants with retrieaval function, and then I use Botpress as users' interface, where people can ask questions over there without needing to be premium on OpenAI. I don't know if creating the assistant in Botpress could be better for my use case, in that case I would like some help to assemble them
f
Hey You also want to only have the Assistant to respond from the KB and nothing else?
s
I had given the template abhove can you please check
Hi Ruben, May I know how you have have used open ai and ui of botpress
f
It gets the response from StackAI
Not the KB here on Botpress
s
Do you have ant idea on how to stop it to not to ans outside from kb in case of stack ai
f
You would have to do that on Stack AI's side. Why are you using stackAI?
s
Basically I am not getting proper reply from kb of botpress to some questions so I am using stack ai
f
Can you test your KB on stack AI and see if it gives answers that it shouldn't on there?
q
Hi! That would be very nice, but the priority character, for me, is to limit the number of interactions that a user can do. The reason of that is because the retrieval files which it is trained are self-made for a very specific domain. Until assistants are not consolidated, it's a beta, so I 'm working with this thesis, limiting the margin for error
I'm ussing Open AI as "back-end" and Botpress as user interface
At Open AI platform it's located my personal files, so in that environment I'd like to be the only user to have access
f
To me it seems like you could upload those documents to Botpress and only use the Botpress platform. I don't see you doing anything you can't do with just Botpress. Let me know if I'm wrong
q
Do you think that will improve the respose time? My brain say yes, but I don't have much experience by codifing
f
That should improve the response time. The less steps the bot has to go thru before sending a message the faster it will be. There is no need to use the assistants or a GPT to use a KB anymore, because Botpress has integrated GPT -4 for querying the KB.
q
TY dude
s
How to use gpt 4 in botpress
f
You can go to the knowledge agent and select best which will use GPT-4 when searching the KB. You can also use an AI Card and then select GPT-4 Keep in mind that if your are still on a legacy workflow this won't work. To migrate over right now, export your bot and then import it in a new workspace.
s
I had selected gpt 4 from knowledge agent ,but it's response time is slow as compared to hybrid model, what do you think what should I use 3.5 ,hybrid or gpt 4
f
The responses are going to be slower and more expensive when using GPT-4. The Hybrid version is my go to unless it struggles with finding the right information in the KB and I have tried to be more concise and use different KB's. Most of the time GPT-3.5 is good enough, and it's cheaper.
s
Ok thanks 😊
q
@fresh-fireman-491 @shy-zoo-85661 I have a comment to make, my use case, basicly it's made up of a group of assistants (experts in spanish law) who answer questions that users ask them. As you know, many of the question in law, have certain margin of interpretation, and here, GPT-4, besides being more expensive, works much better than GPT 3.5. So, it depends on your use case. If you need to interpret, I personally recommend 4.0
s
👍
q
As example, I've made the same question to both motors, it was "Is it possible to seize a person's glass eye?". Both had exactly the same training data. GPT 3.5 --> It argued that is a valuable object and as such is attachable. GPT 4.0 --> this model, however, was able to interpret that it is an asset necessary for the development and dignity of a person and as such it was not attachable.
d
Is there a way to have the bot access a perscibed answer based on a KB, Such as the user is asked - would you like to see the specs for X, they click yes as the next prompt then the bot only provides contet retrieval on a persribed search e.g provide specs in bullet form for product x only etc,
f
You could do a custom KB query with the Query Knowledge Bases card. Then give it a custom query like Tell me everything about x
This would only get triggered if the users says yes
Created this super duper simple template for you
If you need more help let me know
d
Perfect - thank you that worked - QQ: do you know if it possible to have a video autoplay if I add a node with the video it only shows a click play but would like it to autorun?
99 Views