diff --git a/docs/features/web-search/agentic-search.mdx b/docs/features/web-search/agentic-search.mdx index 0c04bab97..88e2c36f7 100644 --- a/docs/features/web-search/agentic-search.mdx +++ b/docs/features/web-search/agentic-search.mdx @@ -11,10 +11,11 @@ Open WebUI's web search has evolved from simple result injection to a fully **ag | Feature | Traditional RAG (Default) | Agentic Search (Native Mode) | |---------|---------------------------|------------------------------| -| **Search Decision** | Open WebUI decides based on prompt analysis. | The **Model** decides if it needs data. | -| **Search Queries** | Usually a single query executed once. | Multiple queries can be run sequentially. | -| **Link Following** | Snippets from top results are injected. | The model can use `fetch_url` to read full pages. | -| **Reasoning** | Model process data *after* injection. | Model can search, read, check, and search again. | +| **Search Decision** | Open WebUI decides based on prompt analysis. | The **Model** decides if and when it needs to search. | +| **Data Processing** | Fetches ALL results, chunks them, and performs **RAG**. | Returns **Snippets** directly; no chunking or Vector DB. | +| **Link Following** | Snippets from top results are injected. | Model uses `fetch_url` to read a **Full Page** directly. | +| **Model Context** | Only gets relevant fragments (Top-K chunks). | Gets the **whole text** (up to ~50k chars) via `fetch_url`. | +| **Reasoning** | Model processes data *after* system injection. | Model can search, read, check, and search again. | ## How to Enable Agentic Behavior @@ -27,21 +28,25 @@ To unlock these features, your model must support native tool calling (e.g., GPT * Under **Advanced Parameters**, set **Function Calling** to `Native`. 3. **Chat Features**: Ensure the **Web Search** feature is toggled **ON** for your chat session. -## The `fetch_url` Tool 🔗 +## How Native Tools Handle Data +🔗 It is important to understand that Native Mode works fundamentally differently from the global "Web Search" toggle found in standard models. -One of the most powerful additions is the ability for the model to "visit" specific URLs. +### `web_search` (Snippets only) +When the model invokes `web_search`: +* **Action**: It queries your search engine and receives a list of titles, links, and snippets. +* **No RAG**: Unlike traditional search, **no data is stored in a Vector DB**. No chunking or embedding occurs. +* **Result**: The model sees exactly what a human sees on a search results page. If the snippet contains the answer, the model responds. If not, the model must decide to "deep dive" into a link. -Previously, a model could only see snippets from search results. Now, if it sees a promising link, it can invoke `fetch_url(url="...")` to extract the full text content of that page. +### `fetch_url` (Full Page Context) +If the model determines that a search snippet is insufficient, it will call `fetch_url`: +* **Direct Access**: The tool visits the specific URL and extracts the main text using your configured **Web Loader**. +* **Raw Context**: The extracted text is injected **directly into the model's context window** (hard-coded truncation at exactly 50,000 characters to prevent context overflow). +* **Agentic Advantage**: Because it doesn't use RAG, the model has the "full picture" of the page rather than isolated fragments. This allows it to follow complex instructions on specific pages (e.g., "Summarize the technical specifications table from this documentation link"). -:::info -**How it fetches:** The `fetch_url` tool uses the **Web Loader Engine** (e.g., Safe Web, Playwright, or Firecrawl) configured by the administrator in **Admin Panel > Settings > Web Search**. This ensures the model respects your custom proxy, filtering, and timeout settings. +:::tip +By keeping `web_search` and `fetch_url` separate and RAG-free, the model acts as its own **Information Retrieval** agent, choosing exactly which sources are worth reading in full. ::: -This allows for: -- Summarizing specific news articles. -- Technical documentation research. -- Verifying details that aren't present in search snippets. - ## Deep Research & Interleaved Thinking 🧠 Because the model can call `web_search` multiple times, it can perform "Deep Research" using **Interleaved Thinking**. This is a cycle where the model can: