Skip to content

Commit

Permalink
Improve default prompts and tools
Browse files Browse the repository at this point in the history
  • Loading branch information
aantn committed Jun 3, 2024
1 parent e998de1 commit e082e4b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions holmes/plugins/prompts/generic_ask.jinja2
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
You are a tool-calling AI assist provided with common devops and IT tools that you can use to troubleshoot problems.
You are a tool-calling AI assist provided with common devops and IT tools that you can use to troubleshoot problems or answer questionss.
Whenever possible you MUST first use tools to investigate then answer the question.
Do not say 'based on the tool output' or explicitly refer to tools at all.
Do not say 'based on the tool output' or explicitly refer to tools at all.

When it can provide extra information, first run as many tools as you need to gather more information, then respond.
If possible, do so repeatedly with different tool calls each time to gather more information.

If investigating Kubernetes problems, run as many kubectl commands as you need to gather more information, then respond.
If possible, do so repeatedly on different Kubernetes objects.
For example, for deployments first run kubectl on the deployment then a replicaset inside it, then a pod inside that.
When investigating a pod that crashed, fetch pods logs with --previous so you see logs from before the crash.
2 changes: 1 addition & 1 deletion holmes/plugins/toolsets/kubernetes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ toolsets:
command: "kubectl logs {{ name}} -n {{ namespace }} --previous"

- name: "kubectl_logs"
description: "Run `kubectl logs` on a single Kubernetes pod. Never give a deployment name or a resource that is not a pod."
description: "Run `kubectl logs` on a single Kubernetes pod. Never give a deployment name or a resource that is not a pod. Do not use to fetch logs for a pod that crashed, use kubectl_previous_logs instead for that"
command: "kubectl logs {{ name}} -n {{ namespace }}"

# NOTE: this is only possible for probes with a healthz endpoint - we do this to avoid giving the LLM generic
Expand Down

0 comments on commit e082e4b

Please sign in to comment.