# How to manage and monitor prompts

Once a prompt is created, it will be listed on the main interface. Follow the steps below to manage and monitor your prompts effectively.

### **Accessing prompts** <a href="#accessing-prompts" id="accessing-prompts"></a>

#### **Navigating to the prompt manager** <a href="#navigating-to-the-prompt-manager" id="navigating-to-the-prompt-manager"></a>

* Locate the main navigation bar at the top of the ZBrain Builder interface
* Click on the ‘Prompts’ tab to access the Prompt Manager
* The prompt manager displays all your available prompts in a tabular format

<figure><img src="https://3781630280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbuSicczDKTyHzwzicar%2Fuploads%2FdvC6TVTvQBDXu6lE1JVo%2Fimage.png?alt=media&#x26;token=1d1609a8-ab95-4dee-b1b2-15ece747986b" alt=""><figcaption></figcaption></figure>

#### **Browsing existing prompts** <a href="#browsing-existing-prompts" id="browsing-existing-prompts"></a>

The prompt manager provides a comprehensive view of all your prompts with the following information:

* **ID**: Unique identifier for each prompt
* **Prompt name**: Descriptive name of the prompt
* **Total runs**: Number of times the prompt has been executed
* **Credits used**: Number of credits consumed by the prompt
* **Total cost**: Accumulated cost from all executions
* **Last updated**: Timestamp of the most recent modification
* **Status**: Current state of the prompt (Published/ Draft)
* **Actions:** Access additional options via the three-dot menu to edit or delete a prompt.

#### **Searching and filtering** <a href="#searching-and-filtering" id="searching-and-filtering"></a>

* **Search**: Use the search bar at the top to find prompts by name
* **Filter:** Click the ‘Filter’ button and select show all to view all prompts, or filter by status (Published/Draft) to narrow your results.

<figure><img src="https://3781630280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbuSicczDKTyHzwzicar%2Fuploads%2FFjtIEuUzVh760QvhhIf4%2Fimage.png?alt=media&#x26;token=6e7ede49-2e8c-471b-acc6-ea4f107e514f" alt=""><figcaption></figcaption></figure>

### **Monitoring prompt performance** <a href="#monitoring-prompt-performance" id="monitoring-prompt-performance"></a>

#### **Accessing detailed analytics** <a href="#accessing-detailed-analytics" id="accessing-detailed-analytics"></a>

1. From the prompt manager dashboard, click on a prompt name
2. This opens the prompt details page
3. Use the left sidebar navigation to access different pages:
   * **Prompt overview**: Performance metrics and usage statistics
   * **Prompt editor**: Modify prompt content and settings
   * **User management**: Control access permissions

<figure><img src="https://3781630280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbuSicczDKTyHzwzicar%2Fuploads%2FfZAdZJEqu2Ai0D62t9Go%2Fimage.png?alt=media&#x26;token=ad2d6b8e-c33e-4d16-969d-332150262373" alt=""><figcaption></figcaption></figure>

### **Understanding the analytics dashboard** <a href="#understanding-the-analytics-dashboard" id="understanding-the-analytics-dashboard"></a>

The prompt overview page provides rich performance data:

**Usage metrics**

* **Run over time**: Graph showing execution frequency by date
* **Total logs**: Number of recorded executions
* **Total tokens**: Cumulative token usage across all executions
* **Total cost**: Aggregate expense from all executions

**Performance metrics**

* **Average time**: Mean processing duration in seconds
* **Median time**: Middle value of all processing durations
* **Median cost**: Middle value of all execution costs

**Version management**

* Current version information is displayed near the prompt name (e.g., "Version: 3 of 3")
* Use the version dropdown menu to switch between different iterations of the prompt
* Each version maintains separate analytics, allowing for performance comparison

<figure><img src="https://3781630280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbuSicczDKTyHzwzicar%2Fuploads%2F1ZzoMzOuIPZaPXfgMDZN%2Fimage.png?alt=media&#x26;token=a62e82e0-4d61-4051-8a9d-677f95fe1f99" alt=""><figcaption></figcaption></figure>

### **Reviewing execution logs** <a href="#reviewing-execution-logs" id="reviewing-execution-logs"></a>

#### Prompt logs table <a href="#prompt-logs-table" id="prompt-logs-table"></a>

The detailed logs section provides a comprehensive record of each prompt execution:

| Column        | Description                                                       |
| ------------- | ----------------------------------------------------------------- |
| Request ID    | Unique identifier for each execution instance                     |
| Date and Time | When the prompt was executed (e.g., "2 mins ago")                 |
| Entity        | The context where the prompt was used (e.g., "App", "Playground") |
| Entity Name   | Specific entity identifier (e.g., "HR policy query app")          |
| Evaluations   | Any evaluation metrics                                            |
| Duration      | Execution time in seconds                                         |
| Tokens        | Number of tokens consumed in this execution                       |
| Cost          | The financial cost of this specific execution                     |

<figure><img src="https://3781630280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbuSicczDKTyHzwzicar%2Fuploads%2F10wzAz3w54Cy6o2GUaur%2Fimage.png?alt=media&#x26;token=fc74356b-faf9-44b2-8ca4-ff8d676a3b41" alt=""><figcaption></figcaption></figure>

You can sort these logs by clicking on any column header to organize entries by that attribute. (e.g., by date, duration, tokens, or cost)

### In-context monitoring from prompt logs <a href="#in-context-monitoring-from-prompt-logs" id="in-context-monitoring-from-prompt-logs"></a>

You can perform contextual prompt monitoring directly from prompt logs, enabling you to evaluate model behavior(such as accuracy and creativity), without leaving the current workflow. From any log entry, simply initiate an evaluation event to observe production-grade metrics in real time, creating a seamless connection between prompt experimentation and operational observability.

1. Click on any prompts from the prompts log, prompt log details panel will open. In the overview tab, click ‘Monitor’

<figure><img src="https://3781630280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbuSicczDKTyHzwzicar%2Fuploads%2Fp5ee0eFuJJrENmZdk18R%2Fimage.png?alt=media&#x26;token=186394eb-650b-4db4-a79b-084115677af6" alt=""><figcaption></figcaption></figure>

2. Clicking the **Monitor** button on a prompt log opens the event monitoring configuration modal,

<figure><img src="https://3781630280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbuSicczDKTyHzwzicar%2Fuploads%2FQdVSR2BD75XepQlAl0wW%2Fimage.png?alt=media&#x26;token=3a0136c7-189e-4d71-b7ca-e5742fae88bc" alt=""><figcaption></figcaption></figure>

3. Clicking on ‘**Now**’ will redirect to the monitor home page where users can set monitoring configuration.

* Please refer [How to configure a monitoring event for apps](https://docs.zbrain.ai/zbrain-documentation/zbrain-builder/monitor/how-to-configure-a-monitoring-event-for-apps) if you are monitoring prompts for apps, or [How to configure a monitoring event for agents](https://docs.zbrain.ai/zbrain-documentation/zbrain-builder/monitor/how-to-configure-a-monitoring-event-for-agents) in case of agents.
