sunny-green•15mo 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
passive-yellow•15mo 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)
sunny-greenOP•15mo ago
But it was working last week from the same knowledge base. So it can’t be an issue with my knowledge material.
vicious-gold•15mo ago
If you're trying to use Query API there's a much easier way to do so
vicious-gold•15mo ago

vicious-gold•15mo ago
First stringify the information that was captured
vicious-gold•15mo ago

vicious-gold•15mo ago
Next, stringify chunk score
vicious-gold•15mo ago

vicious-gold•15mo 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
vicious-gold•15mo ago

vicious-gold•15mo 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
vicious-gold•15mo ago

vicious-gold•15mo 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
vicious-gold•15mo ago

vicious-gold•15mo 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
sunny-greenOP•15mo ago
@whipabenz thanks so much!!
vicious-gold•15mo 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
sunny-greenOP•15mo ago
I’d actually really appreciate a video call!
vicious-gold•15mo ago
alright man you available now?
I'm available around this time if you need any assistance