> For the complete documentation index, see [llms.txt](https://docs.docbits.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.docbits.com/end-user-and-partner-section/ai-table/ai-instructions.md). Agents can also search and read this documentation through its [MCP server](https://docs.docbits.com/~gitbook/mcp).

# AI instructions

[AI Table](https://docs.docbits.com/end-user-and-partner-section/ai-table.md) · [Structured Output for Tables](https://docs.docbits.com/end-user-and-partner-section/ai-table/structured-output.md)

## Give the AI instructions

Under the table the **AI instructions** card tells the AI what to do differently. It has two inputs and four buttons you will use all the time.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-3d9f6caae1d34c3c5764f2dca394c29b18df9532%2Fai-table-instructions-en.png?alt=media" alt="AI instructions card with prompt, extra columns and buttons"><figcaption><p>The AI instructions card.</p></figcaption></figure>

* **Prompt for the AI.** Write one instruction per line, in plain language. Type **@** to insert a column name, so the AI knows exactly which column you mean.
* **Extra columns for the AI.** Pick columns the AI must return in addition to the usual ones.
* **Training status.** The chip shows **Training applied** when a saved training was used in the last run, or **No training applied**.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-3e15f5224a76e40d06cbd82a9deb90ce8ef89cce%2Fai-table-prompt-mention-en.png?alt=media" alt="Typing @ opens the list of table columns"><figcaption><p>Type <strong>@</strong> in the prompt to pick a column. As soon as something changed, <strong>Test change</strong> appears next to <strong>Apply</strong>.</p></figcaption></figure>

{% hint style="warning" %}
A changed prompt makes the AI read the table again, and it can change every column, not only the one you had in mind. Check the whole table afterwards.
{% endhint %}

### Suggest with Nexus

Not sure what to write? Click **Suggest with Nexus**. DocBits looks at this document's extraction and proposes instructions or extra columns. Nothing is applied until you click **Insert** (adds the line to your prompt) or **Add column**.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-ef9bddd16f9a3894ca08123e7533f99cb29fe7eb%2Fai-table-nexus-suggest-en.png?alt=media" alt="A Nexus suggestion with an Insert button"><figcaption><p>A suggestion from Nexus. <strong>Insert</strong> copies it into the prompt.</p></figcaption></figure>

If your organization has switched the AI advisor off, DocBits tells you so instead of suggesting.

### Test, apply, save: what each button does

| Button                                      | What happens                                                                                                                                                                                      | Stored for the next documents? |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **Test change**                             | Runs your change and shows a comparison. **Nothing is written**, not to the document and not as a rule.                                                                                           | No                             |
| **Apply**                                   | Re-reads the table with your changes and puts the result into this document in the editor. It becomes permanent only when you save the document.                                                  | No                             |
| **Save as training** (tooltip *Save Rules*) | Stores the prompt, extra columns, column mapping, hidden columns, amount formats and **Extract From** settings for this supplier layout. The next documents of this layout are read the same way. | Yes                            |
| **Delete** (tooltip *Delete Rules*)         | Deletes the saved table rules of this supplier layout, with no extra confirmation, and runs the AI again without them. It also removes classic table training saved for the same layout.          | Removes them                   |
| **Export**                                  | Downloads the table as a CSV file.                                                                                                                                                                | No                             |

{% hint style="info" %}
Header remaps, **Delete column**, **Amount Formatting**, **Extract From** and **Restore Table Column** behave like **Apply**: they rebuild the table for this document right away and are saved with the document, not as a rule. Only **Save as training** teaches DocBits for the next documents.
{% endhint %}

If the document already has lines matched to a purchase order, Apply and Save warn that **you may lose PO connections**. Choose **Done** to continue and match again afterwards.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-d310cfc087939e1f5441a9d034000cbc900f31f9%2Fai-table-test-change-en.png?alt=media" alt="Test change dialog comparing the current table with the new result"><figcaption><p>The <strong>Test change</strong> dialog compares the new result with the table you see now.</p></figcaption></figure>

The **Test change** dialog counts what would change: changed cells, added columns, missing columns and reassigned columns. Each cell is marked **Added**, **Changed**, **Missing**, **Reassigned** or **Unchanged**. At the bottom the dialog lists the evidence for the run: *Effective hints*, *Selected training*, *Column policy* and *Request overrides used*. Choose **Apply result to this document** to take it over (then save the document), or **Discard** to throw it away. If you change the prompt after testing, the result is marked stale and you must test again.

After **Save as training** DocBits tells you the training is used on the next reprocessing; the current run did not use it yet. Check on the next document of the supplier that the chip says **Training applied**.


---

# 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.docbits.com/end-user-and-partner-section/ai-table/ai-instructions.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.
