Document Integration Methods
1. Attached Documents (Context-Based)
- Scope: Thread and workspace specific. Documents uploaded to a thread are not shared with other threads.
- Behavior: Inserts the full text of the document directly into the chat prompt context window.
- Upload Method: Drag and drop files into the chat window, or click the paperclip icon in the input bar.
- Context Management: Hover over the paperclip icon to monitor current context window usage.
- Exceeding Context Limits: If document size exceeds the active modelβs context window, options include:
- Cancel: Remove documents from the queue.
- Continue Anyway: Truncates/prunes context to fit (leads to inaccurate LLM behavior).
- Embed: Triggers chunking and RAG processing (persists document to workspace).
2. Embedded Documents (Retrieval Augmented Generation - RAG)
- Scope: Workspace-wide. Shared across all threads and users with workspace access.
- Behavior: Chunks documents into text snippets, generates vector embeddings, and injects only the most semantically relevant snippets into the LLM context.
Workspace Configuration Settings
Access settings via the Gear icon next to the workspace name.
Vector Database Settings
Search Preference (Reranking)
- Availability: LanceDB (default vector database) only.
- Options:
- Default: Fast vector similarity search.
- Accuracy Optimized: Retrieves a larger set of text chunks and applies a local reranking model (downloads on first use). Adds approximately 100ms - 500ms to response latency.
Max Context Snippets
- Definition: The maximum number of retrieved text chunks sent to the LLM.
- Recommended Value:
4to6for standard models. High-context models (e.g., Claude-3) can support higher values, though excessive noise may degrade output quality.
Document Similarity Threshold
- Definition: Minimum score threshold to filter out low-scoring vector chunks.
- Troubleshooting: Set to No Restriction if encountering hallucinations or missing information.
- Default:
20%(using default embedder modelsentence-transformers/all-MiniLM-L6-v2).
Document Pinning
- Definition: Bypasses RAG search and inserts the complete text of an embedded document directly into the context window.
- Pre-requisite: Document must first be embedded in the workspace.
- Usage: Click the pushpin icon on the embedded document. Pinned documents are excluded from standard RAG retrieval runs to prevent duplication.