jan icon indicating copy to clipboard operation
jan copied to clipboard

epic: Jan has Conversation-based RAG

Open dan-jan opened this issue 6 months ago • 6 comments

Objectives

  • Allow users to upload text files (PDFs, docs, etc.) within the chat interface.
  • Deliver a user-friendly file upload mechanism, enabling seamless integration into the chat environment.

Leads

  • Product: @imtuyethan
  • Engineering: @hiro-v

User Stories

In Scope

  1. As a User, I want to upload text files to the chat:

    • Scenario: When I have a text-based file (PDF, doc, etc.), I can upload it directly within the chat interface.
    • Acceptance Criteria: I should be able to select a file from my device and upload it to the chat window.
  2. As a User, I want to view the uploaded file's content:

    • Scenario: Upon uploading a text file, I want to view its content displayed within the chat.
    • Acceptance Criteria: The chat interface should visually represent the uploaded file's content, making it accessible alongside the conversation.
  3. As a User, I want to ask questions related to the uploaded file:

    • Scenario: After uploading a file, I want to input prompts or questions about its content within the chat.
    • Acceptance Criteria: The chat interface should allow me to type prompts or questions, linking them contextually to the specific file content for relevant responses.
  4. As a User, I want to receive responses based on file-specific queries:

    • Scenario: When I input queries related to the uploaded file, I expect relevant and contextual responses within the chat.
    • Acceptance Criteria: The system should process my queries about the uploaded file, providing accurate and appropriate responses in the conversation thread.
  5. As a User, I understand the limitation of multiple file uploads:

    • Scenario: When attempting to upload multiple files simultaneously, I should receive information about this limitation.
    • Acceptance Criteria: The system should display notifications or error messages, informing me that only one file can be uploaded at a time.

Out-of-Scope

  • As a user, I want to see prompts suggestions based on the capabilities of the model.
  • As a user, I want to attach many files at the same time.
  • As a user, I want to attach many other file formats like audio,...

Design Wireframes

Figma link: https://www.figma.com/file/ytn1nRZ17FUmJHTlhmZB9f/Jan-App?type=design&node-id=783-43738&mode=design&t=7KYGjHy7F1RvqEip-4

Engineering & Architecture

In Scope

  • List of supported sources: Parsable binary file with extensions: .pdf, .docx

Out-of-Scope

  • List of unsupported files: others

Tasklist

  • [x] #1126
  • [x] #1335 @urmauur
  • [x] Assistant using event base communication (Event.on and Event.emit)
  • [x] Message request refactoring (wrong format, OpenAI does not work with request body) - @louis-jan
  • [x] Fix thread history (could not retrieve messages somehow) - @louis-jan
  • [x] Query ingested documents from inference extensions (currently hard coded the response from assistant, no ingestion) - @louis-jan
  • [ ] Add indices for new documents if the memory folder exists - @hiro-v
  • [x] Add retrieval settings in UI for user to change

Resources

https://www.chatpdf.com/c/vzHhtas3uQVZDK9ZGglaw

Out of scope

dan-jan avatar Dec 19 '23 02:12 dan-jan