multiple-amethyst
multiple-amethyst2y ago

Knowledge Base API issues

First I set up an API step that responds to the user based on a very generic prompt from the KB “asking for a response to the user’s query”. It gave a response that was totally random and irrelevant. I tried revising the prompt to be very specific and based on the {last utterance} and {last response} but then it gave a syntax error. I’m assuming that I can’t use {}. 1. How do I make the response based on variables? 2. Any other tips for getting Ana curate KB response?
19 Replies
optimistic-gold
optimistic-gold2y ago
1. You can look at the chunks in your knowledge base and see if they look reasonable. 2. You need to input knowledge in a structured way with bulletpoints, FAQs etc. (I am still learning myself)
multiple-amethyst
multiple-amethystOP2y ago
But it was working last week from the same knowledge base. So it can’t be an issue with my knowledge material.
foreign-sapphire
foreign-sapphire2y ago
If you're trying to use Query API there's a much easier way to do so
foreign-sapphire
foreign-sapphire2y ago
No description
foreign-sapphire
foreign-sapphire2y ago
First stringify the information that was captured
foreign-sapphire
foreign-sapphire2y ago
No description
foreign-sapphire
foreign-sapphire2y ago
Next, stringify chunk score
foreign-sapphire
foreign-sapphire2y ago
No description
foreign-sapphire
foreign-sapphire2y ago
and if what the use wants is not in there then it'll output nocontext that's what the nocontext field on the JavaScript is for
foreign-sapphire
foreign-sapphire2y ago
No description
foreign-sapphire
foreign-sapphire2y ago
Use a clarifying question counter so it doesn't loop You don't have to do this but I recommend using set ai to make sure you're not always using the query api unless it's needed
foreign-sapphire
foreign-sapphire2y ago
No description
foreign-sapphire
foreign-sapphire2y ago
This prompt is pretty old so you can modify it but that's what I use to check if a clarifying question is needed
foreign-sapphire
foreign-sapphire2y ago
No description
foreign-sapphire
foreign-sapphire2y ago
Then last step for the clarifying question IF there is a clarifying question then add 1 to the counter then output the response with whatever output instructions you want And if there's no clarifying question you can just use a node to answer the question without the query API and then start from the first node again
multiple-amethyst
multiple-amethystOP2y ago
@whipabenz thanks so much!!
foreign-sapphire
foreign-sapphire2y ago
no problem man Let me know if it works @meaningfulstrategy I can hop on a call with you and walk you through it if it doesn't
multiple-amethyst
multiple-amethystOP2y ago
I’d actually really appreciate a video call!
foreign-sapphire
foreign-sapphire2y ago
alright man you available now? I'm available around this time if you need any assistance

Did you find this page helpful?