Skip to content

docs: document the discover-data-analysis Agent Builder skill (#6684) - #6715

Merged
florent-leborgne merged 8 commits into
mainfrom
docs-issue-6684-discover-ai-deep-analysis
Jun 8, 2026
Merged

florent-leborgne merged 8 commits into
mainfrom
docs-issue-6684-discover-ai-deep-analysis

Conversation

@florent-leborgne

@florent-leborgne florent-leborgne commented May 26, 2026 •

Copy link
Copy Markdown
Member

Summary

This PR addresses #6684 with the following changes:

  • explore-analyze/discover/discover-get-started.md: Add a new ## Analyze your data with AI section covering the discover-data-analysis skill, the {{esql}}-only scope, the auto-attached query context, and the shape-specific guidance the agent receives when a context-aware profile (logs, metrics, traces) is active. Add a one-line pointer in the existing "Context-aware data exploration" section so readers landing there discover that the active profile also tailors AI deep analysis.
  • explore-analyze/ai-features/agent-builder/builtin-skills-reference.md: Add discover-data-analysis to the Platform skills list with its assigned tools and the activation note, cross-linked to the new Discover section.
  • explore-analyze/discover/try-esql.md: Add a one-line tip after "Refine an ES|QL query by interacting with the results table" pointing to the new AI deep analysis section, so readers learning ES|QL in Discover discover the feature too.

Sibling PRs incorporated

The issue links elastic/kibana#267454 (context-aware playbook contributions). Triangulating against the implementation file at HEAD surfaced two additional sibling PRs that materially affect the user-facing behavior:

Related work

This PR is complementary to #6714, which documents AI assistance inside the {{esql}} editor (generating {{esql}} from a // comment with cmd+J, and the ✨ Fix with AI action on validation errors). Together the two PRs cover the full AI-in-{{esql}} story: #6714 helps you write or fix the query, this PR helps you analyze the results.

The two PRs introduce new anchors that don't exist on main yet, so bidirectional cross-links between them are deferred. Whichever PR merges second should add the cross-link in a small follow-up commit before merge.

Resolves

Closes #6684


AI-generated draft — created with Claude Opus 4.7.
Review all generated content for factual accuracy before merging.

Add a new "Analyze your data with AI" section to the Discover get-started
page covering the discover-data-analysis skill, its ES|QL-only scope,
auto-launch behavior, and the shape-specific guidance derived from the
active context-aware profile (logs, metrics, traces). Register the skill
in the Agent Builder built-in skills reference under Platform skills.

Co-authored-by: Cursor <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

Elastic Docs AI PR menu

Check the box to run an AI review for this pull request.

  • Review docs changes (docs-review). Status: not started.

Powered by GitHub Agentic Workflows and docs-actions. For more information, reach out to the docs team.

@github-actions

github-actions Bot commented May 26, 2026 •

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented May 26, 2026 •

Copy link
Copy Markdown
Contributor

✅ Elastic Docs Style Checker (Vale)

No issues found on modified lines!


The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale.

@stratoula stratoula left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for adding this to the docs! It is not easily discoverable!

@leemthompo leemthompo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@florent-leborgne
florent-leborgne merged commit 5c81d1c into main Jun 8, 2026
6 checks passed
@florent-leborgne
florent-leborgne deleted the docs-issue-6684-discover-ai-deep-analysis branch June 8, 2026 08:50
florent-leborgne added a commit that referenced this pull request Jun 19, 2026
…e and Discover AI analysis

Now that #6715 has merged, add the deferred cross-links: the editor AI
assistance section links to the Discover "Analyze your data with AI"
feature, and that section links back to the editor AI assistance.

Co-authored-by: Cursor <[email protected]>
florent-leborgne added a commit that referenced this pull request Jun 22, 2026
## Summary

Documents the AI-assisted authoring features in the {{esql}} editor
(preview in 9.5.0 and on Elastic Cloud Serverless) and consolidates all
LLM-backed query generation on the page into one coherent section.

### `explore-analyze/query-filter/languages/esql-kibana.md`

- Adds a top-level **Write and fix queries with AI** section
(`#esql-kibana-ai-assistance`, `preview 9.5+`) that groups every
LLM-backed entry point, with a scope-based orientation (whole query vs.
a single pipe vs. fixing errors) and a single shared requirements block
(Enterprise license + LLM connector). It has three subsections:
- **Generate a full query from natural language**
(`#esql-kibana-quick-search-nl`) — the search bar's natural-language
mode, moved here from the old search-bar section so all AI generation
lives together (anchor preserved).
- **Generate {{esql}} from a comment** (`#esql-kibana-ai-comment`,
closes #6552) — entry point, the order to follow (describe in a `//`
comment first, then press {kbd}`cmd+J`), in-editor hints, placeholder,
generating indicator, and **Keep** / **Undo** / **Replace** review
actions, with a screenshot.
- **Fix query errors with AI** (`#esql-kibana-ai-fix`, closes #6681) —
the **✨ Fix with AI** hover link and the **Replace** / **Undo** review
actions, with screenshots of the entry point and the proposed-fix review
state.
- Refocuses the former "Build queries with KQL or natural language"
section on KQL (now **Build ES|QL queries from KQL syntax**,
`#esql-kibana-quick-search`), flattening the KQL procedure and linking
out to the natural-language generator in the AI section.
- Adds a `cmd+J` / `ctrl+J` row to the **Keyboard shortcuts** table
(tagged `preview 9.5+`), pointing at the comment subsection.
- Adds a mini-TOC of the **Editor tools** subsections and explicit
heading anchors.
- Updates the page frontmatter `description` to mention AI assistance.
- In-editor hints are described in plain terms rather than quoting the
exact UI strings, which are still being refined upstream (see note
below).

### `explore-analyze/discover/discover-get-started.md`

- Adds a cross-link from Discover's **Analyze your data with AI**
section to the editor's AI assistance, completing the bidirectional link
with #6715. Together the two PRs cover the full AI-in-{{esql}} story:
this PR helps you write or fix the query, #6715 helps you analyze the
results.

## Source verification

All UI strings, shortcuts, and prerequisites verified at HEAD on
`elastic/kibana`, and confirmed against screenshots from a running
instance:

- Ghost hints —
`src/platform/packages/private/kbn-esql-editor/src/comment_to_esql/use_ghost_line_hint.ts`
- Generating indicator —
`src/platform/packages/private/kbn-esql-editor/src/editor_ai.styles.ts`
- Comment-flow review buttons (**Keep** / **Undo**, with **Keep** →
**Replace** in rewrite mode) —
`src/platform/packages/private/kbn-esql-editor/src/comment_to_esql/review_actions_widget.ts`
and `use_comment_to_esql.ts`
- Fix-flow review widget renders **Replace** / **Undo** (⌘⇧↵ / ⌘⇧⌫).
Note: `use_suggest_fix.ts` defines `Keep AI fix` / `Undo AI fix`, but
those are command-palette action labels; the visible buttons are the
shared review widget's **Replace** / **Undo**, as confirmed by
screenshot.
- **✨ Fix with AI** hover link —
`src/platform/packages/shared/kbn-monaco/src/languages/esql/lib/providers/hover_provider.ts`
- Enterprise license + LLM connector gate (shared by all features) —
`src/platform/packages/private/kbn-esql-editor/src/hooks/use_nl_to_esql_check.ts`
- ⌘+J / Ctrl+J keyboard shortcut —
`src/platform/packages/private/kbn-esql-editor/src/editor_footer/keyboard_shortcuts.tsx`

Reference PRs in `elastic/kibana`:

- elastic/kibana#256857 — `[ES|QL] Code completion driven by AI`
- elastic/kibana#269455 — `[ES|QL] Fixes with AI`

> **Related:** A follow-up Kibana PR (elastic/kibana#274210) rewords the
editor placeholder and the in-editor hints to make the "describe first,
then press ⌘+J" order clearer. This page intentionally paraphrases those
hints rather than quoting them, so it stays accurate regardless of the
exact final wording.

## Resolves

Closes #6552
Closes #6681

---

> **AI-generated draft** — created with Claude Opus 4.7.
> Review all generated content for factual accuracy before merging.

---------

Co-authored-by: Cursor <[email protected]>
Co-authored-by: Liam Thompson <[email protected]>
Co-authored-by: Arianna Laudazzi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Get context-aware AI deep analysis in Discover

3 participants