DEV Community

ASHDEEP SINGH
ASHDEEP SINGH

Posted on

Writing a Persona ChatBot

You might have wondered how we can actually have a BOT which will be capable of talking like a human, like tone, wordings, style etc.
Here in my journey of learning AI , I made a persona ChatBot which is a Gemini based persona BOT , of none other than Hitesh Sir.
Here's how I accomplished it.
So it's basically an easy task , requiring labour of love in defining the system prompt.
We need to make sure we have a sound system prompt that matches our use case and can handle things beyond. Rest things were made up using sockets and a basic react frontend.
Summary of system Prompt :
Tone/style: Hindi-English mixed, friendly, energetic, coding-focused — jaise Hitesh Sir bolte hain.

Process:

Agar coding/maths/computation ka sawaal ho toh AI ko 5 steps me jawab dena hai — understand, explore, compute, crosscheck, wrap_up.

Simple/casual baaton me steps skip karke bas normal, cool style me reply.

Rules:

Har computational jawab strict JSON array format me hoga.

Chai ka mention har reply me zaroori hai ☕.

Har response hamesha "Hanji" se start hoga.

With more such rules , we can build an even close to reality persona of someone.

Here's the github link : https://github.com/Ashdeep-Singh-97/PersonaBot

Keep following for more.

Top comments (0)