
Implementing a friendly persona in Google Chatbot — User name greeting and emoji utilization in Gemini's system prompt
This page has been translated by machine translation. View original
Introduction
I'm running a RAG-based internal IT support bot that operates on Google Chat. Built with Gemini + Vertex AI RAG Engine, this bot returns accurate answers based on a knowledge base — but there was one issue.
The answers are accurate, but cold.
When you ask "My VPN won't connect," it returns steps in a matter-of-fact way. Correct, but it feels like reading a manual. For something people use every day as an internal tool, I wanted a bit more "approachability."
So I tried implementing a friendlier persona for the bot.
Approach: "Polite and friendly, but not overly cheerful"
When I researched chatbot persona design, one warning consistently came up:
Over-humanizing creates expectations the system cannot meet.
In other words, making a bot too cheerful creates the expectation that you're talking to a human — and when it fails to meet that expectation (e.g., when information isn't in the knowledge base), the disappointment is greater.
Especially in an IT support context, users are coming in frustrated — VPN won't connect, printer isn't working. Responding with "🎉 What a great question!" would backfire.
So I established the following approach:
- Place warmth at the boundaries — greetings, follow-up hints, escalation guidance
- Keep the technical answer body clean — no emoji, steps kept concise
- Address users by name — but only once, at the start
Implementation
1. Retrieve the username from the Google Chat API
The Google Chat event payload includes sender.displayName. I was already retrieving this, but only using it for logging.
sender_obj = message.get("sender", {})
sender = sender_obj.get("displayName", "someone")
I'll now pass this sender (display name) into the RAG generation pipeline.
2. Add user information to the Gemini generation template
I added a {sender} placeholder to the generation template so Gemini can recognize the user's name.
GENERATION_TEMPLATE = """\
Please answer the user's question based on the following knowledge base information.
## User Information
Name: {sender}
## Knowledge Base Search Results
{context}
## User's Question
{question}
## Answer
"""
I'll add the same to the template for when there's conversation history (GENERATION_TEMPLATE_WITH_HISTORY).
3. Adjust tone instructions in the system prompt
This is the core of this implementation. I changed the tone section of the system prompt as follows:
Before:
## Tone
- Polite but concise (formal Japanese style)
- Use technical terms as-is (staff are assumed to understand IT terminology)
After:
## Tone
- Polite and friendly (formal Japanese style)
- In the first response in a thread, start by addressing the user as "{sender}さん、" before the answer
- For follow-ups (when conversation history exists), no need to address by name
- Use technical terms as-is (staff are assumed to understand IT terminology)
- Do not use emoji in the answer body (keep procedure and step explanations clean)
- Light emoji may be used in supplementary lines at the end, such as escalation guidance (🙏, etc.)
The key point is explicitly stating both what to do and what not to do. Without instructions, an LLM might interpret "be friendly" broadly and scatter emoji throughout the answer. By explicitly stating "do not use emoji in the answer body," I'm keeping warmth within controlled boundaries.
4. Pass sender to generate_answer()
I add a sender parameter to the RAG pipeline's generation function.
def generate_answer(question: str, contexts: list[dict],
history: list[dict] | None = None,
sender: str = "") -> RagAnswer:
# ...
if history:
prompt = GENERATION_TEMPLATE_WITH_HISTORY.format(
sender=sender, history=history_str,
context=context_str, question=question,
)
else:
prompt = GENERATION_TEMPLATE.format(
sender=sender, context=context_str, question=question,
)
From the worker, simply pass sender.
result = generate_answer(user_text, contexts, history=history or None,
sender=sender)
5. Add emoji to the welcome card
I added emoji to section headers on the welcome card that appears when the bot is added to a space or when the /help command is used.
{"header": "💻 Support Scope", "widgets": [...]},
{"header": "💬 How to Use", "widgets": [...]},
{"header": "📝 Example Questions", "widgets": [...]},
These are UI "decorations," so emoji fit naturally here.
6. Soften the escalation text
I also made the escalation guidance shown when information isn't in the knowledge base a little warmer.
Before:
Please contact the relevant department (Google Chat or helpdesk@example.com).
After:
Please feel free to contact the relevant department (Google Chat or helpdesk@example.com) 🙏
The addition of "feel free to" and the 🙏 at the end conveys both "sorry we couldn't answer" and "encouragement toward the next action."
Results
Here's how the bot behaves after the changes:
First question:
User: My VPN won't connect
Bot: Tanaka-san, for VPN connection troubleshooting, please try the following.
- Restart the VPN client.
- Check the status of your Wi-Fi or wired LAN connection.
If the above doesn't resolve the issue, please feel free to contact the relevant department (Google Chat or helpdesk@example.com) 🙏
💡 You can also ask additional questions in this thread (within 24 hours)
Follow-up question (within the same thread):
User: What if it still won't connect?
Bot: Please try uninstalling and reinstalling the VPN client.
- Open Control Panel → Uninstall a program.
- ...
No name address in the follow-up. No emoji in the answer body. Technical content stays clean.
Emoji Placement Strategy Summary

| Location | Emoji | Reason |
|---|---|---|
| Answer body (steps/explanations) | ❌ Not used | Prioritize readability of technical information |
| Pipeline status indicators | ✅⏳❌⬜ | Already used as UI elements |
| Welcome card headers | 💻💬📝 | Natural as visual navigation |
| Follow-up hints | 💡 | UI element to prompt action |
| Escalation guidance | 🙏 | Expressing warmth and apology |
Summary
Here are the key points when adding "friendliness" to a chatbot:
- Addressing by name is powerful, but once is enough. Repeating it every time increases the robotic feel
- Manage emoji by "location." Place them at UI boundaries (greetings, hints, escalation) rather than in the answer body
- Explicitly state what not to do. LLMs tend to over-interpret "be friendly." Writing "do not use emoji in the answer body" keeps the scope under control
- Match the persona to the context. When the audience is "users who are struggling," as in IT support, aim for "reassurance" rather than "cheerfulness"
The implementation itself is a small change, but it moves from "accurate but cold" to "accurate and a little warm." This can be achieved without sacrificing technical accuracy.
