# Prompt Management

This guide explains how to manage AI prompts in **PIARA** to streamline intelligence enrichment.

{% embed url="<https://www.youtube.com/watch?v=H2j-eaJEmo4>" %}

***

### 📍 Where Prompts Are Used

AI assistance is available in **four key areas** within PIARA:

1. **Search Page**
   * Select any object from the search results to activate the AI Assistant.
2. **Markdown Control (on STIX Object Page)**
   * Use AI to enrich or summarize markdown-based content like notes and descriptions.
3. **Object References (on STIX Object Page)**
   * Select one or more referenced STIX objects to receive contextual insights from AI.
4. **Images Control (on Search Page and STIX Object Page)**
   * Use AI Assistant to analyze, describe, or enrich visual content through prompts.

***

### 💡 What Is a Prompt in PIARA?

In PIARA, a **prompt** is more than just a message—it’s a configuration that includes:

* **AI Model**: Only one model can be selected per prompt (e.g., GPT-4).
* **System Message**: Defines the AI’s role or tone (e.g., "You are an analyst").
* **User Message**: Your main instruction (e.g., "Create an executive summary").
* **Fields**: Choose specific object fields (e.g., `name`, `description`) or select **all fields**.
  * ⚠️ Be mindful of model context limits when selecting many fields or using multiple objects.

***

### 📚 Prompt Library

A centralized place where all your prompts are listed and managed.

**Go to**: `Resources > Prompt Library`

***

### 🛠 Creating a Prompt

1. Navigate to the **Prompt Library** or invoke **AI Assistant**.
2. Click **+** or **New Prompt**.
3. Fill in the required fields:
   * **Title** (e.g., "Executive Summary")
   * **System Message** (e.g., "You are an analyst.")
   * **User Message** (e.g., "Create an executive summary.")
   * **Fields** to include (e.g., `name`, `description`)
4. Click **Create** or **Submit**.

Your prompt will now appear in your Prompt Library and in AI Assistant interfaces across the platform.

***

### 🔐 Prompt Visibility & Sharing

* Prompts are **private** by default (visible only to the creator).
* To **share a prompt**:
  * Click **Share Prompt** and select users (multi-user selection supported).
* To **make it public**:
  * Click **Make Public** – all system users will be able to use the prompt.
* 🔒 Only the **creator** can edit a prompt.
  * Others can use **Save As** to create and modify their own version.

***

### ⚙️ Prompt Actions

Anywhere AI prompts are available (Search, Markdown, Object References, Images), you can:

* ⭐ **Add to Favorites** – pin the prompt to the top of the list.
* 📝 **Save As** – duplicate the prompt under a new name.
* 🔄 **Update Prompt** – apply edits to an existing prompt.
* 📤 **Share or Make Public** – manage visibility and access.

***

### 📥 Using a Prompt

1. Select one or more objects where AI Assistant is available.
2. Choose a prompt from the list.
3. Click **Submit**.
4. AI will process the selected fields and return a result.

You can then:

* 📋 Manually select and copy the response.
* 📄 **Create a new report** from the result.\
  Source materials will be included as **Object Refs** or **Confidential Images**.

***

### 🗑 Deleting a Prompt

1. Go to the **Prompt Library**.
2. Select the prompt you want to remove.
3. Click the **🗑️ Delete** icon and confirm.

***

### ✅ Summary

Prompt management in PIARA enables:

* 🧠 Tailored AI interactions
* 🔁 Efficient reuse of enriched content
* 👥 Collaboration through prompt sharing and customization


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://piara-docs.gitbook.io/piara-documentation/user-guide/prompt-management.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
