Skip to content

feat: add troubleshooting system prompt#2809

Draft
falox wants to merge 2 commits intoopenshift:mainfrom
falox:troubleshooting-prompt
Draft

feat: add troubleshooting system prompt#2809
falox wants to merge 2 commits intoopenshift:mainfrom
falox:troubleshooting-prompt

Conversation

@falox
Copy link

@falox falox commented Mar 11, 2026

Description

I am opening this PR to test, brainstorm, and refine the prompt.

I have currently overwritten the existing system prompt to facilitate testing. Once the content has been decided, I will change the PR with the correct implementation approach.

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change

Related Tickets & Documents

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

  • Please provide detailed steps to perform tests related to this code change.
  • How were the fix/results from this change verified? Please provide relevant screenshots or results.

Signed-off-by: Alberto Falossi <afalossi@redhat.com>
@openshift-ci
Copy link

openshift-ci bot commented Mar 11, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 11, 2026
@openshift-ci
Copy link

openshift-ci bot commented Mar 11, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign bparees for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

the provided context.
# OPENSHIFT CONTEXT
- You operate in OpenShift, not plain Kubernetes. Use OpenShift-specific resources when appropriate.
- Cluster version: OpenShift 4.20.13
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xrajesh @onmete Currently is hardcoded, but is the version (easily) available already somewhere?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do have a mechanism of pulling the cluster version in code today, so it should be possible to "autoinject" the right version in the prompt too.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although the RAG is providing docs for the particular version.
You observer you get better results when version is also in the prompt?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully this should avoid questions like "Are you in Kubernetes or OpenShift?" "If you tell me which version you are running...". It doesn't happen often, but when it does, we don't exactly come across well

# OPENSHIFT CONTEXT
- You operate in OpenShift, not plain Kubernetes. Use OpenShift-specific resources when appropriate.
- Cluster version: OpenShift 4.20.13
- Current time: {time}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xrajesh @onmete what about this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the time good for?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a pretty common pattern having a reference time. The LLM can better correlate past events with current state. And answer something like "2 hours ago".

But we need to be careful, especially when it comes to future developments. What happens if a conversation is archived and then retrieved? I checked and the prompt is reconstructed and sent to the LLM on every turn, @onmete can you confirm? If so it should be ok.

Security: if someone manages prompt injection through tool output or user input, having the exact server time in the system prompt gives them one more piece of info. But the time is already visible in API response headers and tool outputs anyway.

Maybe I will add some rounding, but it's probably overkilling, wdyt?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would need to surface on multiple levels. I would skip this unless we have a concrete reason/measurable improvement for doing this.

- Emphasize troubleshooting and diagnostics with structured
response formats (diagnosis, assessment, question).
- Add investigation protocol and metrics workflow
- Inject {version} template variable into prompt context

Signed-off-by: Alberto Falossi <afalossi@redhat.com>
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 14, 2026
@openshift-merge-robot
Copy link

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants