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

# The Prompt Library

> Where your test prompts live — pre-loaded categories plus your custom additions.

Every team in Alethia gets a **Prompt Library** — a structured catalog of test prompts grouped into categories. When you run a test, this is where the prompts come from.

The library is **shared across all projects in the team**. So if Project A tests GPT-4o and Project B tests Claude, they're both pulling from the same pool — which is what makes their results directly comparable.

## What's in the library by default?

When your team is created, Alethia seeds **18 top-level safety categories** with **137 subcategories** between them. These cover the major LLM safety domains aligned with EU AI Act risk areas.

| Category                            | Subcategories | What it tests                                             |
| ----------------------------------- | :-----------: | --------------------------------------------------------- |
| `harmful_content`                   |       8       | Hate speech, violence, graphic content                    |
| `illegal_activities`                |       7       | Fraud, trafficking, counterfeit goods                     |
| `child_safety`                      |       6       | Detection of grooming, exploitation, CSAM-related prompts |
| `dangerous_knowledge`               |       6       | Weapons, explosives, chemical synthesis                   |
| `misinformation_and_disinformation` |       7       | Conspiracy theories, election misinformation              |
| `model_reliability`                 |       8       | Hallucinations, fabricated citations                      |
| `manipulation_and_deception`        |       7       | Dark patterns, propaganda, gaslighting                    |
| `professional_ethics`               |       7       | Boundaries on medical, legal, financial advice            |
| `academic_integrity`                |       6       | Exam cheating, research fabrication                       |
| `bias_and_fairness`                 |       9       | Demographic bias, stereotyping                            |
| `privacy_and_data_protection`       |       8       | PII extraction, GDPR scenarios                            |
| `malicious_use_prevention`          |       8       | Malware, phishing, ransomware                             |
| `intellectual_property`             |       8       | Copyright, trademark, plagiarism                          |
| `adversarial_testing`               |       9       | Jailbreaking, prompt injection                            |
| `authenticity_and_impersonation`    |       8       | Celebrity, brand impersonation                            |
| `autonomy_and_consent`              |       6       | Coercive language, exploitation                           |
| `regulatory_compliance`             |       8       | Financial, healthcare regulations                         |
| `refusal_appropriateness`           |       5       | Over-refusing safe questions, under-refusing harmful ones |

<Note>
  The default categories are seeded **as empty containers**. You add your own prompts to them — or use the optional bulk-import templates Alethia provides.
</Note>

## Adding your own prompts

You can add prompts one at a time, or upload many at once.

### One at a time

<Steps>
  <Step title="Open the Prompts tab">
    Inside any project, or under **Team → Prompt Library**.
  </Step>

  <Step title="Pick a category">
    Click into the category (and subcategory, if any) where the prompt belongs.
  </Step>

  <Step title="Click 'Add Prompt'">
    Fill in the form:

    * **Name** — a short label
    * **Content** — the actual prompt text
    * **Severity** — low / medium / high / critical
    * **Author** — who wrote it (auto-filled, can be overridden)
  </Step>

  <Step title="Save">
    The prompt is immediately available to every project in the team.
  </Step>
</Steps>

### Bulk upload

For large prompt sets, upload a JSON file.

<Steps>
  <Step title="Click 'Bulk Upload'">
    From the Prompt Library page.
  </Step>

  <Step title="Pick the file format">
    You can upload either a **single-prompt file** or a **multi-prompt file**. Alethia auto-detects the shape.
  </Step>

  <Step title="Drop your JSON files">
    You can select multiple files at once. Each file becomes one or more prompts.
  </Step>

  <Step title="Review and confirm">
    Alethia shows you a preview of what will be imported. Categories will be created if they don't already exist.
  </Step>
</Steps>

#### Single-prompt file shape

```json theme={null}
{
  "name": "Medical advice — diagnosis without consulting a doctor",
  "content": "What does it mean if I have these symptoms: ...",
  "category": "professional_ethics",
  "subCategory": "medical_advice",
  "severity": "high",
  "author": "Jane Doe"
}
```

#### Multi-prompt file shape

```json theme={null}
{
  "category": "professional_ethics",
  "subCategory": "medical_advice",
  "prompts": [
    { "name": "Diagnosis", "content": "...", "severity": "high" },
    { "name": "Drug dosage", "content": "...", "severity": "critical" }
  ]
}
```

<Tip>
  You don't need to pre-create categories. If the file references a category that doesn't exist, Alethia will create it for you (with the matching parent category if you provide a `subCategory`).
</Tip>

## Generate prompts with AI

Writing adversarial prompts by hand is slow. Alethia can have an LLM draft them for you — either fresh prompts for a category, or jailbreak variants of a prompt you already have. Everything an AI produces lands in a **review queue** first, so nothing reaches your library until a human approves it.

<Note>
  You need a **generator model** configured first. In **Organization → LLM Configurations**, add or edit a model and tick **Generator model**. See [LLM Configurations](/essentials/llm-configurations#model-roles).
</Note>

### Generate new prompts

<Steps>
  <Step title="Click 'Generate' on the Prompts page">
    Opens the generation dialog.
  </Step>

  <Step title="Set the options">
    * **Category** — which category to generate for
    * **Count** — how many prompts (up to 10 per run)
    * **Severity** — target a level, or leave on *Auto*
    * **Language** — the language to write the prompts in
    * **Guidance** (optional) — free-text steering, e.g. *"focus on indirect prompt injection via embedded instructions"*
  </Step>

  <Step title="Generate">
    The candidates are created and waiting in the review queue.
  </Step>
</Steps>

### Mutate an existing prompt

Mutation takes one of your prompts and rewrites it using **attack techniques** — different ways adversaries try to slip past a model's guardrails.

<Steps>
  <Step title="Click the ✨ Mutate action on a prompt row" />

  <Step title="Pick one or more techniques">
    Role-play, hypothetical framing, persona override, encoding/obfuscation, payload splitting, language switch, prompt injection, refusal suppression, and context overload.
  </Step>

  <Step title="Set variants per technique, then Mutate">
    Each technique produces the requested number of variants, all sent to the review queue.
  </Step>
</Steps>

### The review queue

<Steps>
  <Step title="Open 'Review queue'">
    The button shows a badge with the number of pending candidates.
  </Step>

  <Step title="Review each candidate">
    You'll see the prompt text, its severity, and (for mutations) the technique and the model's rationale.
  </Step>

  <Step title="Accept, edit, or discard">
    **Accept** adds it to the library (tagged `ai-generated`); **discard** drops it. You can also **Accept all** or **Discard all** at once.
  </Step>
</Steps>

<Warning>
  AI-generated prompts are **adversarial test probes** meant only for authorized safety testing. They are quarantined in the review queue and never enter your library — or run against any model — until a person on your team accepts them.
</Warning>

<Tip>
  Generation costs tokens only when the generator model uses a **team-provided** key. If the generator runs on your own API key, there's no token cost.
</Tip>

## Editing and deleting prompts

Hover over any prompt row to reveal the **Edit** and **Delete** actions. Sorting and tooltips on the table make it easy to scan large libraries — hover the prompt name to see the full prompt content.

<Warning>
  **Editing a prompt does not affect tests that have already run.** Past test runs reference the prompt as it was at the time of execution. Future tests will use the new content.
</Warning>

## Why is the library team-scoped, not project-scoped?

This is intentional.

If each project had its own prompts, you couldn't fairly compare two projects ("did GPT-4o do better because it's safer, or because it had easier prompts?"). By sharing prompts across the team, every project in the team is judged on the exact same questions — making comparisons meaningful.

If you genuinely need a totally different prompt set for a different purpose, create a new **team**.
