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

# Investigate Search

This page covers using the search and saved queries on the Runtime Security Investigate page. For information about the [Sessions](https://docs.hiddenlayer.ai/docs/products/runtime/console/runtime_security_investigate_sessions.md) or [Interactions](https://docs.hiddenlayer.ai/docs/products/runtime/console/runtime_security_investigate_session_view.md#interactions) tabs on the same page, click on the appropriate link.

## Investigate

The search feature allows you to filter and find Runtime Security detections. The search feature includes an assisted query to help you generate a query based on parameters you want to filter for.

### Assisted Query

Use an AI assistant to help you create a search query that you can execute in the Code View.

1. In the Console, go to **Runtime Security > Investigate**.

2. Enter your question in the `What do you want to search for?` field under Assisted Query.

   * Example: `find all sessions that include gpt-4o as the model with a critical threat level`

3. Press **Enter** or click the green return arrow to submit your query.

4. When the query completes and a query is generated, the query appears in the Code View window.

5. Click **Run Query** to run the query. The table below the query is updated.

### Code View

Code View allows you to enter or modify a query.

1. In the Console, go to **Runtime Security > Investigate**.
2. Enter the query in the Code View. Code completion displays suggestions based on what you are typing. If you used the Assisted Query, you can modify the query.
3. Click **Run Query** to execute the query. The table below the Search page is updated.

### Save Query

You can save a query to execute again later, to share with others in your organization, or create a rule from it.

1. After entering your query, click **Save Query**. The Save New Query windows displays.
2. Enter a name for the saved query. Entering a description is optional.
3. If you want to make this save query available to all users in your organization, then click **Make this query public**.
4. Click **Save Query**. The query is saved and will appear on the Saved Queries tab.

## Saved Queries

Saved queries can be executed, edited, made public (shared with others in your organization), copied, or used to create a rule.

There are three Saved Queries tabs:

* **All**: Displays your saved queries and all public saved queries.
* **Personal**: Displays your save queries.
* **Shared**: Displays all public saved queries.

### Edit or Execute Saved Query

1. In the Console, go to **Runtime Security > Investigate**, then click the **Saved Queries** tab.
2. Click the edit icon for the saved query you want to edit or execute. This opens the saved query in the Code View on the Search tab.
3. Edit the query, as needed.
4. Click **Run Query** to execute the query.
5. To save any updates, click **Save Query**. The Update Query window displays.

   * To save the changes to the saved query, click **Overwrite**.
   * To save the changes to a new saved query, update the query name, then click **Save as New**.

     * **Note**: Multiple saved queries can have the same name. It is recommended to use unique names for clarity.

### Make a Saved Query Public

Making a saved query public means other users in your organization can view, edit, and use your saved query.

1. In the Console, go to **Runtime Security > Investigate**, then click the **Saved Queries** tab.
2. Find the saved query you want to share with others in your organization.
3. Click the globe icon. A message should display stating the query visibility has been updated.
