Hi,
i am relatively new to n8n and have no coding experience.
I try to build an ai sales consultant. The setup is attached.
Goal:
User types in chat message
RAG AI Agent finds the right answer to his questions, reply and asks the user if he likes to get a product recommendation (data is stored in supabase vector store; table documents - vector and 1-n chunks per question) –> Already Working
RAG AI Agent finds the right products for recommendation (data is stored in supabase vector store; table recommendations)
The connection between the two tables is the question_key [frage_key)
So far so good.
How could i solve this? Is my setup maybe not good
Idea would be:
Ask the user if he likes to have a recommendation, then show him the available products.
The thing is how to get the right question_key.
What is the error message (if any)?
The challenge:
The superbase vector store returns the metadata (i need the frage_key, which is the key to find the relevant products (recommendations) in the table recommendations) → the vector store question and answer tool only has the response as an output
For the recommendations tool to work properly i need to have the [frage_key]
Hi @krisn0x ,
thank you very much for your answer, but i tried and it is not working.
The Vector Store Question and Answer Tool only gives the response, no frage_key is sent to the RAG AI Agent.
Ok, so, I can’t really test this for you as the setup is not reproducible without your vector store. What I would do next is this:
Test with extremely basic prompt. Something like
Consult the <vector_tool_name> and query for X. The JSON you will receive from the <vector_tool_name> also contains a key called "frage_key". Output only the "farge_key" value.
Try other models like Gemini and see if they accomplish the task. Your primary goal is to find out if any model can output the farge_key and nothing else matters (excuse the pun) for now.
Once it can output the farge_key (if possible at all), get your prompt and pass it through another AI to refine it. Explain your issues and needs, so it can design it for you. I translated it to check it and see a lack of clarity around certain tools and sentences. Of course, keep the part that successfully printed the farge_key at the top and unchanged.
These are the tips I can think of right now. It’s a bit of a pain to fiddle with prompts on AI nodes, I know. Crossing fingers it takes less time rather than more!