Document

Documents enable Retrieval-Augmented Generation (RAG) in PERSO Live, allowing your AI Human to answer questions based on your uploaded data. The system searches through your documents to find relevant information and includes it in the LLM's context.

πŸ’‘ Overview

When you upload a document, Perso Interactive:

  1. Processes the document and splits it into searchable items
  2. Generates vector embeddings for semantic search
  3. Makes the document available for use in prompts with RAG enabled

Documents are particularly useful for:

  • Product catalogs and specifications
  • FAQ databases
  • Company knowledge bases
  • Any structured data you want the AI to reference
Upload Documents here β†’

πŸ—’ Listing Documents

Navigate to the Resources page and select the "Document" tab to view all documents in your organization.

The list displays:

  • Document ID: Unique identifier for the document
  • Title: The name you assigned to the document
  • Search Count: Number of document items to include in searches (default: 3)
  • Processed: Whether the document has been processed and is ready to use
  • Action: Delete button to remove the document

πŸ”Ž Viewing Document Details

Click on a Document ID to view its details. From the detail page, you can:

  • View document information
  • See processing status
  • Delete the document

πŸ“ Creating Documents

To upload a new document:

  1. Click the "Add New Document" button from the Documents list page
  2. Fill in the form:

✍️ Title

Enter a descriptive name for your document. This helps you identify and organize different documents.

✏️ Description (Optional)

Provide a brief description of what this document contains and its purpose.

πŸ“Š File

Upload a file containing your data. The file will be processed to extract information.

File Format Requirements

  • Accepted Formats: CSV, XLS, XLSX
  • Structure: The first row must be used as the header row
  • Encoding: UTF-8 encoding is recommended

Example File Structure

Input File (CSV/XLS/XLSX):

namepricedescription
apple3honey crisp
orange2navel
melon10honeydew

Resulting Document Items:

After processing, the document will be split into searchable items:

  • [name]: apple [price]: 3 [description]: honey crisp
  • [name]: orange [price]: 2 [description]: navel
  • [name]: melon [price]: 10 [description]: honeydew

Each row becomes a searchable document item that can be retrieved when relevant to user queries.

πŸ”’ Search Count

This setting determines how many relevant document items will be included in the LLM's context when a user query matches the document.

  • Default: 3
  • Range: Adjustable based on your needs
  • Recommendation:
    • Use 3-5 for most cases
    • Increase for complex queries that may need more context
    • Decrease if you want more focused responses

πŸ”„ Document Processing

After uploading a document:

  1. Processing begins automatically: The system starts processing your document immediately
  2. Splitting into items: Each row becomes a separate searchable item
  3. Generating embeddings: Vector embeddings are created for semantic search
  4. Status update: The processed field is set to True when complete

Processing time:

  • Small documents (< 100 rows): Usually completes in under a minute
  • Medium documents (100-1000 rows): May take several minutes
  • Large documents (> 1000 rows): Can take 10+ minutes

Note: Documents are not available for use until processing is complete. Check the "Processed" status in the list view.

πŸ“‹ Using Documents with RAG

To use documents in your sessions:

  1. Enable RAG in your Prompt:

    • Create or edit a prompt
    • Check the "Require Document" option
    • Include {context} placeholder in the system prompt
  2. Create a Session:

    • Use a prompt that has RAG enabled
    • The system will automatically search your documents when users ask questions
  3. How it works:

    • User asks a question
    • System searches documents for relevant items
    • Top N items (based on Search Count) are included as {context}
    • LLM generates response using the context

πŸ“Œ Best Practices

Preparing Your Data

  1. Use clear headers: Column names should be descriptive
  2. Keep data structured: Each row should represent a complete item
  3. Include relevant information: Add columns that users might ask about
  4. Avoid empty cells: Fill in all relevant fields for better search results

Organizing Documents

  1. One document per topic: Keep related data together
  2. Descriptive titles: Make it easy to identify document contents
  3. Regular updates: Keep documents current with latest information
  4. Test after upload: Verify document items are searchable

Optimizing Search Count

  1. Start with default (3): Test with the default value first
  2. Adjust based on results:
    • Increase if responses lack context
    • Decrease if responses are too verbose
  3. Consider document size: Larger documents may benefit from higher search counts

Example Use Cases

Product Catalog:

  • Upload product information (name, price, description, features)
  • Enable RAG in your prompt
  • AI can answer questions about products using the catalog

FAQ Database:

  • Upload common questions and answers
  • AI can provide accurate answers from your FAQ

Company Knowledge Base:

  • Upload company policies, procedures, or information
  • AI can reference this information when answering questions

❌ Deleting Documents

To delete a document:

  1. Navigate to the Documents list
  2. Click the delete button (trash icon) in the Action column
  3. Confirm the deletion

Note: Deleting a document will not affect existing sessions, but new queries will no longer be able to search that document's content.


What’s Next

Learn more about Model Resources in the next section.