Skip to content

[Obs AI] Remove getRelevantAlertFields from get_alerts tool#248472

Merged
viduni94 merged 5 commits intoelastic:mainfrom
viduni94:fix-selectedfields-from-alert-tool
Jan 9, 2026
Merged

[Obs AI] Remove getRelevantAlertFields from get_alerts tool#248472
viduni94 merged 5 commits intoelastic:mainfrom
viduni94:fix-selectedfields-from-alert-tool

Conversation

@viduni94
Copy link
Contributor

@viduni94 viduni94 commented Jan 9, 2026

Closes https://github.com/elastic/obs-ai-team/issues/460

Summary

This PR includes the following updates to the get_alerts tool

  1. Removed fetching selected fields. These fields don't serve any purpose at the moment.
  2. Removed the system prompt for the tool
  3. Filtered the alert document field using DEFAULT_FIELDS to reduce noise.
  4. Added new tests and updated existing tests to not use the LLM proxy

Checklist

  • Unit or functional tests were updated or added to match the most common scenarios
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

@viduni94 viduni94 self-assigned this Jan 9, 2026
@viduni94 viduni94 requested a review from a team as a code owner January 9, 2026 15:13
@viduni94 viduni94 added release_note:skip Skip the PR/issue when compiling release notes backport:version Backport to applied version labels v9.3.0 Team:obs-ai Observability AI team v9.4.0 labels Jan 9, 2026
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ai-team (Team:obs-ai)

@sorenlouv sorenlouv changed the title [Obs AI] Update get_alerts tool [Obs AI] Remove getRelevantAlertFields from get_alerts tool Jan 9, 2026
@elasticmachine
Copy link
Contributor

elasticmachine commented Jan 9, 2026

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #47 / Cloud Security Posture Security Network Page - Graph visualization ECS fields only expanded flyout - entity enrichment for multiple actors and targets
  • [job] [logs] FTR Configs #127 / Dataset Quality Dataset quality handles user privileges User can read logs-* User can monitor some data streams "View dashboards" is hidden for underprivileged user
  • [job] [logs] FTR Configs #103 / saved objects tagging - functional tests feature controls base write privileges can bulk delete tags
  • [job] [logs] FTR Configs #49 / Serverless Observability feature flag testing - Deployment-agnostic Observability Agent Builder API integration tests Observability Agent tool: observability.get_alerts when using includeRecovered parameter includes recovered alerts when includeRecovered is true
  • [job] [logs] FTR Configs #49 / Serverless Observability feature flag testing - Deployment-agnostic Observability Agent Builder API integration tests Observability Agent tool: observability.get_alerts when using includeRecovered parameter includes recovered alerts when includeRecovered is true

Metrics [docs]

✅ unchanged

History

cc @viduni94

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#10392

[✅] x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/serverless/oblt.ai_agent.serverless.config.ts: 25/25 tests passed.
[✅] x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/stateful/oblt.ai_agent.stateful.config.ts: 25/25 tests passed.

see run history

@viduni94 viduni94 enabled auto-merge (squash) January 9, 2026 21:03
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

cc @viduni94

@viduni94 viduni94 merged commit 63354fe into elastic:main Jan 9, 2026
13 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 9.3

https://github.com/elastic/kibana/actions/runs/20866115368

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
9.3 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 248472

Questions ?

Please refer to the Backport tool documentation

@viduni94
Copy link
Contributor Author

viduni94 commented Jan 9, 2026

💚 All backports created successfully

Status Branch Result
9.3

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

viduni94 added a commit to viduni94/kibana that referenced this pull request Jan 9, 2026
…tic#248472)

Closes elastic/obs-ai-team#460

## Summary

This PR includes the following updates to the `get_alerts` tool

1. Removed fetching selected fields. These fields don't serve any
purpose at the moment.
2. Removed the system prompt for the tool
3. Filtered the alert document field using `DEFAULT_FIELDS` to reduce
noise.
4. Added new tests and updated existing tests to not use the LLM proxy

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

(cherry picked from commit 63354fe)

# Conflicts:
#	x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/observability_agent_builder/tools/get_alerts.spec.ts
#	x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/observability_agent_builder/utils/llm_proxy/scenarios.ts
viduni94 added a commit that referenced this pull request Jan 10, 2026
…#248472) (#248552)

# Backport

This will backport the following commits from `main` to `9.3`:
- [[Obs AI] Remove `getRelevantAlertFields` from `get_alerts` tool
(#248472)](#248472)

<!--- Backport version: 10.2.0 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Viduni
Wickramarachchi","email":"viduni.wickramarachchi@elastic.co"},"sourceCommit":{"committedDate":"2026-01-09T21:30:05Z","message":"[Obs
AI] Remove `getRelevantAlertFields` from `get_alerts` tool
(#248472)\n\nCloses
https://github.com/elastic/obs-ai-team/issues/460\n\n## Summary\n\nThis
PR includes the following updates to the `get_alerts` tool\n\n1. Removed
fetching selected fields. These fields don't serve any\npurpose at the
moment.\n2. Removed the system prompt for the tool\n3. Filtered the
alert document field using `DEFAULT_FIELDS` to reduce\nnoise.\n4. Added
new tests and updated existing tests to not use the LLM proxy\n\n###
Checklist\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"63354fe1f0bd0a4b914897ea7f3a83f4528b2834","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","v9.3.0","Team:obs-ai","v9.4.0"],"title":"[Obs
AI] Remove `getRelevantAlertFields` from `get_alerts`
tool","number":248472,"url":"https://github.com/elastic/kibana/pull/248472","mergeCommit":{"message":"[Obs
AI] Remove `getRelevantAlertFields` from `get_alerts` tool
(#248472)\n\nCloses
https://github.com/elastic/obs-ai-team/issues/460\n\n## Summary\n\nThis
PR includes the following updates to the `get_alerts` tool\n\n1. Removed
fetching selected fields. These fields don't serve any\npurpose at the
moment.\n2. Removed the system prompt for the tool\n3. Filtered the
alert document field using `DEFAULT_FIELDS` to reduce\nnoise.\n4. Added
new tests and updated existing tests to not use the LLM proxy\n\n###
Checklist\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"63354fe1f0bd0a4b914897ea7f3a83f4528b2834"}},"sourceBranch":"main","suggestedTargetBranches":["9.3"],"targetPullRequestStates":[{"branch":"9.3","label":"v9.3.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/248472","number":248472,"mergeCommit":{"message":"[Obs
AI] Remove `getRelevantAlertFields` from `get_alerts` tool
(#248472)\n\nCloses
https://github.com/elastic/obs-ai-team/issues/460\n\n## Summary\n\nThis
PR includes the following updates to the `get_alerts` tool\n\n1. Removed
fetching selected fields. These fields don't serve any\npurpose at the
moment.\n2. Removed the system prompt for the tool\n3. Filtered the
alert document field using `DEFAULT_FIELDS` to reduce\nnoise.\n4. Added
new tests and updated existing tests to not use the LLM proxy\n\n###
Checklist\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"63354fe1f0bd0a4b914897ea7f3a83f4528b2834"}}]}]
BACKPORT-->
devamanv pushed a commit to devamanv/kibana that referenced this pull request Jan 12, 2026
…tic#248472)

Closes elastic/obs-ai-team#460

## Summary

This PR includes the following updates to the `get_alerts` tool

1. Removed fetching selected fields. These fields don't serve any
purpose at the moment.
2. Removed the system prompt for the tool
3. Filtered the alert document field using `DEFAULT_FIELDS` to reduce
noise.
4. Added new tests and updated existing tests to not use the LLM proxy

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:obs-ai Observability AI team v9.3.0 v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments