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

# External context for AI analysis

> Link Google Docs and Google Sheets to your sources or source groups so Chartcastr AI delivers more relevant, context-aware pulse summaries.

<Note>
  External Context is available on all plans. Contact us for higher document limits.
</Note>

## Overview

External Context allows you to link Google Docs and Google Sheets to your Sources or Source Groups. When AI generates pulse summaries, it uses this additional context to provide more relevant and informed analysis.

For example, if you have a marketing strategy document or a definitions spreadsheet, linking it as external context helps the AI understand your data better and generate more actionable insights.

## How it Works

1. **Link Documents**: Connect Google Docs or specific Google Sheets tabs to a Source or Source Group
2. **AI Reads Context**: When generating pulse summaries, the AI incorporates this external context
3. **Better Insights**: Summaries are more relevant because the AI understands your business context

## Document Limits

Each Source or Source Group can have up to **3 external context documents** linked.

| Plan           | Documents per Source/Group                                                                |
| :------------- | :---------------------------------------------------------------------------------------- |
| **All Plans**  | 3                                                                                         |
| **Need More?** | [Contact Us](mailto:support@chartcastr.com?subject=External%20Context%20Limit%20Increase) |

<Tip>
  Need more than 3 documents per source? Contact us at [support@chartcastr.com](mailto:support@chartcastr.com) to discuss your requirements.
</Tip>

## Supported Document Types

| Provider          | Document Types                             |
| :---------------- | :----------------------------------------- |
| **Google Sheets** | Individual sheet tabs within a spreadsheet |
| **Google Docs**   | Full documents                             |
| **Notion**        | Coming soon                                |
| **Confluence**    | Coming soon                                |

<Note>
  When linking a Google Sheets file, you select a specific sheet tab rather than the entire spreadsheet. This ensures the AI receives focused, relevant context.
</Note>

## Linking External Context

### From Settings

1. Go to [Settings](https://chartcastr.com/admin/settings) → **Sources** section
2. Click the **External Context** card
3. Click **Manage** next to Google Drive
4. Click **Link Context File**
5. Select **Single Source** or **Source Group** as your target
6. Search and select a file from Google Drive
7. For spreadsheets, select the specific sheet tab
8. Click **Link Context File** to save

### From a Source Page

1. Navigate to a Source's detail page
2. Find the **External Context Documents** section
3. Click **+ Add**
4. Follow the same process as above (Source will be pre-selected)

## Assignment Options

Documents can be assigned to:

* **Single Source**: The context applies only to pulses from that specific source
* **Source Group**: The context applies to all sources within the group

When viewing a Source's external context, you'll see both:

* Documents attached directly to that source ("Direct" badge)
* Documents inherited from any groups the source belongs to ("via Group Name" badge)

## Best Practices

<AccordionGroup>
  <Accordion title="Keep context focused">
    Link documents that directly relate to the data being analyzed. A glossary of metric definitions or a strategy document works better than a general company overview.
  </Accordion>

  <Accordion title="Use Source Groups for shared context">
    If multiple sources share the same business context (e.g., all marketing metrics), link the context document to a Source Group rather than each individual source.
  </Accordion>

  <Accordion title="Select specific sheet tabs">
    When linking spreadsheets, choose the specific tab that contains relevant definitions or context. This keeps the AI focused on pertinent information.
  </Accordion>
</AccordionGroup>

## Managing External Context

### Viewing Documents

All linked documents are visible in:

* The External Context card in Settings
* The Source detail page (showing both direct and inherited documents)

### Removing Documents

Click the trash icon next to any document to remove it. Documents inherited from Source Groups must be managed at the group level.

### Reassigning Documents

To move a document from one Source to another, remove it and re-add it to the new target.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Document limit reached">
    Each target (Source or Source Group) can have up to 3 documents. Remove existing documents or contact us for increased limits.
  </Accordion>

  <Accordion title="Can't find my file">
    Ensure you've connected your Google account and the file is accessible. Try searching by name or scroll through recent files.
  </Accordion>

  <Accordion title="Changes not reflected in AI summaries">
    External context is read at the time of pulse generation. Changes to linked documents will be reflected in the next pulse.
  </Accordion>
</AccordionGroup>

<Card title="Request Higher Limits" icon="envelope" href="mailto:support@chartcastr.com?subject=External%20Context%20Limit%20Increase">
  Need more than 3 documents per source? Let us know your requirements.
</Card>
