-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Security Solution] [Elastic AI Assistant] Updates ES|QL Knowledge Base docs for 8.13 #176353
Conversation
Pinging @elastic/security-solution (Team: SecuritySolution) |
A documentation preview will be available soon.
Request a new doc build by commenting
If your PR continues to fail for an unknown reason, the doc build pipeline may be broken. Elastic employees can check the pipeline status here. |
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
To update your PR or re-run it, just comment with: cc @spong |
Observation: Using the
Automatic retries produce results (instead of an error), but they are not very useful, per the following example:
|
In contrast, when a user configures RAG on alerts to send the model more alerts than can fit in context, the assistant displays the following error:
|
@andrew-goldstein, thanks for pairing and reviewing the behavior above with me. I've updated the description with results from running the evaluator over a subset of the With regards to why the Based on these results, I think we should hold on updating these KB docs until we implement some prompt size management at the tool layer to improve resiliency and consistency here. We can continue the conversation over on https://github.com/elastic/security-team/issues/8087. |
Closing this PR as we're going to work the enhancements outlined over in https://github.com/elastic/security-team/issues/8087#issuecomment-1933161936 first. Hopefully by then we'll be able to ship these KB docs via integrations, and so the next KB update PR will be to remove these files instead of updating... 😀 |
Summary
Updates bundled ES|QL Knowledge Base docs for
8.13
. Previous update was performed in #169593.Update process
To update, I deleted the
x-pack/plugins/elastic_assistant/server/knowledge_base/documentation
folder contents, then copied the latest Elasticsearch ESQL documentation files over. Then ran the below script from that directory via terminal to rename all files/directories fromkebab-case
tosnake_case
as required by the Kibana repo:For the language files, I checked those manually since there are only 4 (no updates in the last 5 months).
Evaluation Results
Evaluation results of first 10 test queries from `esql_dataset.json`
Results and tracing on LangSmith are here.
As alluded to in @andrew-goldstein's comments below, the updated KB documents now contain more data than before, which is resulting in the context window being exceeded within the
ESQLKnowledgeBaseTool
chain. Instead of bubbling up the error (like with RAG on alerts), the agent completes the request as if the tool was not successful, responding e.g.Based on the above results (where 3/10 were successful, 2/10 were error, and the remaining 5/10 blew the context size and fell back to a non-tool response), it seems best to implement some prompt size management at the tool layer to improve resiliency and consistency here. Will continue conversation on https://github.com/elastic/security-team/issues/8087
Test Instructions
To test, setup the Knowledge Base as detailed in the docs. You should see the below
INFO
/DEBUG
log messages indicating the knowledge base documents were ingested and created successfully. (Note: if already installed, you must delete and re-initialize, please see elastic/security-docs#4773 for adding this note to the KB docs)Now you can ask an ES|QL query generation question to ensure functionality, and verify returned knowledge base docs in the
DEBUG
logs by searching forSimilarity search metadata source:
, e.g.