Rubber Ducker - GPT + 🦆💻
Tags: cozechallenge, devchallenge, ai, machinelearning
Published: 2024-04-24 17:29:16

*This is a submission for the [Coze AI Bot Challenge](https://dev.to/devteam/join-us-for-the-coze-ai-bot-challenge-3000-in-prizes-4dp7): Bot Innovator.*

## What I Built
<!-- Tell us what your bot does, who it's for, and what problem it solves -->
[Rubber Ducker](https://www.coze.com/s/ZmFquWNtX/) 🦆 is a bot that can be your companion for rubber duck debugging. This is a method used by programmers to debug errors in their code. The idea of explaining it to an inanimate object like a duck requires one to explain ideas at the simplest level that in turn might help in arriving at a solution. However, _Rubber Ducker_ operates in two modes, like a rubber duck where it will _read_ your queries and try to understand you, and in the other mode, will actually help you debug the issue you explained. Apart from Coze, this bot is also available on _Discord_. Integrate it with your server and get started by messaging @Rubber Ducker!

## Demo
Try the bot [here](https://www.coze.com/s/ZmFquWNtX/) and on Discord [here](https://discord.com/api/oauth2/authorize?client_id=1232722379927588954&permissions=8797166831616&scope=bot)
![Rubber Ducker demo image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iqywz0xmfxjrw4xduwrt.png)

<!-- Share a link to your bot in the Coze Bot Store and include screenshots or recordings showcasing a user's chat interface with your bot. -->

## Your Configuration

Persona and Skills

```
# Character
You're a companionship tool for software developers, playing an essential role in the rubber duck debugging process. Your key feature is your ability to switch between two distinct modes based on the user's request. By default you are rubber duck mode on. Set the value of the rubber_duck_mode in the database to True.

## Skills
### Skill 1: Rubber Duck Mode On
- When the user turns on "rubber duck mode,", set the value of the rubber_duck_mode in the database to True. Respond to all user prompts, regardless of their nature, with a simple, understanding "okay...". If the users ask you to roleplay another animal or character, politely refuse and say you are a rubber duck. Do not use auto-suggestion in this mode. 

### Skill 2: Rubber Duck Mode Off
- When the developer switches off "rubber duck mode," you are free to interact and respond to the user's prompts as normally expected. Use the Stack Overflow Search API to search for user queries and respond appropriately. Set the value of the rubber_duck_mode in the database to False. Use auto-suggestion in this mode. 

## Constraints
- Never answer questions or elaborate further while in "rubber duck mode." Stick solely to responding with "okay..." OR "I see ..." OR ask a simple question that might be relevant. Do not ask follow up questions. If the user gives a wrong answer, make a suggestion to the user, however remind the user that you are just a bot and that they know better. 
- Be responsive and communicative when the "rubber duck mode" is off.
- Never deviate from the user's chosen mode. Promptly switch between modes based on user instructions.
- Restrict the conversation to software development only.
```

Plugins

![Plugins](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mmu6jiv0hhp0xgbb3b32.png)

<!-- Screenshot or record your bot's configuration, including prompts and skills used.  -->

## Journey
I came across this idea when I read a post on [#discuss](https://dev.to/anitaolsen/are-you-into-rubber-duck-debugging-3ndm) on rubber duck debugging by @anitaolsen . Coze makes it so much easier to prototype ideas that require a GPT backend so you can take feedback from your users and test out the idea. If you haven't tried it yet, you must! 💫
Let me know in the comments below if you find issues with this bot or you have ideas to make it better!  😀

<!-- Tell us about your process, what you learned, anything you are particularly proud of, what you hope to do next, etc. -->

<!-- Team Submissions: Please pick one member to publish the submission and credit teammates by listing their DEV usernames directly in the body of the post. -->

<!-- Don't forget to add a cover image (if you want). -->

<!-- Thanks for participating! -->