> For the complete documentation index, see [llms.txt](https://help.ulii.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.ulii.org/working-with-a-document/ask-questions-about-a-document-with-ai.md).

# Ask questions about a document with AI

The Ask AI tool helps you quickly understand any part of a legal document

1. Open the document you want to explore.
2. Click the **Ask AI** button in the bottom right corner of your page.

<figure><img src="https://1036210849-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxixrDMBJVwul6MYWp1xY%2Fuploads%2Fgit-blob-cd56639d9d81cf0663109d5befc16f2f8bd31a2d%2Fulii--a1%201.png?alt=media" alt=""><figcaption></figcaption></figure>

3. Type any question you want answered about the document.
4. **Ask AI** will analyze the document and respond. You can expand if the answer is long.

<div align="left"><figure><img src="https://1036210849-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxixrDMBJVwul6MYWp1xY%2Fuploads%2Fgit-blob-704a2e8bae12392c32422347bbf2b993b924fc73%2Fulii--a1%203.png?alt=media" alt=""><figcaption></figcaption></figure></div>

5. Ask follow-up questions.
6. Remove a query by clicking the **trash/delete** icon next to it.
7. Click the **close icon** to collapse the dialog without deleting the conversation. You can pick up right where you left off when you return to that document.

<div align="left"><figure><img src="https://1036210849-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxixrDMBJVwul6MYWp1xY%2Fuploads%2Fgit-blob-42dae02030387e014e3634ddbcb8f25153d3aea2%2Fulii--a1%204.png?alt=media" alt=""><figcaption></figcaption></figure></div>


---

# 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://help.ulii.org/working-with-a-document/ask-questions-about-a-document-with-ai.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.
