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

# Uploading Documents for AI Context

> Give the AI accurate answers by adding your own reference documents (Admin feature)

<Note>
  This is an **administrator-only feature**. Only users with admin privileges can upload and manage documents for the AI.
</Note>

## Why upload documents?

Uploading to the knowledge base (also called **AI Master Prompts**) gives the assistant literally word-for-word context from your own playbooks. If something is documented there, the AI can surface it in chat; if it isn’t, the AI can’t make it up.

Common use cases include:

<CardGroup cols={2}>
  <Card title="Policies & Procedures" icon="file-contract">
    Employee handbooks, compliance policies, benefits information
  </Card>

  <Card title="Process Guides" icon="diagram-project">
    SOPs, onboarding instructions, escalation paths
  </Card>

  <Card title="Technical Notes" icon="code">
    System diagrams, integration guides, troubleshooting checklists
  </Card>

  <Card title="Reference Material" icon="book">
    Templates, best-practice summaries, research briefs
  </Card>
</CardGroup>

## Where to upload

1. Go to **Dashboard → Administration → AI Master Prompts** (older builds label this under Admin Panel → AI Settings).
2. Create a Master Prompt (collection) with the **+ Create Prompt** button, or open an existing one.
3. Inside the prompt editor you’ll see the **Upload Document** option for adding files to that collection.

## Supported formats

The uploader accepts text-based files (PDF, DOC/DOCX, TXT, MD). Scanned PDFs without selectable text should be run through OCR first so the AI has something to read. If a file fails to parse, convert it to PDF or plain text and retry.

## Upload workflow

<Steps>
  <Step title="Pick the collection">
    Choose the Master Prompt (collection) that should own the document. Collections help keep related material together.
  </Step>

  <Step title="Select your file or files">
    Use the **Upload Documents** button in the top-right corner of the prompt editor and pick files from your computer.
  </Step>

  <Step title="Set availability">
    Turn on **Available to AI** if you want the assistant to start using the document right away. Leave it off to stage drafts.
  </Step>

  <Step title="Upload and wait for processing">
    The system extracts text, indexes it, and marks the document as **Processing**, then **Active** when it’s ready. Large files can take a minute.
  </Step>
</Steps>

## After upload

* Documents show up in the Knowledge Base list with their status (Processing, Active, Disabled).
* You can toggle availability at any time without deleting the file.
* A single upload is stored centrally—once it’s processed you can attach that same document to any Master Prompt without uploading duplicates.
* Always sanity-check by asking the AI a question that should be answered by the new document.

<Tip>
  If the AI doesn’t surface the new content, double-check that the document is Active, Available to AI, and contains selectable text.
</Tip>

## Keep uploads clean

### Titles & descriptions

<CardGroup cols={2}>
  <Card title="Clear" icon="circle-check">
    “Finance - Policy - Expense Reimbursements (Apr 2024)”
  </Card>

  <Card title="Unclear" icon="circle-xmark">
    “policy\_final\_v7(1).pdf”
  </Card>
</CardGroup>

### Document quality

<AccordionGroup>
  <Accordion title="Structured">
    Headings, bullet lists, and tables give the AI anchor points.
  </Accordion>

  <Accordion title="Current">
    Disable or delete outdated versions so the assistant doesn’t recite stale guidance.
  </Accordion>

  <Accordion title="Complete">
    Upload the whole SOP or policy rather than snippets; partial context can lead to partial answers.
  </Accordion>
</AccordionGroup>

## Troubleshooting

| Error                      | Likely cause                               | Fix                                                     |
| -------------------------- | ------------------------------------------ | ------------------------------------------------------- |
| Upload stuck on Processing | File is huge or text couldn’t be extracted | Try a smaller split file or re-export as text-based PDF |
| “File type not supported”  | Unsupported extension                      | Save/export as PDF, DOCX, MD, or TXT                    |
| “No text extracted”        | Scanned image PDF                          | Run OCR before uploading                                |
| Users still see old info   | Old document still Active                  | Disable or delete outdated versions and re-ask the AI   |

If processing fails repeatedly, download the file, confirm it opens locally, and re-upload. Password-protected or corrupted files can’t be indexed.

## What’s next?

* [Managing AI Master Prompts](/ai/what-are-master-prompts)
* [Creating custom text prompts](/ai/creating-custom-prompts)
