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

# Prompts

> Create a prompt, try it in the playground, save new versions and go back to an earlier one.

**Prompts** lists every prompt in your workspace, with its product, type, status and current version. Each prompt keeps a full history: every time you save a change to the prompt, model or settings, Nucleus adds a new version and keeps the ones before it, so you can compare them or go back. Use the search box and the product, type and status filters above the list to find a prompt, then select it to open it.

## Before you start

Tenant Owners and Workspace Admins can create prompts, go back to an earlier version and turn a prompt off. Workspace Members can open, edit and try them. Every prompt is filed under a product and a type, which Tenant Owners and Workspace Admins set up in [Nucleus settings](/products/nucleus/settings).

## Create a prompt

<Frame>
  <img src="https://mintcdn.com/intellikon-ai-ltd/wM16d87Um0QW2CyJ/images/nucleus/create-a-prompt.png?fit=max&auto=format&n=wM16d87Um0QW2CyJ&q=85&s=4727cd95132a19716f19e9c73f141697" alt="The Create New Prompt form, with Prompt Name, Product, Type, Environment, Description and Content." width="1580" height="2340" data-path="images/nucleus/create-a-prompt.png" />
</Frame>

<Steps>
  <Step title="Start a prompt">
    Select **Prompts**, then **New prompt**.
  </Step>

  <Step title="Name it">
    Enter a **Prompt Name** your team will recognise.
  </Step>

  <Step title="Choose the product">
    Choose the **Product**.
  </Step>

  <Step title="Choose the type">
    Choose the **Type**.
  </Step>

  <Step title="Describe it">
    Add a **Description** if you want one. It shows under the name in the list.
  </Step>

  <Step title="Write the prompt">
    Under **Content**, write the instruction.
  </Step>

  <Step title="Mark what changes">
    Put anything that changes from one use to the next in double braces, such as `{{ticket}}`.
  </Step>

  <Step title="Create it">
    Select **Create Prompt**.
  </Step>
</Steps>

To put the first version in **dev** or **staging** straight away, choose **Dev** or **Staging** under **Environment** before you create it. Otherwise leave it at **None**.

The prompt now appears in **Prompts** as Active. Next, [try it in the playground](#try-a-prompt-in-the-playground).

<Tip>To insert a variable without typing the braces, select **Variables**.</Tip>

## Try a prompt in the playground

The playground sends the prompt to the AI model and shows you the answer, without changing the prompt.

<Steps>
  <Step title="Open the prompt">
    Select **Prompts**, then the prompt.
  </Step>

  <Step title="Open the playground">
    Select **Run in playground**.
  </Step>

  <Step title="Fill in the variables">
    Enter a value for each variable the prompt uses.
  </Step>

  <Step title="Run it">
    Select **Run**.
  </Step>
</Steps>

The answer appears under **Output**, with the model used and how long it took. Each run is a real request to the model. Next, [save a new version](#save-a-new-version) if you want to change the prompt.

## Save a new version

<Frame>
  <img src="https://mintcdn.com/intellikon-ai-ltd/wM16d87Um0QW2CyJ/images/nucleus/save-a-new-version.png?fit=max&auto=format&n=wM16d87Um0QW2CyJ&q=85&s=13e5a4ed1f4f1719d249b88e92a348b3" alt="The lower part of a prompt's editor, with Advanced configuration, the Commit message box, the release list and Save." width="1060" height="670" data-path="images/nucleus/save-a-new-version.png" />
</Frame>

The **Model** list shows the models your workspace allows for Nucleus. Tenant Owners and Workspace Admins manage them in Studio settings, under **AI Models**.

<Steps>
  <Step title="Open the prompt">
    Select **Prompts**, then the prompt. The newest version opens in the editor.
  </Step>

  <Step title="Change the prompt">
    Edit the text under **Prompt** if you want to change it.
  </Step>

  <Step title="Change the model">
    Change the **Model** if you want.
  </Step>

  <Step title="Change the temperature">
    Change the **Temperature** if you want.
  </Step>

  <Step title="Change the max tokens">
    Change the **Max tokens** if you want.
  </Step>

  <Step title="Say what changed">
    Enter a **Commit message**, such as "Asks for a reason with each priority".
  </Step>

  <Step title="Save">
    Select **Save**.
  </Step>
</Steps>

The new version appears at the top of **Version history**, marked **Current**, with your message and your name. Next, [compare it with the version before](#compare-two-versions), or [release it](/products/nucleus/releasing-prompts).

<Tip>Select **Expand** above the prompt to edit it full screen. Press Escape to close it.</Tip>

## Compare two versions

<Steps>
  <Step title="Open the comparison">
    On the prompt, select **Compare**.
  </Step>

  <Step title="Pick the first version">
    Choose a version in the first list.
  </Step>

  <Step title="Pick the second version">
    Choose a version in the second list. Nucleus highlights what changed in the prompt, the model, the settings and the commit message.
  </Step>

  <Step title="Choose the view">
    Select **Split** to see the versions side by side, or **Unified** to see them in one column.
  </Step>

  <Step title="Finish">
    Select **Exit**.
  </Step>
</Steps>

You are back in the editor. Next, [go back to an earlier version](#go-back-to-an-earlier-version) if the older one was better.

<Tip>While comparing, press the up and down arrow keys, or J and K, to jump between changes.</Tip>

## Go back to an earlier version

Select any version in **Version history** to read it. Older versions are read-only. Tenant Owners and Workspace Admins can bring one back.

<Steps>
  <Step title="Find the version">
    In **Version history**, find the version you want back.
  </Step>

  <Step title="Revert">
    Select **Revert** on that version.
  </Step>

  <Step title="Confirm">
    Confirm that you want to revert.
  </Step>
</Steps>

Nucleus adds a new version with the older content and makes it current, so nothing in the history is lost. Next, [release it](/products/nucleus/releasing-prompts).

## Turn a prompt off

Tenant Owners and Workspace Admins can turn a prompt off and on again.

<Steps>
  <Step title="Open the prompt">
    Select **Prompts**, then the prompt.
  </Step>

  <Step title="Deactivate it">
    Select **Deactivate**.
  </Step>

  <Step title="Confirm">
    Confirm that you want to deactivate it.
  </Step>
</Steps>

The prompt now shows as Inactive. It stays in your list with all its versions.

To turn it back on:

<Steps>
  <Step title="Open the prompt">
    Select **Prompts**, then the prompt.
  </Step>

  <Step title="Activate it">
    Select **Activate**.
  </Step>
</Steps>

Next, [check the health of your active prompts](/products/nucleus/monitoring#check-prompt-health).

## Troubleshooting

<Accordion title="Save stays greyed out">
  Change the prompt, the model or a setting, and enter a **Commit message**. Nucleus only saves a version that differs from the one before.
</Accordion>

<Accordion title="A Reason to start in Staging box appears">
  A new prompt has no evaluation yet, so it has not passed the quality check for **staging**. Write why it should start there, or choose **Dev** instead.
</Accordion>

<Accordion title="Nucleus says &#x22;Prompt name already exists&#x22;">
  Another active prompt in your workspace has that name. Choose a different **Prompt Name**.
</Accordion>

<Accordion title="Nucleus says &#x22;This name is reserved by a platform prompt&#x22;">
  The name belongs to one of Studio's built-in prompts. Choose a different **Prompt Name**.
</Accordion>

<Accordion title="The Type list says &#x22;No types in this product&#x22;">
  Ask a Tenant Owner or Workspace Admin to add a type for that product in [Nucleus settings](/products/nucleus/settings#add-a-type).
</Accordion>

<Accordion title="The Model list says &#x22;No models configured&#x22;">
  Your workspace has no models allowed for Nucleus yet. Ask a Tenant Owner or Workspace Admin to allow one in Studio settings, under **AI Models**.
</Accordion>

<Accordion title="New prompt is not there">
  Only Tenant Owners and Workspace Admins can create prompts. Ask one of them to create it, then you can edit it.
</Accordion>
