k8sgpt-ai / k8sgpt

Giving Kubernetes Superpowers to everyone
http://k8sgpt.ai
Apache License 2.0
5.58k stars 644 forks source link

[Feature]: Support multiple prompt styles when explaining errors #418

Open camigira opened 1 year ago

camigira commented 1 year ago

Checklist

Is this feature request related to a problem?

No

Problem Description

Currently, k8sgpt has only one prompt. It would be great to have the ability to easily modify the prompt style to cater to various audiences. This would make the tool more appealing to a wider range of users, including those with different levels of expertise in Kubernetes. By doing so, k8sgpt can assist users in understanding and resolving Kubernetes issues, and even aid in learning and enhancing their Kubernetes skills.

Solution Description

Introduce a new flag called "style" within the "analyse" command, enabling users to choose a distinct prompt style for the output generated by LLM. This enhancement provides users with the flexibility to select from various options. For instance, users can opt to have the output explained in a manner understandable to individuals unfamiliar with Kubernetes (e.g., developers with no infrastructure knowledge). Alternatively, they can choose a style suitable for non-technical individuals (e.g., managers or newcomers to the field). Additionally, users may select a more detailed output, expanded into 2-3 paragraphs for a more detailed proposed solution to a problem.

Benefits

Potential Drawbacks

No response

Additional Information

No response

AlexsJones commented 1 year ago

Sounds interesting, would you expect the prompt to be something configured via CLI? How would you envision it working?

camigira commented 1 year ago

I'm thinking to add a few prompts that will ask to reply in a specific "styles", this will basically call a different prompt where we ask the Model to explain in a specific style so the language used is appropriate for a specific persona; something like k8sgpt analyse -e -style developer. k8sgpt will use the default_prompt and this will only be an optional flag aiming to allow people from different backgrounds get onboard. I think a Spike would be the way with this idea and I'm keen to give it go, if you agree this adds value.

I was thinking of the following Personas who normally interact with Kubernetes but come from different backgrounds:

  1. DevOps Engineer: Responsible for managing the deployment, automation, and monitoring of applications on Kubernetes clusters. They work on infrastructure provisioning, configuration management, and ensuring smooth operations.

  2. Software Developer: Develops applications that run on Kubernetes, utilizing its features and capabilities. They work on containerizing applications, writing Kubernetes manifests, and optimizing application performance within the Kubernetes environment.

  3. Site Reliability Engineer (SRE): Focuses on the reliability, scalability, and performance of applications running on Kubernetes. They ensure high availability, disaster recovery, and efficient resource utilization within Kubernetes clusters.

  4. System Administrator: Manages and maintains the Kubernetes infrastructure, including cluster setup, networking, and security configurations. They handle upgrades, patches, and overall system health monitoring.

  5. Platform/Infrastructure Architect: Designs the overall architecture and infrastructure strategy for leveraging Kubernetes. They make decisions on cluster provisioning, scalability, and integration with other systems, ensuring the best utilization of Kubernetes for the organization's software applications.

  6. "newbie": Referring to someone who is new to a Kubernetes and requires additional guidance and support.

AlexsJones commented 1 year ago

We will schedule this for the next major release, currently we're aiming towards v1.0.0

shivam-Purohit commented 8 months ago

Hey @AlexsJones I wanted to start with the project, can i be any help in this ( if not done already)?

camigira commented 8 months ago

👋 @shivam-Purohit I haven't been involved with the project for a while. Perhaps @AlexsJones can guide you in the right direction? BTW: I'm also keen to work on this, I should have more time from mid Feb

VaibhavMalik4187 commented 7 months ago

Hi @camigira, I have some spare time in hand, this sounds like an interesting use case. Would you like to collaborate working on this?