Can you set Citations before querying the Knowledg...
# 🤝help
f
I am getting a value from a Cloud Function and set it as variable (work like a charm). Can I use it as one of the Citations when using Query Knowledge Base. Any tips will be appreciated 🙂
b
Yes, you can add it in the input or the Query Knowledge Base card and then write the question
f
@brainy-summer-1041 by input do you mean the Query field of the card? I have tired it this way, but even though the answer is there (plain text) QKB didn't create an answer.
b
The answer must be displayed
f
I know, for the questions with data in the KB it works fine
b
In the KQ settings, store the answer in a variable. Then just add a text card with @workflow.Variable
Or wite in the text card {{turn.KnowledgeAgent.answer}}
f
I have that implemented already, the standard KB questions work fine. But it doesn't work when I try to ask it questions related to contents of the Query field.
b
Can you tell me more details? It's hard to understand from outside
f
Sure, I have it setup the following way: Knowledge Base Contains some general information about health. Query field of QKB --- Brazil won the world cup in 2022. {{conversation.SummaryAgent.transcript}} --- I am storing and displaying the reply of the QKB card using a variable. Case 1 - works When I ask something like "What is health?" bot answers using the KB. Case 2 - no reply When I ask "Who won the world cup in 2022?" it doesn't answer. Logs show "No helpful answer generated by KB"
b
In the query field, you didn't add the actual question. Try to put in this: Question: {{event.preview}}. This expression will take the last message from the user
f
Still the same thing if I set it up this way: Query field of QKB --- Brazil won the world cup in 2022. Answer this question: {{event.preview}} ---
b
Why do you put the info about brazil into the KQ? It's simpler to just put it into the Knowledge Base and the KQ will work just fine
f
I want to dynamically add to KB informations retrieved using a webhook
12 Views