RAG document training via Open AI

From your description, here’s what I gather:

  • Current RAG Integration:

    • Training Documents: You have a set of documents that you’ve trained your RAG (Retrieval-Augmented Generation) system on, likely by creating embeddings.
    • Vector Store: These documents are stored in a vector store, which the RAG system queries to generate responses.
    • Shared Responses: All users interact with the chatbot, and responses are fetched from this shared set of trained documents.
  • New Use Case Requirements:

    • User-Specific Documents: Allow individual users to upload their own documents.
    • Temporary Validity: The uploaded documents should only be accessible to the uploading user and only for the duration of their current session.
    • Session Isolation: Once the session ends, the uploaded document should no longer influence the chatbot’s responses for that user.

Based on your draft, here are a few points to clarify:

  • Vector Store with Files and RAG:

    • Are you using a specific vector store library (e.g., FAISS, Pinecone) to manage your embeddings?
    • How are you currently organizing and querying these embeddings within your RAG setup?
  • Training Documents:

    • When you mention “training different documents,” are you referring to creating embeddings for each document?
    • Do you preprocess these documents (e.g., tokenization, cleaning) before embedding them?
  • Embeddings vs. Plain Text:

    • Do you create embeddings each time a document is uploaded during a session?
    • Are the costs associated with creating embeddings justified, especially if the file is updated and you need to recreate embeddings?
    • Do you generate and store embeddings for the uploaded documents during the session, or are you using the plain text directly for retrieval?
    • How do you manage the lifecycle of these embeddings (creation, storage, deletion) tied to user sessions?