> For the complete documentation index, see [llms.txt](https://docs.prismacloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.prismacloud.io/content-collections/search-and-investigate/query-library.md).

# Query Library

The **Query Library** displays all of your saved queries in one location. After you run a query, you can save the query as a **Saved Query** so that you can re-run the same search periodically. If you then use this saved query as a match criteria in a policy, the matched issues that trigger alerts can be different from the corresponding results for the same query on the **Investigate** page.

<figure><img src="https://3990409212-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyqPwsbMSaogAot23rTIu%2Fuploads%2Fgit-blob-7805dbfa610a2a392979632e3b7e1963e799b445%2Fquery-library-1.png?alt=media" alt="query library 1"><figcaption></figcaption></figure>

You can run an asynchronous search in the background and check results later. **Background Jobs** displays those results in a table format. From here you can download the results (.csv), add the query to a policy, save the query, and open the query to view or modify it further.

<figure><img src="https://3990409212-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyqPwsbMSaogAot23rTIu%2Fuploads%2Fgit-blob-c24abee003923849fe4c1526a288eb0d628d4182%2Fbackground-jobs-1.png?alt=media" alt="background jobs 1"><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.prismacloud.io/content-collections/search-and-investigate/query-library.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
