I would like someone's help to create a simple filter.
Context: I'm trying to develop a filter that I can use in the Playbook parameter to find the file more specifically from the Datastore. My data repository is in the JsonL style, because it seemed to be the best way to use filters, but the documentation didn't explain much how I could declare them in the Dialogflow Playbook.
I followed the JSONL assembly examples, so I could
https://cloud.google.com/dialogflow/cx/docs/concept/data-store?hl=pt-br#structured
An example of how the jsonl looked,
{"id": "1", "structData": {"title": ".", "category": [""], "text": "extra extra", "schema": ["Title", "Category", "Question", "Answer", "Subtitle", "URL"]}, "content": {"mimeType": "application/pdf", "uri": "gs:///pdf/Acompanhamento Registral.pdf"}}
But I can't create a useful example of the input for the tool, I'm using this example in the playbook, I'll just translate it to English to make it easier.
- fallback: "Sorry, I couldn't find any information about [theme]"
- userMetada from Input(requestBody): "userMetada": "<filter_expression>", example: "category:(\"$theme\") OR title:(\"$theme\")"
- filter: "User question".
The Tool provides the information, but I would like there to be a way for me to be sure that it didn't make a mistake, because many times I get an error message because it didn't even do the search.
If anyone can help me with examples of filters for these types of problems, I would appreciate it.
It looks like the Agent Builder in the datastore has a new schema feature, but it is in preview. Has anyone used it?
Hi Kozato,
Welcome to the Google Cloud Community!
It seems like you're exploring how to implement filters in your Dialogflow CX Datastore Playbook with JSONL data, and you're looking for ways to optimize the process. Here are some ways that might help with your use case:
You can find further information on these topics in the Dialogflow CX documentation:
Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.
Thank you for clarifying some doubts I had, even regarding what to search for. However, I might have other questions based on your answers.
For example:
- Where exactly should I apply this filter? Should it be in `GOAL/Instructs` or directly in the summary of the Datastore prompt?
- Could you provide a direct example of how to apply it? I attempted to implement something, but I couldn't fully extract the knowledge you provided.
I would really appreciate your help in overcoming this obstacle.
I even considered passing `structData.title` in `userMetadata`, but that might not have been the best approach.
This part was quite confusing, and the examples in the documentation didn’t really help.
In the Original Response, it even brings the information, the problem here too is that it doesn't present the text or doesn't show it, maybe I'm a bit of an idiot in this part, but I can't achieve the objective.