# Marking AI-generated suggestions

When CKEditor AI features create [track changes](../collaboration/track-changes/track-changes.md) suggestions, you can mark those suggestions as AI-generated so reviewers can tell them apart from manual edits. The same origin can also be surfaced later in [revision history](../collaboration/revision-history/revision-history.md), so a reviewer can see which saved revisions involved AI. Both are opt-in display options that are turned off by default.

> **Unlock this feature with selected CKEditor Plans**
>
> Try all premium features – no credit card needed.
>
> [Sign up for a free trial ](https://portal.ckeditor.com/checkout?plan=free)[Select a Plan](https://ckeditor.com/pricing/)

<a id="how-it-works">

## How it works

When CKEditor AI works together with [Track Changes](../collaboration/track-changes/track-changes.md), its edits can be recorded as suggestions rather than applied directly to the content. Whenever a suggestion originates from AI, it is tagged so the editor can tell it apart from manual edits.

By default, an AI-generated suggestion looks exactly like a manual one. The display options below let you surface its origin in the suggestion annotation.

> **Note**
>
> This feature affects suggestions only and requires the [Track Changes](../collaboration/track-changes/track-changes.md) plugin. It applies whenever an AI feature creates a suggestion, however that suggestion was produced.

<a id="displaying-the-ai-source">

## Displaying the AI source

Use [`config.trackChanges.showAISource`](../../api/module_track-changes_trackchangesconfig-TrackChangesConfig.md#member-showAISource) to control whether and how an AI-generated suggestion advertises its origin.

| Value      | Result                                                                                                      |
| ---------- | ----------------------------------------------------------------------------------------------------------- |
| `'pill'`   | Shows an “AI-generated” pill in the suggestion balloon while keeping the original author’s name and avatar. |
| `'author'` | Swaps the author shown in the suggestion view for a view-only AI identity. The stored author is unchanged.  |
| `null`     | Hides the AI source. AI-generated suggestions are displayed like manual ones. This is the default.          |

<a id="pill">

### Pill

The `'pill'` mode adds an “AI-generated” pill to the suggestion balloon and keeps the original author’s identity:

```js
ClassicEditor
	.create( {
		/* ... */
		trackChanges: {
			showAISource: 'pill'
		}
	} )
	.then( /* ... */ )
	.catch( /* ... */ );
```

In the demo below, run a proofreading pass over the text. The AI corrections appear in the sidebar, each marked with an “AI-generated” pill while keeping the original author:

<!-- AI-AGENT-NOTE: An interactive demo is embedded here but is not represented in this Markdown file. If you need to see it in action, open this page in a browser (e.g. via a browser-automation MCP like Chrome DevTools or Playwright), or let the user know a live demo is available on this page. -->

This demo presents a limited set of AI features. Visit the [CKEditor AI overview](ckeditor-ai-overview.md#demo) to see more in action.

<a id="author">

### Author

The `'author'` mode replaces the author shown in the suggestion view (name and avatar) with a view-only AI identity. The original author is still stored in the suggestion data, so only the display changes:

```js
ClassicEditor
	.create( {
		/* ... */
		trackChanges: {
			showAISource: 'author'
		}
	} )
	.then( /* ... */ )
	.catch( /* ... */ );
```

In the demo below, run a proofreading pass over the text. The AI corrections appear in the sidebar under a view-only “AI Assistant” identity instead of the document author:

<!-- AI-AGENT-NOTE: An interactive demo is embedded here but is not represented in this Markdown file. If you need to see it in action, open this page in a browser (e.g. via a browser-automation MCP like Chrome DevTools or Playwright), or let the user know a live demo is available on this page. -->

This demo presents a limited set of AI features. Visit the [CKEditor AI overview](ckeditor-ai-overview.md#demo) to see more in action.

<a id="customizing-the-ai-author">

## Customizing the AI author

When `showAISource` is set to `'author'`, the suggestion view uses a built-in “AI Assistant” identity. Customize it with [`config.trackChanges.aiAuthor`](../../api/module_track-changes_trackchangesconfig-TrackChangesConfig.md#member-aiAuthor):

```js
ClassicEditor
	.create( {
		/* ... */
		trackChanges: {
			showAISource: 'author',
			aiAuthor: {
				name: 'Acme Assistant',
				avatar: 'https://example.com/ai-avatar.png'
			}
		}
	} )
	.then( /* ... */ )
	.catch( /* ... */ );
```

Both fields are optional: `name` defaults to `AI Assistant`, and when no `avatar` is provided, a default AI icon is shown.

<a id="marking-ai-changes-in-revision-history">

## Marking AI changes in revision history

Suggestion annotations only show the origin while a suggestion is still open. Once a suggestion is accepted, or when an AI feature writes to the document directly, the annotation is gone. [Revision history](../collaboration/revision-history/revision-history.md) keeps that information, so a reviewer can still tell which saved revisions involved AI.

Use [`config.revisionHistory.showAISource`](../../api/module_revision-history_revisionhistoryconfig-RevisionHistoryConfig.md#member-showAISource) to turn the markers on.

| Value    | Result                                                                                      |
| -------- | ------------------------------------------------------------------------------------------- |
| `'pill'` | Marks revisions and individual changes that involved AI, while keeping the original author. |
| `null`   | Hides the AI origin. Revisions are displayed like any other. This is the default.           |

```js
ClassicEditor
	.create( {
		/* ... */
		revisionHistory: {
			showAISource: 'pill'
		}
	} )
	.then( /* ... */ )
	.catch( /* ... */ );
```

With `'pill'`, revision history marks the origin in two places:

* An “Includes AI suggestions” pill appears in the revisions list next to every revision that contains at least one change or suggestion created with the help of AI features.
* When comparing revisions, an individual AI-assisted change is described with a “using AI” note and a sparkle icon, for example “Suggested by Joe using AI”.

In the demo below, run a proofreading pass over the text. The AI corrections are applied as suggestions and saved as a revision. Open the revision history with the toolbar button to see the saved revision marked with the pill, and select it to see each change described as made using AI:

<!-- AI-AGENT-NOTE: An interactive demo is embedded here but is not represented in this Markdown file. If you need to see it in action, open this page in a browser (e.g. via a browser-automation MCP like Chrome DevTools or Playwright), or let the user know a live demo is available on this page. -->

This demo presents a limited set of AI features. Visit the [CKEditor AI overview](ckeditor-ai-overview.md#demo) to see more in action.

The accepted values are a subset of [`config.trackChanges.showAISource`](../../api/module_track-changes_trackchangesconfig-TrackChangesConfig.md#member-showAISource), so you can configure both features consistently:

```js
ClassicEditor
	.create( {
		/* ... */
		trackChanges: {
			showAISource: 'pill'
		},
		revisionHistory: {
			showAISource: 'pill'
		}
	} )
	.then( /* ... */ )
	.catch( /* ... */ );
```

> **Note**
>
> The AI origin is recorded when a revision is saved, regardless of this option, which only controls whether it is displayed. Turning the option on therefore also reveals the origin in revisions saved earlier, as long as they were saved by a version of the editor that records it.

<a id="related-features">

## Related features

* [Track changes](../collaboration/track-changes/track-changes.md) – review, accept, and reject suggested changes, whether made by people or by AI.
* [Revision history](../collaboration/revision-history/revision-history.md) – browse saved revisions of the document and compare them.
* [CKEditor AI](ckeditor-ai-overview.md) – an overview of all AI features.
* [Using CKEditor AI programmatically](ckeditor-ai-programmatic.md) – drive AI features and apply their results from code.

---

Full index of the CKEditor 5 documentation: [llms.txt](../../../llms.txt)
