Commit b644e55
[Obs AI Assistant] aware of new .integration_knowledge* system index (elastic#237085)
Closes elastic/obs-ai-team#357
## Summary
This PR adds the awareness of `.integration_knowledge*` index as another
index for recalling. The Obs AI Assistant will retrieve integration
knowledge from the index
Value added to the Obs AI Assistant
(elastic/obs-ai-team#357 (comment)):
> The assistant will become aware of LLM-facing documentation for any
installed integrations in the user's cluster. For example, the Logstash
integration might ship documentation that explains how to understand the
health reporting metrics collected by the integration and the assistant
could answer prompts like "why was my logstash server down yesterday?"
using the user's real data.
Manual Testing:
1 -> Follow the instructions from
elastic#230107 (comment):
> 1. If elastic/elasticsearch#132506 has been
merged, run `yarn es snapshot` in Kibana, otherwise, checkout that
branch in your local ES and then in kibana run `yarn es source` in order
to use that version of ES which contains the index management, mappings,
etc.
>2. Install a package with any number of knowledge base docs in the
`docs/knowledge_base` folder. You can use [this sample
package](https://github.com/user-attachments/files/21867395/masonstestpackage-0.0.1.zip),
or create your own following the guide below:
>
> - Using `elastic-package`, create a new package using `elastic-package
create integration`
- Once created add `knowledge_base` as a folder inside of the generated
`docs` folder of the integration
- Add an arbitrary amount of `.md` files to the knowledge_base folder
- Run `elastic-package build` to build the package
- There are a lot of different options for installing the package in a
local kibana instance. I prefer to just take the generated .zip folder
from `/build` in `elastic-package` and upload it to kibana using the
custom integrations feature. You can also expose the package registry,
or whatever you see fit.
>3. Watch the Kibana logs for errors/debug messages etc
>4. Use the new endpoint or just directly check the index using `GET
/.integration_knowledge/_search` to verify that the documents are
ingested into the system index of `.integration_knowledge`
>5. Update the package and verify that the KB documents are updated by
checking the response again, they should have the updated pkgVersion on
the associated docs.
>6. Remove the package and then verify (using the endpoint) that the
docs are removed from the index
2 - Ask the AI Assistant about information contained in the integration
documents
3- check that the documents are listed on the response of executed the
function context inside learnings
### Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.
### Identify risks
Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.
Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.
- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...
---------
Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Sandra G <[email protected]>1 parent 8f793a7 commit b644e55
File tree
2 files changed
+95
-26
lines changed2 files changed
+95
-26
lines changedLines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
Lines changed: 86 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
| |||
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
| 43 | + | |
| 44 | + | |
39 | 45 | | |
40 | 46 | | |
41 | 47 | | |
| |||
112 | 118 | | |
113 | 119 | | |
114 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
115 | 160 | | |
116 | 161 | | |
117 | 162 | | |
| |||
137 | 182 | | |
138 | 183 | | |
139 | 184 | | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
164 | 221 | | |
165 | 222 | | |
166 | 223 | | |
167 | 224 | | |
168 | 225 | | |
169 | 226 | | |
170 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
171 | 231 | | |
172 | 232 | | |
173 | | - | |
| 233 | + | |
174 | 234 | | |
175 | 235 | | |
176 | 236 | | |
| |||
0 commit comments