diff --git a/docs/features/rag/index.md b/docs/features/rag/index.md index 47b53e54..ab43f138 100644 --- a/docs/features/rag/index.md +++ b/docs/features/rag/index.md @@ -168,6 +168,10 @@ The **File Context** capability controls whether Open WebUI performs RAG (Retrie When File Context is disabled, file content is **not automatically extracted or injected**. Open WebUI does not forward files to the model's native API. If you disable this, the only way the model can access file content is through builtin tools (if enabled) that query knowledge bases or retrieve attached files on-demand (agentic file processing). ::: +:::tip Per-File Retrieval Mode +Individual files and knowledge bases can also be set to bypass RAG entirely using the **"Using Entire Document"** toggle. This injects the full file content into every message regardless of native function calling settings. See [Full Context vs Focused Retrieval](/features/workspace/knowledge#full-context-vs-focused-retrieval) for details. +::: + :::info The File Context toggle only appears when **File Upload** is enabled for the model. ::: diff --git a/docs/features/rbac/groups.md b/docs/features/rbac/groups.md index 7b9d70c4..01d4fd9d 100644 --- a/docs/features/rbac/groups.md +++ b/docs/features/rbac/groups.md @@ -69,6 +69,10 @@ You can restrict access to specific objects (like a proprietary Model or sensiti 1. **Tag the Resource**: When creating/editing a Model or Knowledge Base, set its visibility to **Private** or **Restricted**. 2. **Grant Access**: Select the specific **Groups** (or individual users) that should have "Read" or "Write" access. +:::tip Knowledge Scoping for Models +Beyond visibility, knowledge access is also scoped by model configuration. When a model has **attached knowledge bases**, it can only access those specific KBs (not all user-accessible KBs). See [Knowledge Scoping with Native Function Calling](/features/workspace/knowledge#knowledge-scoping-with-native-function-calling) for details. +::: + ### Access Control Object At a deeper level, resources store an access control list (ACL) looking like this: diff --git a/docs/features/workspace/knowledge.md b/docs/features/workspace/knowledge.md index 8b3eac22..8ef16e41 100644 --- a/docs/features/workspace/knowledge.md +++ b/docs/features/workspace/knowledge.md @@ -56,6 +56,43 @@ Autonomous knowledge base exploration works best with frontier models (GPT-5, Cl These tools enable models to autonomously explore and retrieve information from your knowledge bases, making conversations more contextually aware and grounded in your stored documents. +#### Knowledge Scoping with Native Function Calling + +When native function calling is enabled, the model's access to knowledge bases depends on whether you've attached specific knowledge to the model: + +| Model Configuration | Knowledge Access | +|-------------------|------------------| +| **No KB attached** | Model can access **all** knowledge bases the user has access to (public KBs, user's own KBs) | +| **KB attached to model** | Model is **limited** to only the attached knowledge base(s) | + +:::tip Restricting Knowledge Access +If you want a model to focus on specific documents, attach those knowledge bases to the model in **Workspace > Models > Edit**. This prevents the model from searching other available knowledge bases. +::: + +### Full Context vs Focused Retrieval + +When attaching files, notes, or knowledge bases to a model, you can choose between two retrieval modes by clicking on the attached item: + +#### 🔍 Focused Retrieval (Default) + +- Uses **RAG (Retrieval Augmented Generation)** to find relevant chunks +- Only injects the most relevant portions of documents based on the user's query +- Best for large documents or knowledge bases where only specific sections are relevant +- With native function calling enabled, the model decides when to search + +#### 📄 Using Entire Document (Full Context) + +- Injects the **complete content** of the file/note into every message +- Bypasses RAG entirely—no chunking or semantic search +- Best for short reference documents, style guides, or context that's always relevant +- **Always injected** regardless of native function calling settings + +:::info Full Context with Native Function Calling +When "Using Entire Document" is enabled for a file or knowledge base, its content is **always injected** into the conversation, even when native function calling is enabled. The model does not need to call any tools to access this content—it's automatically included in the context. + +Files set to Focused Retrieval (the default) will only be accessed when the model calls the appropriate knowledge tools. +::: + :::note Per-Model Control The Knowledge Base tools require the **Knowledge Base** category to be enabled for the model in **Workspace > Models > Edit > Builtin Tools** (enabled by default). Administrators can disable this category per-model to prevent autonomous knowledge base access. ::: diff --git a/docs/features/workspace/models.md b/docs/features/workspace/models.md index b581a693..7b1c7da6 100644 --- a/docs/features/workspace/models.md +++ b/docs/features/workspace/models.md @@ -72,7 +72,7 @@ Clicking **Show** on **Advanced Params** allows you to fine-tune the inference g You can transform a generic model into a specialized agent by toggling specific capabilities and binding resources. -- **Knowledge**: Instead of manually selecting documents for every chat, you can bind a specific knowledgebase **Collection** or **File** to this model. Whenever this model is selected, RAG (Retrieval Augmented Generation) is automatically active for those specific files. +- **Knowledge**: Instead of manually selecting documents for every chat, you can bind a specific knowledgebase **Collection** or **File** to this model. Whenever this model is selected, RAG (Retrieval Augmented Generation) is automatically active for those specific files. Click on attached items to toggle between **Focused Retrieval** (RAG chunks) and **Using Entire Document** (full content injection). See [Full Context vs Focused Retrieval](/features/workspace/knowledge#full-context-vs-focused-retrieval) for details. - **Tools**: Force specific tools to be enabled by default (e.g., always enable the **Calculator** tool for a "Math Bot"). - **Filters**: Attach specific Pipelines/Filters (e.g., a Profanity Filter or PII Redaction script) to run exclusively on this model. - **Actions**: Attach actionable scripts like `Add to Memories` or `Button` triggers.