RAG document training via Open AI

We have a RAG integration with Open AI - where we train different documents and the responses are fetched via this trained RAG docs .
The RAG is integrated using a library which uses Open AI.
We have a chatbot which makes use of this RAG and responses for any questions asked by different users will be provided from the RAG trained documents. The response for all users will be from this trained documents

We have a new use case, where individual users need to upload documents and need to fetch responses from that uploaded document. The uploaded document should be valid for that user alone and should be applied for the current session for that user also. Means, the same user should not get a response from this document once the conversation session is over. So our question is, is it possible to have a temporary training for an RAG document for a specific user and fetch the document responses only for that user for a defined time?

1 Like

RAG is not training.

RAG is JIT prompt enrichment with context appropriate information with a filtered subset of information from your complete corpus.

If you temporarily add additional data into your corpus you surely just have to modify your RAG process to take account of it?

1 Like

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?