I am working in AI Agent connected with Qdrant vector DB
I tried to use $fromAI in the Qdrant vector store, but no data was retrieved.
this is the code used
{
"should": [
{
"key": "metadata.bookname",
"match": {
"value": "{{ $fromAI('religion','','string','Quran') }}"
}
}
]
}
Thanks
Using:
N8N: 1.80.5
Docker compase
You don’t need to use $fromAI to retrieve data from the vector store.
Try with some of the default options and see how it goes.
Also, check some template examples:
If my reply helps to solve your issue, please consider marking it as the solution.
I want to get data from the AI Agent to use in the Vector Store to retrieve special criteria from the vector DB.
Are you getting “Quran” as the result of your function of not even that?
Because you’ve set it as the default. So at least that value should be used
yes, but the problem I get an error and the workflow not stating at all.
Have you tried using raw values in that filter?
See if you can get data when you build the search filter manually, without functions, please.
Once you can make it work, then change the raw values for functions.
Yes, I did it and added the filter as a fixed value In this case, its works well, but to follow these fixed values I have to redesign the flow again to handle all the fixed criteria
If you wrote “Quran” directly and it worked, then I think the problem could be the $fromAI function.
In the documentation they say it’s for tools. But maybe it works only with the tools directly connected to the AI agent.
What is weird is that even using a default value for the function, you said it didn’t behave the same way as writing the raw value. That’s unexpected…
1 Like
yes, right this my expectations and therefore I raise it here to get a feedback from the N8N developers regarding this case.
I’m running into this exact issue with no solution other than expanding the flow significantly.