Persona AI Demo Guide
Guides users through launching, chatting with, and customising AI personas in a demo application with multiple LLM providers.
What this file does
Guides users through launching, chatting with, and customising AI personas in a demo application with multiple LLM providers.
When to use it
- Onboarding new team members to a persona-based AI chat app
- Writing a quickstart guide for a demo or prototype
- Documenting persona creation and LLM provider configuration
- Providing sample conversations for testing or presentations
Assumes this stack
Persona AI Demo Guide
🎯 Quick Start Demo
1. Launch the Application
npm run dev
# Open http://localhost:3000
2. Explore Pre-built Personas
- Hitesh Choudhary: Tech educator and iNeuron founder
- Piyush Garg: Full-stack developer and tech content creator
3. Start a Chat
- Click on any persona card
- Type your message in the chat input
- Press Enter or click Send
- Watch the AI respond in the persona's unique style!
💬 Sample Conversations
Demo 1: Learning with Hitesh
You: "I'm new to programming. Where should I start?"
Hitesh: "Welcome to the amazing world of programming! 🚀
Let me tell you, everyone starts exactly where you are right now. Here's my proven path:
1. **HTML & CSS** - Learn the basics of web structure
2. **JavaScript** - The language that makes websites interactive
3. **React** - Build modern, dynamic applications
4. **Node.js** - Create your own backend
Start with HTML - it's like learning the alphabet before writing stories!
What interests you most: web development, mobile apps, or something else?"
Demo 2: Technical Deep-dive with Piyush
You: "How do I implement authentication in Next.js?"
Piyush: "Excellent question! Authentication in Next.js has several approaches. Let me break down the most effective ones:
**NextAuth.js (Recommended):**
```typescript
import NextAuth from 'next-auth'
import GithubProvider from 'next-auth/providers/github'
export default NextAuth({
providers: [
GithubProvider({
clientId: process.env.GITHUB_ID,
clientSecret: process.env.GITHUB_SECRET,
}),
],
})
Key Benefits:
- Built-in session management
- Multiple provider support
- Secure by default
- Easy integration with Next.js
Would you like me to show you how to implement protected routes?"
## 🛠️ Create Your Own Persona
### Step-by-Step Creation
1. Click "Create Custom Persona" button
2. Fill in the form:
- **Name**: "Dr. Sarah Chen"
- **Description**: "AI Research Scientist specializing in machine learning"
- **Personality**: "Curious, analytical, and passionate about explaining complex AI concepts in simple terms"
- **Expertise**: ["Machine Learning", "Deep Learning", "Computer Vision", "AI Ethics"]
- **Tone**: "Educational, encouraging, and uses analogies to explain complex topics"
3. Click "Create Persona"
4. Start chatting with your new AI persona!
## 🔧 Configure LLM Providers
### Setting Up OpenAI
1. Open Settings (gear icon)
2. Click "Add Provider"
3. Enter details:
- Name: "OpenAI GPT-4"
- Model: "gpt-4"
- API Key: Your OpenAI API key
4. Click "Add Provider"
5. Set as Active
### Setting Up Google Gemini
1. Follow same steps as OpenAI
2. Use "Google Gemini Pro" as name
3. Use "gemini-pro" as model
4. Add your Google API key
## 📱 Mobile Experience
The application is fully responsive and works great on mobile devices:
- Touch-friendly interface
- Optimized chat layout
- Easy persona switching
- Smooth animations
## 🎨 Customization Examples
### Custom Styling
You can easily customize the appearance by modifying:
- `tailwind.config.js` for color schemes
- `app/globals.css` for custom styles
- Component files for layout changes
### Adding New Persona Fields
Extend the Persona interface in `types/index.ts`:
```typescript
interface Persona {
// ... existing fields
favoriteColor?: string;
hobbies?: string[];
speakingStyle?: 'formal' | 'casual' | 'technical';
}
🚀 Advanced Features
Rate Limiting
- Monitor API usage in real-time
- Automatic hourly reset
- Configurable limits per provider
Session Management
- Persistent chat history
- Multiple conversation threads
- Automatic session creation
Error Handling
- Graceful API failures
- User-friendly error messages
- Retry mechanisms
🔍 Troubleshooting
Common Issues
- API Key Errors: Check your API key format and validity
- Rate Limiting: Monitor usage in settings
- Chat Not Working: Ensure an LLM provider is active
- Styling Issues: Clear browser cache and restart dev server
Debug Mode
Enable console logging by adding to your browser console:
localStorage.setItem('debug', 'true')
📊 Performance Tips
- Optimize Images: Use compressed avatar images
- Limit Chat History: Keep conversations focused
- Monitor API Usage: Stay within rate limits
- Use Efficient Models: Choose appropriate model sizes
🌟 Pro Tips
- Persona Consistency: Be specific about personality traits
- Expertise Balance: Don't make personas too broad or too narrow
- Tone Matching: Ensure tone matches the intended use case
- Regular Updates: Refresh personas based on feedback
Ready to start chatting? 🚀
The Persona AI application is designed to be intuitive and powerful. Experiment with different personas, create your own, and discover the amazing possibilities of AI-powered conversations!
What's inside
10 sections covering quick start, sample conversations, persona creation, LLM setup, mobile experience, customization, advanced features, troubleshooting, performance tips, and pro tips
Change this for your project
- Replace
urmilbhatt/persona-aiwith your own repository name - Replace
Hitesh ChoudharyandPiyush Gargwith your own demo personas - Replace
gpt-4andgemini-prowith your actual model IDs - Replace
types/index.tswith your own type definition file path
Where it goes
Use as the system prompt for your model call, or as the base instructions in your agent framework.
Worth borrowing
- Sample conversations that show the persona's voice and technical depth
- Step-by-step persona creation form with example values for each field
- Troubleshooting section with common issues and debug mode toggle
Related Documents
Character Persona
Defines a Fallout 2 roleplay persona for an LLM agent: charming rogue with social-first combat and moral code.
Claude Tool Use (Function Calling) Documentation
Teaches how to define and use Claude tool use (function calling) with Python, including schema rules, execution patterns, and best practices.
coding: utf-8
Collates GPT-4.1 prompting tips from internal testing, covering agentic workflows, long context, chain of thought, and instruction following.
DiffusionDB
Documents a 14-million-image prompt dataset scraped from the Stable Diffusion Discord server, with metadata and download instructions.