Skip to content
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

[Feature]: Improve Default Prompt #417

Closed
2 tasks done
camigira opened this issue May 15, 2023 · 0 comments · Fixed by #406
Closed
2 tasks done

[Feature]: Improve Default Prompt #417

camigira opened this issue May 15, 2023 · 0 comments · Fixed by #406

Comments

@camigira
Copy link
Contributor

Checklist

  • I've searched for similar issues and couldn't find anything matching
  • I've discussed this feature request in the K8sGPT Slack and got positive feedback

Is this feature request related to a problem?

Yes

Problem Description

Currently, the prompt used by the tool doesn't prevent "Prompt Manipulation" where inputs like language or error messages could be used to totally change the intention of the prompt. It also doesn't specify a length for the reply, not being able to define a max number of tokens that can be expensive.

Solution Description

  • Prevent prompt injection by being specific on what is the “variable” text.
  • Keep it concise, no more than 280 characters (like a tweet)
  • Clear output format: Error and Proposed Solution.
default_prompt = `Simplify the following Kubernetes error message delimited by triple dashes written in --- %s --- language; --- %s ---.
	Provide the most possible solution in a step by step style in no more than 280 characters. Write the output in the following format:
	Error: {Explain error here}
	Solution: {Step by step solution here}
	`

Benefits

  • Security
  • Limit tokens
  • Reliable/Expected output format.

Potential Drawbacks

No response

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant