> For the complete documentation index, see [llms.txt](https://docs.quadratichq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.quadratichq.com/formulas/ai-assistant.md).

# AI assistant

Generate Formulas with AI.

Formula generation is one AI question away.&#x20;

To generate Formulas with AI, simply ask your question in natural language to the AI assistant located in the multi-line Formula editor.&#x20;

To enter the multi-line editor, click the multi-line Formula editor button.

<figure><img src="https://2438361843-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ff1Y5UzPF2x1oIzVJbUK8%2Fuploads%2FUDsKyzuY46MC0rej34HU%2FCleanShot%202024-08-01%20at%2015.16.21%402x.png?alt=media&amp;token=fe71cde3-cd8c-4032-a084-d27bc8515d4f" alt=""><figcaption></figcaption></figure>

Once you're in the multi-line Formula editor open the AI assistant and start asking your questions to generate Formulas.

<figure><img src="https://2438361843-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ff1Y5UzPF2x1oIzVJbUK8%2Fuploads%2Fs6L3DCKO25iZJgChD8Bh%2FCleanShot%202024-08-01%20at%2015.15.22%402x.png?alt=media&amp;token=58499963-85a2-459e-8db5-1bf393d412f5" alt=""><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.quadratichq.com/formulas/ai-assistant.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.
