> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/n4ze3m/page-assist/llms.txt
> Use this file to discover all available pages before exploring further.

# Chat with Webpage

> Analyze and discuss webpage content using AI-powered context understanding

Chat with Webpage allows you to have intelligent conversations about the current page you're viewing. The AI reads and understands the page content, enabling you to ask questions, get summaries, extract information, or analyze the content.

## How It Works

Chat with Webpage extracts text content from the current page and provides it to your AI model as context. You can choose between two processing modes:

<Tabs>
  <Tab title="RAG Mode (Recommended)">
    Uses **Retrieval Augmented Generation** with vector embeddings:

    1. Page content is extracted and split into chunks
    2. Chunks are converted to vector embeddings using your configured embedding model
    3. When you ask a question, relevant chunks are retrieved
    4. Only relevant context is sent to the AI, enabling longer documents

    **Pros**: Handles large pages, more accurate retrieval, better for long documents

    **Cons**: Requires embedding model configuration, slight processing delay
  </Tab>

  <Tab title="Normal Mode">
    Sends page content directly to the AI:

    1. Page content is extracted
    2. Content is sent directly with your message
    3. AI responds with full page context

    **Pros**: Faster, no embedding model needed, simpler setup

    **Cons**: Limited by model context window, may not work with very long pages
  </Tab>
</Tabs>

## Getting Started

<Steps>
  <Step title="Enable Chat with Webpage">
    **In the Sidebar:**

    1. Open the sidebar on any webpage (`Ctrl+Shift+Y`)
    2. Click the webpage icon in the input area to enable
    3. The icon highlights when active

    **In the Web UI:**

    1. Open Web UI (`Ctrl+Shift+L`)
    2. Navigate to the webpage you want to analyze
    3. Enable the webpage chat mode
  </Step>

  <Step title="Configure RAG (Optional)">
    For better performance with long pages:

    1. Go to Settings → RAG Settings
    2. Select an embedding model (recommended: `nomic-embed-text`)
    3. Configure chunk size (default: 1000)
    4. Configure chunk overlap (default: 200)
    5. Save settings

    <Warning>
      Use embedding models designed for text embedding, not chat models.
    </Warning>
  </Step>

  <Step title="Start Chatting">
    With webpage mode enabled, start asking questions:

    * "Summarize this article"
    * "What are the main points?"
    * "Extract all email addresses"
    * "Explain this concept in simple terms"
  </Step>
</Steps>

## Sidebar Configuration

Customize how the sidebar handles webpage content:

### Using RAG Mode

By default, sidebar uses RAG with vector embeddings:

1. Open sidebar and click the settings icon
2. Find "Copilot Chat With Website Settings"
3. Ensure "Chat with website using vector embeddings" is **enabled**
4. Configure your embedding model in Settings → RAG Settings

### Using Normal Mode

For simpler, faster processing without embeddings:

<Steps>
  <Step title="Disable RAG">
    1. Open sidebar settings
    2. Find "Copilot Chat With Website Settings"
    3. **Disable** "Chat with website using vector embeddings"
  </Step>

  <Step title="Adjust Content Size">
    Increase how much content is sent:

    1. Find "Normal mode website content size"
    2. Increase the value (default: 10000 characters)
    3. Higher values include more content but may hit token limits
  </Step>
</Steps>

<Info>
  Normal mode is limited by your model's context window. For GPT-3.5, keep content under 4000 tokens. For GPT-4 or Claude, you can use much larger values.
</Info>

### Enable by Default

Automatically enable chat with webpage when opening sidebar:

1. Open sidebar settings
2. Find "Enable Chat with Website by default (Copilot)"
3. Toggle on
4. The sidebar will now always start in webpage mode

## RAG Configuration

Optimize RAG settings for webpage analysis:

### Embedding Model Selection

Choose the right embedding model:

<Tabs>
  <Tab title="Recommended Models">
    **For Ollama (Local)**:

    * `nomic-embed-text` - Best all-around, fast and accurate
    * `mxbai-embed-large` - High quality embeddings
    * `all-minilm` - Lightweight and fast

    **For OpenAI**:

    * `text-embedding-3-small` - Cost-effective
    * `text-embedding-3-large` - Highest quality
    * `text-embedding-ada-002` - Legacy but reliable
  </Tab>

  <Tab title="Installation (Ollama)">
    If using local Ollama models:

    ```bash theme={null}
    ollama pull nomic-embed-text
    ```

    Then select it in Settings → RAG Settings → Embedding Model
  </Tab>
</Tabs>

### Chunk Settings

Optimize how content is split:

| Setting            | Recommended Value              | Description                      |
| ------------------ | ------------------------------ | -------------------------------- |
| Chunk Size         | 1000                           | Characters per chunk             |
| Chunk Overlap      | 200                            | Overlap between chunks           |
| Retrieved Docs     | 4-6                            | Number of relevant chunks to use |
| Splitting Strategy | RecursiveCharacterTextSplitter | Best for web content             |

<Accordion title="Understanding Chunk Size">
  **Chunk Size** determines how page content is divided:

  * **Smaller chunks (500-800)**: More precise retrieval, better for specific questions
  * **Larger chunks (1000-1500)**: More context per chunk, better for summaries

  **Overlap** ensures important information at chunk boundaries isn't lost.
</Accordion>

### Custom RAG Prompts

Customize the system prompt for webpage analysis:

1. Go to Settings → RAG Settings
2. Scroll to "Configure RAG Prompt"
3. Select the **RAG** tab
4. Edit the system and question prompts
5. Available variables:
   * `{context}` - Retrieved webpage chunks (don't remove)
   * `{question}` - User's question

<Warning>
  Do not remove the `{context}` variable - it's required for RAG to work properly.
</Warning>

## Use Cases

<CardGroup cols={2}>
  <Card title="Research" icon="microscope">
    * Summarize research papers
    * Extract key findings
    * Compare multiple sources
    * Generate citations
  </Card>

  <Card title="Learning" icon="graduation-cap">
    * Understand complex documentation
    * Get explanations in simple terms
    * Generate study notes
    * Create quiz questions
  </Card>

  <Card title="Shopping" icon="cart-shopping">
    * Compare product features
    * Extract specifications
    * Summarize reviews
    * Find best deals
  </Card>

  <Card title="News" icon="newspaper">
    * Summarize articles
    * Extract key points
    * Fact-check claims
    * Get different perspectives
  </Card>
</CardGroup>

## Advanced Techniques

### Combining with Internet Search

Use both webpage chat and internet search together:

1. Enable chat with webpage
2. Enable internet search (globe icon)
3. Ask questions that require both page context and external info
4. Example: "How does this article's claims compare to recent research?"

### Using with Knowledge Base

Combine webpage content with your documents:

1. Enable chat with webpage
2. Select knowledge base (database icon)
3. Ask questions that cross-reference both sources
4. Example: "How does this webpage's approach compare to my notes?"

### Multi-Page Analysis

Analyze multiple pages in one conversation:

1. Enable chat with webpage on first page
2. Ask questions and get responses
3. Navigate to another page (keep sidebar open)
4. New page context automatically replaces old context
5. Continue asking questions about the new page

<Note>
  Each page replaces the previous context. To compare pages, copy relevant information into your messages.
</Note>

## Performance Optimization

<Accordion title="For Large Pages">
  **Use RAG Mode**:

  * Enable vector embeddings
  * Increase chunk size to 1500
  * Increase retrieved docs to 6-8
  * Use a capable embedding model like `nomic-embed-text`
</Accordion>

<Accordion title="For Speed">
  **Use Normal Mode**:

  * Disable RAG
  * Set content size to 8000-10000
  * Use faster models (GPT-3.5, local Ollama models)
  * Limit retrieved docs to 3-4
</Accordion>

<Accordion title="For Accuracy">
  **Optimize RAG**:

  * Use high-quality embedding models
  * Smaller chunk size (800)
  * Higher overlap (300)
  * More retrieved docs (6-8)
  * Use advanced models (GPT-4, Claude)
</Accordion>

## Troubleshooting

<Accordion title="No content extracted">
  **Causes**:

  * Page uses JavaScript rendering
  * Content behind authentication
  * Page blocks content extraction

  **Solutions**:

  * Wait for page to fully load
  * Disable RAG and try normal mode
  * Try refreshing the page
  * Use vision mode instead
</Accordion>

<Accordion title="Responses not relevant">
  **Causes**:

  * Poor chunk retrieval
  * Embedding model not configured
  * Retrieved docs too few

  **Solutions**:

  * Check embedding model is set
  * Increase retrieved docs count
  * Adjust chunk size and overlap
  * Try normal mode instead
</Accordion>

<Accordion title="Processing too slow">
  **Causes**:

  * Large page content
  * Slow embedding generation
  * Network latency

  **Solutions**:

  * Use local Ollama embedding models
  * Reduce chunk size
  * Limit retrieved docs
  * Try normal mode for simpler pages
</Accordion>

<Accordion title="Context window errors">
  **Causes**:

  * Too much content for model's limit
  * Large chunks with long conversation

  **Solutions**:

  * Reduce chunk size
  * Reduce retrieved docs
  * Use a model with larger context (GPT-4, Claude)
  * Start a new chat
</Accordion>

## Privacy and Security

<Info>
  **Data Processing**: All webpage content is processed locally in your browser before being sent to your AI provider.
</Info>

<Warning>
  **Sensitive Information**: Be cautious when analyzing pages with sensitive information. The content will be sent to your configured AI provider.
</Warning>

* Webpage content is extracted client-side
* Embeddings are generated locally or via your provider
* Only relevant chunks are sent to AI (in RAG mode)
* No data is stored on Page Assist servers (we don't have any)

## Next Steps

<CardGroup cols={2}>
  <Card title="Vision" icon="eye" href="/features/vision">
    Analyze webpage screenshots and images
  </Card>

  <Card title="Knowledge Base" icon="database" href="/features/knowledge-base">
    Upload documents for persistent context
  </Card>

  <Card title="Internet Search" icon="magnifying-glass" href="/features/internet-search">
    Combine with real-time web search
  </Card>

  <Card title="Configuration Settings" icon="sliders" href="/configuration/settings">
    Configure embedding and retrieval settings
  </Card>
</CardGroup>
