I am trying to create a hybrid agent in Dialogflow CX using data store handlers. I am getting responses when the data store handler is located on the start page but not getting any responses when the handler is in a different page, even after using proper intents and routes to transition to the specific page.
Hi!
so when you are on a page, you will the user need to say something that triggers the data store. here is the order of evaluation:
You can check the grounding level too:
let me know if that works!
Xavi
hi Xavi!
Your explanation helped me "so when you are on a page, the user will need to say something to trigger the data store". After collecting information from the user I am then transitioning to a Page and I would like the data store and generator to run straight away, as the information it needs is already stored in the session. Is there any way to do this without requiring the user to type something? Or any advice on how I should ask them, what is almost like, "Are you ready?" or "Are you happy for me to proceed?" which seems like a wasted step.
Thanks
Tim
I have a separate page called Google Products which has the data store. The start page has a route that directs user's questions relating to Google products. Now when I reach the Google Products page how do I trigger the data store?
Also, the grounding level by default is the same as you have mentioned
Hi @atanu585 ,
with your design, it is a 2 step process for the user. First, the user need to say something to do the transition to Google products page. Then after transition the user need to say something related to google products to hit the data store. Probably you can remove the transition step and just add the data store handler in the start page!
In this video I did has an example of the google products store: https://youtu.be/w8D-p0rqQKI (there is a demo)
Best,
Xavi
@xavidop Thank you for your reply. I actually referred to the video and took inspiration to make a demo agent. In my final flow design I will have multiple data stores, which is why I wanted to have multiple pages with data stores and redirect from the start page to one of the pages based on user's question. Even with the current design of the flow, the agent does not respond even if I repeat the questions.
Do have any suggestions on how to design the flow so that the agent can provide responses.
can you make sure that the data store is linked to the handler?
Yes it is
okay, is the data store fully indexed? also, does the data store include information about pixel 7? and one last thing, can you check the logs in the simulator that the data store is not being hit. this is the icon
This is the output log.
{
"advancedSettings": {
"loggingSettings": {
"disableLogging": true
}
},
"currentFlow": {
"displayName": "Default Start Flow",
"name": "projects/noww-d5ce2/locations/global/agents/05382bf6-ae5b-4251-a4cb-0e7b58b31503/flows/00000000-0000-0000-0000-000000000000"
},
"currentPage": {
"displayName": "get google products info",
"name": "projects/noww-d5ce2/locations/global/agents/05382bf6-ae5b-4251-a4cb-0e7b58b31503/flows/00000000-0000-0000-0000-000000000000/pages/68e3ca76-b85f-4a7b-8305-8457e7b836f7"
},
"diagnosticInfo": {
"Session Id": "e0d4c0-00b-fbb-b86-6c9ba7885",
"Execution Sequence": [
{
"Step 1": {
"Type": "INITIAL_STATE",
"InitialState": {
"FlowState": {
"PageState": {
"Status": "ENTERING_PAGE",
"Name": "Start Page",
"PageId": "START_PAGE"
},
"Version": 0,
"Name": "Default Start Flow",
"FlowId": "00000000-0000-0000-0000-000000000000"
},
"MatchedIntent": {
"Id": "5aecf724-8a0e-42d0-9e65-d133ae5aac66",
"DisplayName": "Google products",
"Active": true,
"Type": "NLU",
"Score": 1
}
}
}
},
{
"Step 2": {
"StateMachine": {
"FlowState": {
"Name": "Default Start Flow",
"Version": 0,
"FlowId": "00000000-0000-0000-0000-000000000000",
"PageState": {
"Name": "Start Page",
"PageId": "START_PAGE",
"Status": "TRANSITION_ROUTING"
}
},
"TriggeredIntent": "Google products",
"TriggeredTransitionRouteId": "79abe640-29ad-42d8-b1ab-b2dc844ed75a",
"TargetPage": "68e3ca76-b85f-4a7b-8305-8457e7b836f7",
"FlowLevelTransition": true
},
"FunctionExecution": {},
"Type": "STATE_MACHINE"
}
},
{
"Step 3": {
"Type": "STATE_MACHINE",
"StateMachine": {
"FlowState": {
"PageState": {
"Status": "TRANSITION_ROUTING",
"Name": "get google products info",
"PageId": "68e3ca76-b85f-4a7b-8305-8457e7b836f7",
"FormFilled": true
},
"Version": 0,
"Name": "Default Start Flow",
"FlowId": "00000000-0000-0000-0000-000000000000"
}
}
}
}
],
"Alternative Matched Intents": [
{
"Type": "NLU",
"Score": 1,
"Id": "5aecf724-8a0e-42d0-9e65-d133ae5aac66",
"Active": true,
"DisplayName": "Google products"
}
],
"Triggered Transition Names": [
"79abe640-29ad-42d8-b1ab-b2dc844ed75a"
],
"Response Id": "a3cfba78-da3a-41c6-abdd-b0d06bc384e8",
"Transition Targets Chain": [
{
"TargetPage": "68e3ca76-b85f-4a7b-8305-8457e7b836f7"
}
]
},
"generativeInfo": {
"actionTracingInfo": {
"actions": [
{
"userUtterance": {
"text": "How long does the battery in the Pixel 7 Pro last?"
}
}
],
"conversationState": "OUTPUT_STATE_PENDING",
"name": "projects/noww-d5ce2/locations/global/agents/05382bf6-ae5b-4251-a4cb-0e7b58b31503/playbooks/-/examples/-"
}
},
"intent": {
"displayName": "Google products",
"name": "projects/noww-d5ce2/locations/global/agents/05382bf6-ae5b-4251-a4cb-0e7b58b31503/intents/5aecf724-8a0e-42d0-9e65-d133ae5aac66"
},
"intentDetectionConfidence": 1,
"languageCode": "en",
"match": {
"confidence": 1,
"intent": {
"description": "This intent will redirect to the Google Products page",
"displayName": "Google products",
"name": "projects/noww-d5ce2/locations/global/agents/05382bf6-ae5b-4251-a4cb-0e7b58b31503/intents/5aecf724-8a0e-42d0-9e65-d133ae5aac66"
},
"matchType": "INTENT",
"resolvedInput": "How long does the battery in the Pixel 7 Pro last?"
},
"text": "How long does the battery in the Pixel 7 Pro last?"
}
I think the data store is fully indexed
The data store I am using is the same one that you used in the session for the demo and and the codelab. So, it does have information about Pixel Pro 7
I am not sure, it looks good. can you show me your transition route to the second page?
Best,
Xavi
This is the transition route:
These are the training phrases of the intent
that is the issue, the intent phrases are wrong. intent phrases should be something like:
show me information about Google products
you are adding things from the data store in the intent and that is completely wrong.
I will highly recommend to take a look to what an intent is and which utterances you should add there from the conversation design persepctive
Ok thank you for pointing that out. I will definitely change my intent phrases. But even with the intents that I currently have, the intent matching and the transition is still happening. I may be wrong, but shouldn't that be enough to trigger the data store?
Try to put you different datastores on the first page in subflows, it's working for me.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |