> For the complete documentation index, see [llms.txt](https://docs.overleaf.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.overleaf.com/integrations-and-add-ons/ai-features/error-assist.md).

# Error Assist

Error Assist explains LaTeX errors and suggests fixes directly in the editor. When a compile error occurs, you can ask Error Assist for an explanation and, in most cases, a suggested fix.

## Using Error Assist

When your document has a LaTeX error, an error marker appears in the editor margin. You can also find errors in the **Logs and output files** panel.

Fix errors in order from the top of your document—earlier errors can affect how later ones appear.

To get a fix from Error Assist:

1. Select the error marker in the editor margin, or open **Logs and output files**.<br>

   <img src="https://3502988919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVetOkhFZmAC8QCQK0Pi7%2Fuploads%2F44Mw2niCc0qBQmtGslsf%2FFirstFigure.png?alt=media&amp;token=afbaf0e8-c8ae-4e4e-98d5-7de647295346" alt="Image showing the Overleaf AI error assistant suggesting fixes for errors." width="375">
2. Select **Suggest fix**. Error Assist explains the error and shows a suggested fix—the affected lines appear in red, with the suggested change in green.
3. Review the suggestion. If it doesn't look right, select the refresh icon to generate a new one.
4. Select **Apply suggestion** to apply the fix. Your document recompiles automatically.

You can rate the quality of a response using the thumbs up / thumbs down buttons.

{% hint style="success" icon="graduation-cap" %}
To learn more about Error Assist, enroll in our free, self-paced course [Leveraging Overleaf AI](https://learn.overleaf.com/leveraging-overleaf-ai).
{% endhint %}

## AI allowance

Each "Suggest fix" invocation counts as one use from your shared daily AI allowance. When the allowance is used up, a notification appears in the error panel showing when it resets and the option to upgrade.

## Data and privacy

Error Assist is powered by OpenAI. The following is sent when you request a fix:

* The full error message
* Relevant lines of code from your project
* A list of file names in your project

Nothing is sent until you select **Suggest fix**. Your data is never used to train AI models.

## Troubleshooting

**Why can't I see "Suggest fix" for some errors?** Error Assist needs the full error message from the logs to generate a fix. It doesn't appear for code-check errors that show as you type.

**The suggested fix didn't work.** AI can misinterpret custom or specialised LaTeX. Always review a suggestion before applying it. If the fix isn't right, use the refresh icon to try again, or see \[fixing LaTeX errors] for more help.

**Can I undo an applied fix?** Yes—use **Undo** in the toolbar or **Ctrl/Cmd+Z**.

## More help with LaTeX errors

* [Tips and tricks for troubleshooting LaTeX](/troubleshooting-and-support/fixing-latex-errors.md)
* [How to find and fix errors reported in generated files](/troubleshooting-and-support/fixing-latex-errors/fixing-errors-in-generated-files.md)
* [Errors](https://learn.overleaf.com/learn/Errors)
* [Using the Stop on First Error compilation mode](/troubleshooting-and-support/stop-on-first-error.md)


---

# 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.overleaf.com/integrations-and-add-ons/ai-features/error-assist.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.
