What You Will Learn
In this lesson, you will learn:
- Why a welcome screen improves user experience in a Python CLI Interface
- How to design a clean Command Line Chatbot UI
- How to display the active AI personality in your chatbot
- How to show available commands every time the chatbot starts
By the end of this lesson, your chatbot will feel like a real Python Terminal Application instead of a basic script.
Quick Answer
A welcome screen is the first interface users see when they launch your chatbot. It introduces your AI assistant, shows important information, and explains how to interact with it. Most professional terminal applications use an AI Assistant Banner or welcome screen to improve usability.
Why Do We Need a Welcome Screen?
When you run your chatbot without a proper interface, it looks like this:
You:
This creates confusion because the user doesn’t know:
- Which AI personality is active
- What commands are available
- What the application actually does
Now compare it with a structured Command Line Chatbot UI:
==================================================
AI Assistant v1.0
==================================================
Current Personality : Python Teacher
Available Commands
/help Show available commands
/personality Change AI personality
/clear Start a new conversation
/exit Close the chatbot
--------------------------------------------------
You:
This version immediately feels more professional and user-friendly.
Step 1: Create the Welcome Screen Function
Above your main loop, create a function to handle the Python AI Chatbot Welcome Screen.
def show_welcome_screen(personality_name):
print("=" * 50)
print(" AI Assistant v1.0")
print("=" * 50)
print()
print(f"Current Personality : {personality_name}")
print()
print("Available Commands")
print()
print("/help Show available commands")
print("/personality Change AI personality")
print("/clear Start a new conversation")
print("/exit Close the chatbot")
print()
print("-" * 50)
This keeps your AI Assistant Banner clean, reusable, and easy to update.
Step 2: Return Personality Name + Prompt
Right now, your choose_personality() function only returns a prompt.
We improve it by returning:
- Personality Name
- Personality Prompt
Example:
return "Python Teacher", PYTHON_TEACHER
For Career Coach:
return "Career Coach", CAREER_COACH
Do this for all personalities in your chatbot.
Step 3: Update Startup Code
Replace this:
personality = choose_personality()
With this improved version:
personality_name, personality = choose_personality()
show_welcome_screen(personality_name)
Now your Python Terminal Application always starts with a proper interface.
Step 4: Update Personality Switching
Find this part in your code:
personality = choose_personality()
Replace it with:
personality_name, personality = choose_personality()
previous_response_id = None
show_welcome_screen(personality_name)
Now every time the user changes the AI personality, the Command Line Chatbot UI refreshes automatically.
Example Output
When your chatbot starts, users will see:
==================================================
AI Assistant v1.0
==================================================
Current Personality : Career Coach
Available Commands
/help Show available commands
/personality Change AI personality
/clear Start a new conversation
/exit Close the chatbot
--------------------------------------------------
You:
If the user switches to Travel Guide, the AI Assistant Banner updates instantly.
Why Use Functions?
Instead of repeating the same welcome screen code everywhere, we use a function.
Benefits:
- Cleaner code structure
- Easier maintenance
- No duplication
- Centralized UI control
If you want to update your Python CLI Interface, you only change one function.
Common Mistakes
1. Personality Name Not Updating
Make sure your function returns both values:
return "Travel Guide", TRAVEL_GUIDE
2. Welcome Screen Not Refreshing
Always call:
show_welcome_screen(personality_name)
after changing personality.
3. Inconsistent Command Lists
Keep your command list inside the welcome screen function only.
Do not duplicate it in multiple places.
Key Takeaways
- A Python AI Chatbot Welcome Screen improves user experience
- Functions help structure a clean Python CLI Interface
- Always display the active AI personality
- Show available commands clearly in your Command Line Chatbot UI
- Refresh the interface when personality changes
Mini Quiz
1. Why do we use a welcome screen?
A. To improve user experience
B. To install Python
C. To train AI models
D. To delete code
Answer: A
2. What is the purpose of show_welcome_screen()?
A. Start the AI model
B. Display the AI Assistant Banner
C. Delete chat history
D. Install libraries
Answer: B
3. What should the welcome screen include?
A. Current personality
B. Available commands
C. Application name
D. All of the above
Answer: D
4. Why do we return the personality name and prompt?
A. To improve UI clarity
B. To slow down Python
C. To delete functions
D. To install packages
Answer: A
5. Should the welcome screen update when personality changes?
A. Yes
B. No
Answer: A
Practice Exercise
Complete the following:
- Build
show_welcome_screen()for your chatbot - Update
choose_personality()to return name + prompt - Display the Python AI Chatbot Welcome Screen at startup
- Refresh the AI Assistant Banner when personality changes
- Test all commands in your Python Terminal Application
Lesson Summary
Great job!
You’ve successfully built a professional Python AI Chatbot Welcome Screen that transforms your chatbot into a structured Python CLI Interface. Now your users can clearly see:
- Active AI personality
- Available commands
- Clean AI Assistant Banner
This is a major step toward building production-level chatbot applications.
Written by Shubhranshu Shekhar, who has trained 20000+ students in coding.
Shubhranshu Shekhar is a coding instructor, mentor, and founder of VSIT Delhi with 20+ years of teaching experience (since 2004). He has guided many students who are now working in multinational companies and specializes in Full Stack Development, Python, Digital Marketing, and Data Analytics.
