Vector Database updates for user specefic information

I am building a chatbot that will access user-specific information and preferences stored in a simple table in Supabase. Each user has a unique user ID, and I want the chatbot to consider user preferences when taking actions on their behalf. Initially, I thought retrieving data directly from the user preferences table would suffice, but now I believe a vector database might be a better long-term solution.

If I decide to feed the vector database using data from the preferences table, how should I handle this? Should I create an AI summarizer to process the preferences into text, feed it to the embedding AI, and set up triggers to update summaries and embeddings whenever users change their preferences? Or would it be better to connect the vector database directly to the table? What would be the best way to ensure the AI always has up-to-date user information?

Additionally, how can I make this approach scalable for a large number of users? For example, is there a way to implement batch processing in this context using n8n or a similar tool?

Lastly, I have another related question. If I want to provide the AI with topic-specific knowledge (not user-specific) to improve its accuracy on certain topics, how should I approach this? Would you recommend using a separate vector database with Retrieval-Augmented Generation (RAG) for general knowledge, alongside the user-specific embeddings? Could combining both lead to confusion or conflicts? Alternatively, would it be better to fine-tune the AI model and create a fine-tuned API instead?

To summarize:

  1. Is it necessary to use a vector database for this use case, or would a simple user-specific retrieval from the table suffice?
  2. What would be the best approach to ensure scalability and up-to-date information for a large number of users?
  3. How should I handle topic-specific knowledge—through a separate vector database with RAG or by fine-tuning the model?

I’d love to hear your thoughts and recommendations. Thanks in advance!

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.