robusta-dev / kubernetes-chatgpt-bot

A ChatGPT bot for Kubernetes issues.
922 stars 103 forks source link

Prompt engineering #2

Open aantn opened 1 year ago

aantn commented 1 year ago

Copying over this idea from the reddit post :)

If anyone is curious, you can change the prompt on line 77 to tweak the answers.

For example, maybe you'll get better answers by including pod logs:

search_term=f"How to solve {alert_name} on Kubernetes when the log is {alert.pod.get_logs()}?"

Or maybe you'd prefer an answer from Captain Jack Sparrow:

search_term=f"Explain like a pirate how to solve {alert_name} on Kubernetes?"

PRs welcome!

anushkabishnoi commented 1 year ago

Hello, this is my first experience with open source contributions. Would really appreciate it if you explained exactly what is needed to be done.

I would love to work on this issue.

Thanks in advance! :)

aantn commented 1 year ago

I'd suggest getting started with the tutorial on writing Robusta actions. Then start to modify the prompt in the place mentioned above. See if you can get the bot to give different responses.

After that, ping me and we'll discuss next steps.

Pawank06 commented 1 year ago

Hey @aantn did we need to change line 77 from this: search_term=f"How to solve {alert_name} on Kubernetes when the log is {alert.pod.get_logs()}?" to this: search_term=f"Explain like a pirate how to solve {alert_name} on Kubernetes?"

please reply.

aantn commented 1 year ago

Yep, something like that! But it should be an option, based on the params object.