> ## 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.

# Custom Prompts

> Create reusable system prompts, quick prompts, and copilot actions

Page Assist offers a powerful prompt system that allows you to create reusable prompts for various use cases. Whether you need consistent AI behavior, quick templates, or context menu actions, the prompt system has you covered.

## Types of Prompts

Page Assist supports three distinct types of prompts:

<CardGroup cols={3}>
  <Card title="Custom Prompts" icon="message">
    System and quick prompts for use within the chat interface
  </Card>

  <Card title="Copilot Prompts" icon="robot">
    Built-in context menu actions for common tasks
  </Card>

  <Card title="Custom Copilot" icon="wand-magic-sparkles">
    Create your own context menu actions
  </Card>
</CardGroup>

<Info>
  This page focuses on **Custom Prompts** and **Copilot Prompts** that you can use within Page Assist's chat interface and context menu.
</Info>

## Custom Prompts Overview

Custom prompts are templates you create and use within Page Assist's chat interface. They come in two varieties:

<Tabs>
  <Tab title="System Prompts">
    **Purpose**: Define AI behavior and context for conversations

    **How they work**:

    * Sent as `system` role messages to the AI
    * Set the personality, expertise, and constraints
    * Applied at the start of conversations
    * Persist throughout the chat session

    **Use cases**:

    * "You are a Python expert specializing in data science"
    * "You are a creative writing assistant focused on sci-fi"
    * "You are a technical documentation reviewer"
  </Tab>

  <Tab title="Quick Prompts">
    **Purpose**: Reusable message templates with variables

    **How they work**:

    * Inserted into your message input
    * Support variables in `{curly braces}`
    * Variables are highlighted for easy replacement
    * Can be sent directly or edited before sending

    **Use cases**:

    * "Explain {concept} in simple terms"
    * "Review this {code_type} code for bugs"
    * "Translate the following to {language}"
  </Tab>
</Tabs>

## Creating Custom Prompts

<Steps>
  <Step title="Access Prompt Management">
    1. Open Page Assist Web UI
    2. Go to Settings
    3. Navigate to "Manage Prompts"
    4. Click the "Custom" tab
  </Step>

  <Step title="Choose Prompt Type">
    Select either:

    * **System Prompts** - For AI behavior configuration
    * **Quick Prompts** - For message templates
  </Step>

  <Step title="Create Your Prompt">
    Click "Add New Prompt" and fill in:

    * **Title**: Descriptive name for your prompt
    * **Content**: The actual prompt text
    * **Variables**: Use `{variable_name}` for placeholders (Quick Prompts only)
  </Step>

  <Step title="Save and Use">
    * Click "Save"
    * Your prompt appears in the prompt selector
    * Select it when starting a chat or composing a message
  </Step>
</Steps>

## System Prompts

System prompts define how the AI behaves throughout a conversation.

### Creating System Prompts

**Example 1: Code Review Assistant**

```text theme={null}
You are an expert code reviewer with 15 years of experience.
Focus on:
- Security vulnerabilities
- Performance optimizations  
- Code maintainability
- Best practices

Provide specific, actionable feedback with examples.
Current date: {current_date_time}
```

**Example 2: Academic Writing Helper**

```text theme={null}
You are an academic writing assistant specializing in research papers.
Help with:
- Thesis development
- Argument structure
- Citation formatting
- Clear, formal language

Always cite sources and maintain academic tone.
```

**Example 3: Customer Support Bot**

```text theme={null}
You are a friendly customer support representative.
Guidelines:
- Be empathetic and patient
- Provide clear, step-by-step solutions
- Escalate complex issues appropriately
- End responses with "Is there anything else I can help with?"

Current time: {current_date_time}
```

### System Prompt Variables

System prompts support time-based variables that auto-populate:

| Variable              | Description         | Example                   |
| --------------------- | ------------------- | ------------------------- |
| `{current_date_time}` | Full date and time  | "March 3, 2026, 10:30 AM" |
| `{current_year}`      | Current year        | "2026"                    |
| `{current_month}`     | Month number (0-11) | "2" (March)               |
| `{current_day}`       | Day of month        | "3"                       |
| `{current_hour}`      | Hour (0-23)         | "10"                      |
| `{current_minute}`    | Minute (0-59)       | "30"                      |

<Info>
  These variables are automatically replaced with current values when the conversation starts.
</Info>

### Using System Prompts

<Tabs>
  <Tab title="Web UI">
    1. Start a new chat
    2. Click the system prompt selector dropdown
    3. Choose your custom system prompt
    4. Begin conversation with that context
  </Tab>

  <Tab title="Sidebar">
    1. Open sidebar
    2. Click settings icon
    3. Set default system prompt for copilot
    4. Or select per-conversation in prompt dropdown
  </Tab>
</Tabs>

## Quick Prompts

Quick prompts are reusable message templates with variable placeholders.

### Creating Quick Prompts

**Example 1: Code Explanation**

```
Explain the following {programming_language} code in detail:

{code}

Include:
- What it does
- How it works
- Potential improvements
```

**Example 2: Translation Request**

```
Translate the following text to {target_language}:

{text}

Maintain the original tone and style.
```

**Example 3: Content Summarization**

```
Summarize the following {content_type} in {length} words:

{content}

Focus on the key points and main takeaways.
```

**Example 4: Bug Report Analysis**

```
Analyze this bug report for {project_name}:

Issue: {issue_description}
Steps to reproduce: {steps}
Expected: {expected_behavior}
Actual: {actual_behavior}

Provide:
- Root cause analysis
- Suggested fix
- Prevention strategies
```

### Variable Syntax

Variables in quick prompts:

* Enclosed in `{curly braces}`
* Automatically highlighted in the UI
* Clicking highlights them for easy editing
* Use descriptive names: `{user_input}`, `{target_language}`, `{code_snippet}`

<Tip>
  Use descriptive variable names to make templates self-documenting: `{target_language}` is better than `{lang}`.
</Tip>

### Using Quick Prompts

<Steps>
  <Step title="Access Quick Prompts">
    Click the "Quick Prompts" button in the input area (lightning bolt icon)
  </Step>

  <Step title="Select Template">
    Choose your quick prompt from the dropdown list
  </Step>

  <Step title="Fill Variables">
    * Variables are automatically highlighted
    * Click each variable and replace with actual content
    * Or edit the entire message as needed
  </Step>

  <Step title="Send Message">
    Submit when ready - variables don't need to be replaced if you prefer to keep them
  </Step>
</Steps>

## Advanced Prompt Techniques

### Chaining Prompts

Combine system and quick prompts for powerful workflows:

**System Prompt**: "You are a technical writer specializing in API documentation"

**Quick Prompt**: "Document this API endpoint: {endpoint_details}"

**Result**: Technical documentation in consistent style

### Contextual Prompts

Create prompts that work with Page Assist features:

**With Knowledge Base**:

```
Using my uploaded documentation about {topic}, answer:
{question}

Provide specific page references.
```

**With Internet Search**:

```
Search for recent developments in {field} and compare with {my_understanding}
```

**With Vision**:

```
Analyze this {image_type} image and identify:
- {aspect_1}
- {aspect_2}
- {aspect_3}
```

### Role-Based Prompts

Create prompts for different personas:

<Accordion title="Developer Persona">
  ```
  You are a senior {language} developer at a {company_type}.

  Expertise:
  - {framework_1}
  - {framework_2}
  - Best practices and design patterns

  Provide production-ready code with explanations.
  ```
</Accordion>

<Accordion title="Teacher Persona">
  ```
  You are a patient teacher explaining {subject} to {audience_level} students.

  Approach:
  - Use simple language and analogies
  - Provide examples
  - Check for understanding
  - Build on fundamentals

  Current lesson: {topic}
  ```
</Accordion>

<Accordion title="Analyst Persona">
  ```
  You are a {industry} analyst with expertise in {specialization}.

  Focus on:
  - Data-driven insights
  - Market trends
  - Risk assessment
  - Strategic recommendations

  Analyze: {subject}
  ```
</Accordion>

## Prompt Library Examples

### Programming & Development

<AccordionGroup>
  <Accordion title="Code Review">
    **Type**: System Prompt

    ```
    You are a meticulous code reviewer focusing on:
    - Security best practices
    - Performance optimization
    - Code readability
    - Test coverage

    Provide constructive feedback with specific examples.
    ```
  </Accordion>

  <Accordion title="Debug Helper">
    **Type**: Quick Prompt

    ```
    Help me debug this {language} error:

    Error: {error_message}

    Code context:
    {code}

    Explain the cause and provide a fix.
    ```
  </Accordion>

  <Accordion title="Documentation Generator">
    **Type**: Quick Prompt

    ```
    Generate {doc_type} documentation for:

    {code_or_api}

    Include:
    - Description
    - Parameters/Arguments
    - Return values
    - Examples
    - Edge cases
    ```
  </Accordion>
</AccordionGroup>

### Writing & Content

<AccordionGroup>
  <Accordion title="Content Editor">
    **Type**: System Prompt

    ```
    You are a professional editor specializing in {content_type}.

    Improve:
    - Clarity and flow
    - Grammar and style
    - Engagement and impact
    - SEO when relevant

    Maintain the author's voice.
    ```
  </Accordion>

  <Accordion title="Blog Post Outline">
    **Type**: Quick Prompt

    ```
    Create a blog post outline about {topic} for {target_audience}.

    Requirements:
    - {word_count} words
    - {tone} tone
    - Include {key_points}

    Format with H2s and H3s.
    ```
  </Accordion>
</AccordionGroup>

### Research & Analysis

<AccordionGroup>
  <Accordion title="Research Assistant">
    **Type**: System Prompt

    ```
    You are a research assistant specializing in {field}.

    Help with:
    - Literature review
    - Data analysis
    - Citation management
    - Hypothesis development

    Always cite sources. Current date: {current_date_time}
    ```
  </Accordion>

  <Accordion title="Data Analysis">
    **Type**: Quick Prompt

    ```
    Analyze this {data_type} data:

    {data}

    Provide:
    - Key insights
    - Trends and patterns
    - Anomalies
    - Recommendations

    Use {analysis_method} approach.
    ```
  </Accordion>
</AccordionGroup>

## Managing Prompts

### Organizing Prompts

<Tip>
  **Naming Convention**: Use descriptive, searchable names like "Code Review - Python" instead of "Review1".
</Tip>

<Tip>
  **Categories**: Prefix prompts with categories: "DEV: ", "WRITE: ", "RESEARCH: " for easy filtering.
</Tip>

### Editing Prompts

1. Go to Settings → Manage Prompts
2. Find the prompt to edit
3. Click the edit icon
4. Modify content
5. Save changes

### Deleting Prompts

1. Go to Settings → Manage Prompts
2. Find the prompt to delete
3. Click the delete icon
4. Confirm deletion

<Warning>
  Deleting a prompt cannot be undone. Export important prompts as backup.
</Warning>

### Exporting/Importing Prompts

Currently, prompts are stored in browser settings. To backup:

1. Go to Settings → About
2. Export all settings (includes prompts)
3. Save the export file
4. Import on another browser/device to restore

## Best Practices

<CardGroup cols={2}>
  <Card title="Be Specific" icon="crosshairs">
    Detailed prompts produce better results. Instead of "You are helpful", try "You are a helpful Python expert specializing in data science and machine learning."
  </Card>

  <Card title="Use Examples" icon="list-check">
    Include examples in your prompts to guide AI behavior. Show the format or style you expect.
  </Card>

  <Card title="Set Constraints" icon="shield">
    Define what the AI should and shouldn't do. "Do not provide medical advice" or "Always include code examples."
  </Card>

  <Card title="Test and Iterate" icon="rotate">
    Refine prompts based on results. Start simple, then add detail as needed.
  </Card>
</CardGroup>

<Tip>
  **Variables**: Use variables liberally in quick prompts. They make templates flexible and reusable.
</Tip>

<Tip>
  **Time Context**: Include `{current_date_time}` in system prompts for time-aware responses.
</Tip>

<Warning>
  **Token Limits**: Very long system prompts reduce available tokens for conversation. Keep them focused.
</Warning>

## Troubleshooting

<Accordion title="Prompt not applying">
  **Solutions**:

  * Ensure prompt is saved
  * Refresh the page
  * Start a new chat
  * Check prompt is selected in dropdown
</Accordion>

<Accordion title="Variables not working">
  **Solutions**:

  * Check syntax: use `{variable}` not `(variable)` or `[variable]`
  * Ensure no spaces in variable names: `{target_lang}` not `{target lang}`
  * Verify you're using Quick Prompt, not System Prompt
</Accordion>

<Accordion title="Time variables show wrong time">
  **Solutions**:

  * Check browser time settings
  * Verify timezone is correct
  * Refresh the page to update
</Accordion>

## Next Steps

<CardGroup cols={2}>
  <Card title="Knowledge Base" icon="database" href="/features/knowledge-base">
    Combine prompts with document context
  </Card>

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

  <Card title="Configuration Settings" icon="sliders" href="/configuration/settings">
    Configure RAG and other settings
  </Card>

  <Card title="Sidebar" icon="sidebar" href="/features/sidebar">
    Use prompts in the sidebar interface
  </Card>
</CardGroup>
