Commit 521a5ff
[SigEvents] Add description to KI (Knowledge Indicators) queries (elastic#257457)
## 📓 Summary
This PR adds a `description` field to significant event queries so that
each query carries a natural-language explanation of what it detects and
why it matters. The LLM now generates descriptions alongside queries
during the AI generation flow, and users can view and edit descriptions
through the manual creation form, the generated event preview, and the
discovery query details flyout.
Existing queries without a description are migrated on read via the
storage adapter's `migrateSource` callback, which back-fills an empty
string.
## 🧪 Testing
- Create a significant event manually via the stream detail flyout and
verify the description field appears, can be filled in, and is persisted
after save.
- Trigger AI generation and confirm generated queries include
descriptions visible in the expanded preview; edit a description and
verify the change is saved.
- Open an existing query (created before this change) in the discovery
details flyout and confirm it shows an empty description placeholder
without errors; edit and save a description from there.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
## Release Notes
* **New Features**
* Added description field to queries throughout the system, allowing
users to provide contextual information about what each query detects
and why it matters.
* Enabled editing and viewing of query descriptions in UI components
including forms, flyouts, and detail panels.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Nicolas Ruflin <ruflin@elastic.co>1 parent 08d5b6e commit 521a5ff
27 files changed
Lines changed: 259 additions & 38 deletions
File tree
- oas_docs/output
- x-pack/platform
- test/api_integration_deployment_agnostic/apis/streams
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62175 | 62175 | | |
62176 | 62176 | | |
62177 | 62177 | | |
| 62178 | + | |
| 62179 | + | |
62178 | 62180 | | |
62179 | 62181 | | |
62180 | 62182 | | |
| |||
62199 | 62201 | | |
62200 | 62202 | | |
62201 | 62203 | | |
| 62204 | + | |
62202 | 62205 | | |
62203 | 62206 | | |
62204 | 62207 | | |
| |||
62267 | 62270 | | |
62268 | 62271 | | |
62269 | 62272 | | |
| 62273 | + | |
| 62274 | + | |
62270 | 62275 | | |
62271 | 62276 | | |
62272 | 62277 | | |
| |||
62291 | 62296 | | |
62292 | 62297 | | |
62293 | 62298 | | |
| 62299 | + | |
62294 | 62300 | | |
62295 | 62301 | | |
62296 | 62302 | | |
| |||
62366 | 62372 | | |
62367 | 62373 | | |
62368 | 62374 | | |
| 62375 | + | |
| 62376 | + | |
62369 | 62377 | | |
62370 | 62378 | | |
62371 | 62379 | | |
| |||
62390 | 62398 | | |
62391 | 62399 | | |
62392 | 62400 | | |
| 62401 | + | |
62393 | 62402 | | |
62394 | 62403 | | |
62395 | 62404 | | |
| |||
62458 | 62467 | | |
62459 | 62468 | | |
62460 | 62469 | | |
| 62470 | + | |
| 62471 | + | |
62461 | 62472 | | |
62462 | 62473 | | |
62463 | 62474 | | |
| |||
62482 | 62493 | | |
62483 | 62494 | | |
62484 | 62495 | | |
| 62496 | + | |
62485 | 62497 | | |
62486 | 62498 | | |
62487 | 62499 | | |
| |||
62557 | 62569 | | |
62558 | 62570 | | |
62559 | 62571 | | |
| 62572 | + | |
| 62573 | + | |
62560 | 62574 | | |
62561 | 62575 | | |
62562 | 62576 | | |
| |||
62581 | 62595 | | |
62582 | 62596 | | |
62583 | 62597 | | |
| 62598 | + | |
62584 | 62599 | | |
62585 | 62600 | | |
62586 | 62601 | | |
| |||
63497 | 63512 | | |
63498 | 63513 | | |
63499 | 63514 | | |
| 63515 | + | |
| 63516 | + | |
63500 | 63517 | | |
63501 | 63518 | | |
63502 | 63519 | | |
| |||
63521 | 63538 | | |
63522 | 63539 | | |
63523 | 63540 | | |
| 63541 | + | |
63524 | 63542 | | |
63525 | 63543 | | |
63526 | 63544 | | |
| |||
63628 | 63646 | | |
63629 | 63647 | | |
63630 | 63648 | | |
| 63649 | + | |
| 63650 | + | |
| 63651 | + | |
63631 | 63652 | | |
63632 | 63653 | | |
63633 | 63654 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66633 | 66633 | | |
66634 | 66634 | | |
66635 | 66635 | | |
| 66636 | + | |
| 66637 | + | |
66636 | 66638 | | |
66637 | 66639 | | |
66638 | 66640 | | |
| |||
66657 | 66659 | | |
66658 | 66660 | | |
66659 | 66661 | | |
| 66662 | + | |
66660 | 66663 | | |
66661 | 66664 | | |
66662 | 66665 | | |
| |||
66725 | 66728 | | |
66726 | 66729 | | |
66727 | 66730 | | |
| 66731 | + | |
| 66732 | + | |
66728 | 66733 | | |
66729 | 66734 | | |
66730 | 66735 | | |
| |||
66749 | 66754 | | |
66750 | 66755 | | |
66751 | 66756 | | |
| 66757 | + | |
66752 | 66758 | | |
66753 | 66759 | | |
66754 | 66760 | | |
| |||
66824 | 66830 | | |
66825 | 66831 | | |
66826 | 66832 | | |
| 66833 | + | |
| 66834 | + | |
66827 | 66835 | | |
66828 | 66836 | | |
66829 | 66837 | | |
| |||
66848 | 66856 | | |
66849 | 66857 | | |
66850 | 66858 | | |
| 66859 | + | |
66851 | 66860 | | |
66852 | 66861 | | |
66853 | 66862 | | |
| |||
66916 | 66925 | | |
66917 | 66926 | | |
66918 | 66927 | | |
| 66928 | + | |
| 66929 | + | |
66919 | 66930 | | |
66920 | 66931 | | |
66921 | 66932 | | |
| |||
66940 | 66951 | | |
66941 | 66952 | | |
66942 | 66953 | | |
| 66954 | + | |
66943 | 66955 | | |
66944 | 66956 | | |
66945 | 66957 | | |
| |||
67015 | 67027 | | |
67016 | 67028 | | |
67017 | 67029 | | |
| 67030 | + | |
| 67031 | + | |
67018 | 67032 | | |
67019 | 67033 | | |
67020 | 67034 | | |
| |||
67039 | 67053 | | |
67040 | 67054 | | |
67041 | 67055 | | |
| 67056 | + | |
67042 | 67057 | | |
67043 | 67058 | | |
67044 | 67059 | | |
| |||
67955 | 67970 | | |
67956 | 67971 | | |
67957 | 67972 | | |
| 67973 | + | |
| 67974 | + | |
67958 | 67975 | | |
67959 | 67976 | | |
67960 | 67977 | | |
| |||
67979 | 67996 | | |
67980 | 67997 | | |
67981 | 67998 | | |
| 67999 | + | |
67982 | 68000 | | |
67983 | 68001 | | |
67984 | 68002 | | |
| |||
68086 | 68104 | | |
68087 | 68105 | | |
68088 | 68106 | | |
| 68107 | + | |
| 68108 | + | |
| 68109 | + | |
68089 | 68110 | | |
68090 | 68111 | | |
68091 | 68112 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
86 | 91 | | |
87 | 92 | | |
88 | 93 | | |
| |||
105 | 110 | | |
106 | 111 | | |
107 | 112 | | |
108 | | - | |
| 113 | + | |
109 | 114 | | |
110 | 115 | | |
111 | 116 | | |
| |||
Lines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
117 | | - | |
| 118 | + | |
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
| |||
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
155 | | - | |
| 156 | + | |
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
159 | 160 | | |
160 | 161 | | |
161 | | - | |
162 | | - | |
163 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
| 165 | + | |
166 | 166 | | |
167 | 167 | | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
| 59 | + | |
57 | 60 | | |
58 | 61 | | |
59 | 62 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| |||
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
| 69 | + | |
67 | 70 | | |
68 | 71 | | |
69 | 72 | | |
| |||
79 | 82 | | |
80 | 83 | | |
81 | 84 | | |
| 85 | + | |
82 | 86 | | |
83 | 87 | | |
84 | 88 | | |
| |||
120 | 124 | | |
121 | 125 | | |
122 | 126 | | |
| 127 | + | |
123 | 128 | | |
124 | 129 | | |
125 | 130 | | |
| |||
0 commit comments