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

# Using Page Context

> Attach reference pages for AI content generation

## Overview

Page context allows AI agents to access other pages as reference material when generating content, enabling consistent style, template replication, and intelligent synthesis.

## How It Works

1. Type `/ai` in any page editor
2. Select your agent
3. Click "Attach pages" to select reference pages
4. Write your prompt
5. Generate - AI reads attached pages and creates informed content

Behind the scenes, attached pages become available as tools the AI can read when generating content.

## Selecting Pages

Click "Attach pages" to browse:

**Workspace Pages**: All workspace-level pages
**Dataset Pages**: Pages attached to dataset records

Search by title or browse. Select multiple pages for comprehensive context.

**How many pages?**

* 1-2 pages for templates and style guides
* 3-5 pages for synthesis and analysis
* More pages = more context but slower generation

## Common Use Cases

### Template Replication

```
Attached: "Q3 Product Update Template"
Prompt: "Create Q4 product update following this template with current Q4 data"

Result: New content matching template structure and style
```

### Style Consistency

```
Attached: "Company Writing Style Guide"
Prompt: "Write blog post about new feature launch, following our style guidelines"

Result: On-brand content matching voice and tone
```

### Information Synthesis

```
Attached: "Market Research", "User Interviews", "Competitor Analysis"
Prompt: "Create executive summary synthesizing key insights from these documents"

Result: Cohesive summary drawing from all sources
```

### Format Conversion

```
Attached: "Technical Specification"
Prompt: "Convert this spec into a non-technical executive brief"

Result: Simplified version for different audience
```

## Best Practices

**Optimize pages**: Clear headings, current content, remove outdated information, include examples.

**Be explicit**: "Reference the 'Voice and Tone' section in the style guide to match our conversational-yet-professional style"

**Review output**: Verify context was used correctly, check application, ensure completeness, validate integration.

## Advanced Patterns

### Layered Context

Build context in layers for sophisticated generation:

```
Attached:
  - "Brand Voice Guide" (Foundation)
  - "Product Technical Specs" (Domain)
  - "Q4 Metrics" (Specific)

Prompt: "Write product launch announcement with brand voice, technical accuracy, and Q4 performance data"
```

### Progressive Refinement

Iterate to improve content:

1. Generate with basic context
2. Save result as new page
3. Attach generated page + refinement guides
4. Regenerate with improvements

### Context Specialization

Match context to content type:

**Creative**: Brand stories, successful campaigns, tone examples
**Technical**: Architecture docs, API specs, code patterns
**Business**: Financial reports, market data, analysis frameworks
**Educational**: Learning objectives, lesson plans, curriculum guides

## Common Issues

**AI doesn't use pages**: Explicitly mention pages in prompt ("Based on the attached template...")

**Doesn't match template**: Be specific ("Follow the exact section structure from the template")

**Too much context**: Reduce to essential pages, focus context in prompt

**Lacks originality**: Ask for creative interpretation, provide new information

## Next Steps

<CardGroup cols={2}>
  <Card title="AI Content Generation" icon="sparkles" href="/guides/pages/ai-content-generation">
    Learn AI content techniques
  </Card>

  <Card title="Creating Pages" icon="file-plus" href="/guides/pages/creating-pages">
    Build reference page library
  </Card>

  <Card title="Understanding Pages" icon="book" href="/concepts/pages">
    Pages concepts and capabilities
  </Card>

  <Card title="Creating Agents" icon="robot" href="/guides/agents/creating-agents">
    Configure agents for generation
  </Card>
</CardGroup>
