Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

understanding Dialogflow Search and Conversation answers

Hello,

I have tried search and conversation chat and am doing it with Dialogflow. I have limited knowledge of Dialogflow and coding.

on the data stores > Agent responses, the default is: $request.knowledge.answers[0]

speralta_0-1699983694432.png

If I am interpreting this correctly, it will return the first answer based on $request.knowledge.answers? If I say put in $request.knowledge.answers[1], it will return the second best answer?

So if I want it to return 3 answers, would I then place something like this $request.knowledge.answers[0-2] ?

Solved Solved
0 3 858
1 ACCEPTED SOLUTION

Abosultely,

summarizing with LLMs is a good practice. For that you will need to create a prompt in the generator like this:

"Please create a bullet point list with $answer1, $answer2 and $answer3 and compare them"
Then as a parameter in the generator in your flow you will need to assign the value to $answer1, $answer2 and $answer3 with $request.knowledge.answers[0] $request.knowledge.answers[1] $request.knowledge.answers[2]

Best,

Xavi

View solution in original post

3 REPLIES 3

you are correct!

BUT, to use the top 3 answers you have to contact them: $request.knowledge.answers[0] $request.knowledge.answers[1] $request.knowledge.answers[2]

My question is the following one: why do you wanna show the top 3 answers to the user? it could lead to some duplications!

Best,

Xavi

I wanted to build a prompt in a generator that would answer with the top 3 answers in bullet form and compare them to each other.  Is this a good practice?

If I want to reference the datastore in the generator, would I then do $request.knowledge.answers[n]?

Abosultely,

summarizing with LLMs is a good practice. For that you will need to create a prompt in the generator like this:

"Please create a bullet point list with $answer1, $answer2 and $answer3 and compare them"
Then as a parameter in the generator in your flow you will need to assign the value to $answer1, $answer2 and $answer3 with $request.knowledge.answers[0] $request.knowledge.answers[1] $request.knowledge.answers[2]

Best,

Xavi