Hello, quick question about a RAG system (chatbot + Supabase vector database):
Use case: The chat should display the best service providers based on a given problem and location.
Example: plumbing issue in Paris, the RAG should find plumbers in that city.
Agent choice : Is it better to use the AI AGENT node or the Question and Answer Chain node? In my case, there might be several back-and-forth exchanges for the user to clarify their request. If using AI AGENT, which type of agent would be best: tools, conversational, or OpenAI function (I’m using gpt4-turbo)?
I’m trying to improve the relevance of results and performance (response speed).
Thanks friends.
Information on your n8n setup
- n8n version: 1.81.4
- Database (default: SQLite): PSQL
- n8n EXECUTIONS_PROCESS setting (default: own, main): default
- Running n8n via (Docker, npm, n8n cloud, desktop app): self-hosted docker
- Operating system: win10
I’d use the tools Agent for sure.
Specially because for that case the best solution would be a database containing the service providers, instead of a vector store.
Structured data is more reliable.
Vector Store is more of a “unstructured knowledge” where pieces of information can end up disconnected from each other and only connected by context.
World you be comfortable using a database? Do you know how to proceed?
Thank you for your feedback, Solomon! So you suggest a classic PostgreSQL database on Supabase would indeed be more appropriate than a vector database?
My source data is currently in a Google Sheet, it musbe a way to load in a classic Psql db or I can set the Google sheet as a source/tool?
I guess this approach will allow me to perform precise queries on attributes like location, service type, ratings, etc., without the complexity and uncertainties associated with semantic searches in a vector database.
For the agent, I’ll follow your advice to use the tools agent.
You can use Supabase for both: normal database structure and also vector store.
But to store the information in your example, I’d say it’s better to use a normal database structure.
You can also use Google Sheets for that, by using a Google Sheets tool connected to the Ai Tools agent. But Google Sheets won’t be the same as using a database because it’s harder to run complex requests, with many filters.
But it’s worth the shot. Maybe it solves your problem in a simpler way.
And yes, using a table is better for executing precise queries! That’s why I think the table/database structure is better for this case.
If my reply answers your question, please remember to mark it as a solution.
1 Like
Thanks, Solomon, for taking the time to answer.
1 Like