Skip to content

[Obs AI Assistant] Add KB user instructions #187607

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

Merged
merged 47 commits into from
Aug 19, 2024

Conversation

sorenlouv
Copy link
Member

@sorenlouv sorenlouv commented Jul 4, 2024

Related to: https://github.com/elastic/obs-ai-assistant-team/issues/157

This makes user instructions available in the UI which makes it possible for end users to create instructions that are appended to the system prompt. Technically the system supports multiple instructions per user, but for now we limit it to a single instruction per user.

From a technical perspective:
User instructions are stored in the knowledge base. They are included in the system prompt if they fit within the token budget. They are different from the existing "contextual" entries that are only included in the context function response (aka not the system message) and only if they semantically matches the user's prompt.

Screenshots

"Edit system prompt" button
image

"Edit system prompt" flyout
image

haiku-prompt.mp4

@obltmachine
Copy link

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@sorenlouv
Copy link
Member Author

buildkite test this

@sorenlouv sorenlouv force-pushed the kb-user-instructions branch from fff5f21 to f54af02 Compare July 4, 2024 22:58
@sorenlouv sorenlouv marked this pull request as ready for review July 5, 2024 07:06
@sorenlouv sorenlouv requested a review from a team as a code owner July 5, 2024 07:06
@botelastic botelastic bot added ci:project-deploy-observability Create an Observability project Team:Obs AI Assistant Observability AI Assistant labels Jul 5, 2024
sorenlouv added 3 commits July 5, 2024 13:26
…tions

# Conflicts:
#	x-pack/plugins/observability_solution/observability_ai_assistant/server/service/knowledge_base_service/index.ts
@sorenlouv
Copy link
Member Author

buildkite test this

@sorenlouv sorenlouv requested a review from a team as a code owner July 9, 2024 09:45
@elasticmachine
Copy link
Contributor

elasticmachine commented Jul 9, 2024

💔 Build Failed

Failed CI Steps

History

@sorenlouv sorenlouv enabled auto-merge (squash) August 15, 2024 14:41
@kibana-ci
Copy link
Collaborator

kibana-ci commented Aug 19, 2024

💛 Build succeeded, but was flaky

  • Buildkite Build
  • Commit: 465b77b
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-187607-465b77bdd322

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #12 / Visualizations - Group 3 lens app - TSVB Open in Lens Dashboard to TSVB to Lens should convert a by reference TSVB viz to a Lens viz

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
observabilityAiAssistantManagement 136 139 +3

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
observabilityAIAssistant 288 292 +4

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
observabilityAIAssistantApp 150.2KB 150.2KB -18.0B
observabilityAiAssistantManagement 87.5KB 91.5KB +4.0KB
total +4.0KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
observabilityAIAssistant 26 27 +1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
observabilityAIAssistant 46.8KB 47.0KB +213.0B
observabilityAiAssistantManagement 4.8KB 4.8KB +48.0B
total +261.0B
Unknown metric groups

API count

id before after diff
observabilityAIAssistant 290 294 +4

References to deprecated APIs

id before after diff
observabilityAIAssistantApp 1 0 -1

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@sorenlouv sorenlouv merged commit e9f23aa into elastic:main Aug 19, 2024
23 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Aug 19, 2024
@sorenlouv sorenlouv deleted the kb-user-instructions branch August 20, 2024 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting ci:project-deploy-observability Create an Observability project release_note:enhancement Team:Obs AI Assistant Observability AI Assistant v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants