> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ravenna.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate KB articles

> Turn resolved tickets into draft KB articles using AI, generated from Slack reactions or the Admin.

You can turn ticket conversations into draft knowledge base articles using AI. This turns real questions into reusable documentation.

There are two ways to generate a KB article:

* React with the 🧠 emoji on a Slack message.
* Use the **Generate KB Article** action on a ticket in the Admin.

## Generation methods

### From Slack with 🧠

Add the 🧠 (`:brain:`) emoji reaction to any Slack message to generate a KB article from that thread.

1. Find a Slack thread that contains a question and an answer worth capturing.
2. React to the **original channel message** (not a thread reply) with 🧠.
3. You see an ephemeral message confirming that knowledge generation has started.

If the thread does not already have a ticket, Ravenna creates one automatically before generating the article. If a ticket already exists for the thread, Ravenna uses it.

If you react with 🧠 on a thread that has already produced a KB article, Ravenna updates the existing article with the latest conversation instead of creating a duplicate. The confirmation message indicates whether a new article was created or an existing one was updated.

<Note>
  Emoji actions only trigger on the original message in a channel. Reacting to a reply inside a thread does not trigger article generation.
</Note>

<Callout icon="link" color="#6B7280">Learn more about [Emoji actions](/integrations/slack/emoji-actions)</Callout>

<Note>
  Microsoft Teams: the 🧠 (`:brain:`) reaction is **not** in the [Microsoft Teams emoji action set](/integrations/microsoft-teams/emoji-actions) (currently ✅ ❌ 📖 👀 👎). Generate KB articles from Teams threads using the Admin instead.
</Note>

### From a ticket in the Admin

You can generate or regenerate a KB article from any ticket in the Admin.

1. Open the ticket in Ravenna.
2. Click the **⋯** (more) menu on the ticket.
3. Select **Generate KB Article**.
4. The **Create KB Article** dialog opens and starts generation automatically.
5. When generation completes, click the article preview to open and edit it in your knowledge base.

If a KB article already exists for the ticket, the dialog shows the existing article and offers a **Regenerate** option.

## How generation works

The generation workflow:

1. **Enriches the conversation** with ticket metadata and message context.
2. **Segments the conversation** into question-and-answer exchanges and identifies bot failures.
3. **Classifies knowledge gaps** to determine which exchanges represent missing documentation.
4. **Generates article sections** from the identified gaps, using ticket context.
5. **Saves the article** to your knowledge base and ingests it for search.
6. **Notifies the requester** when the article is ready.

Generated articles are drafts. Review and edit them in your knowledge base before relying on them for agent answers.

### Generation states

The generation dialog reflects the current status:

| State        | Description                                                                                  |
| ------------ | -------------------------------------------------------------------------------------------- |
| Initializing | Article generation has been requested but not yet queued.                                    |
| Queued       | The generation job is waiting to run.                                                        |
| Generating   | The workflow is running. A progress bar shows completion percentage.                         |
| Completed    | The article is ready. A preview and link to the KB are shown.                                |
| Failed       | The workflow could not complete. Try regenerating, or contact support if the issue persists. |

<Note>
  Generation may finish without producing an article if the conversation does not contain a clear knowledge gap. For example, the bot may have already answered correctly, or the thread may not have added any new information.
</Note>

## After generation

* New articles land in your knowledge base and are immediately searchable by agents that have access to the parent folder.
* Edit the article to refine wording, add screenshots, or link to related content.
* Archive or delete the draft if it is not useful. The source ticket remains unchanged.
* For tickets, the **Generate KB Article** action becomes **Regenerate KB Article** once an article exists.

## Programmatic generation

You can also trigger KB article generation via the API:

* [Generate a KB article from a ticket conversation](/api/ticket/generate-a-kb-article-from-a-ticket-conversation)
* [Get unified KB article status](/api/ticket/get-unified-kb-article-status-including-existing-articles-and-job-progress)
