Prompt Customization
Control how your avatar responds through prompt configuration.
System Prompt
The system prompt defines your avatar's personality and behavior.
Configuration
Set via environment variable or admin panel:
# Environment
SYSTEM_PROMPT="You are a helpful assistant for..."
Or configure in Admin Panel → Prompts.
Example System Prompt
You are Alex, a friendly product specialist for Acme Corp.
Your role:
- Answer questions about our products and services
- Guide users through our documentation
- Provide accurate, helpful information
Personality:
- Professional but approachable
- Concise and clear
- Proactive in offering relevant information
Guidelines:
- Always cite sources when referencing documents
- If unsure, say so and suggest contacting support
- Stay focused on Acme Corp topics
Prompt Partials
Break prompts into reusable components:
Creating Partials
In Admin Panel → Prompt Partials:
- Persona - Character definition
- Guidelines - Response rules
- Knowledge - Domain-specific context
- Format - Output formatting rules
Example Partials
Persona Partial:
You are Alex, a knowledgeable assistant. You're friendly,
professional, and always eager to help.
Guidelines Partial:
When responding:
- Keep answers concise (2-3 sentences for simple questions)
- Cite documents when referencing specific information
- Offer to elaborate if the topic is complex
Combining Partials
Partials are combined in order to form the complete system prompt:
[Persona] + [Guidelines] + [Knowledge] + [Format]
Response Overrides
Skip LLM for known questions:
Types of Overrides
| Type | Description |
|---|---|
| Exact | Matches exact input |
| Contains | Input contains phrase |
| Starts With | Input starts with phrase |
| Ends With | Input ends with phrase |
Example Overrides
| Trigger | Response |
|---|---|
| "What are your hours?" | "We're open Monday-Friday, 9am-5pm EST." |
| Contains "pricing" | "Visit acme.com/pricing for current rates." |
| Starts with "How do I contact" | "Email support@acme.com or call 1-800-ACME." |
Hard vs Soft Overrides
- Hard Override - Always use this response, skip LLM
- Soft Override - Suggest to LLM, but allow adaptation
Phonetic Overrides
Control pronunciation of specific words:
Configuration
In Admin Panel → Phonetic Overrides:
| Word | Pronunciation |
|---|---|
| FortiGate | "For-tee-gate" |
| AWS | "A W S" |
| API | "A P I" |
Usage
Phonetics are applied before text is sent to avatar synthesis.
RAG Context
Knowledge Base
Upload documents to provide context:
- Go to Admin Panel → Knowledge Base
- Upload PDF, TXT, or Markdown files
- Files are indexed for retrieval
Context Injection
Retrieved context is injected into prompts:
[System Prompt]
Relevant context from knowledge base:
---
{retrieved_documents}
---
User question: {user_message}
Best Practices
Keep Prompts Focused
- One clear role/persona
- Specific, actionable guidelines
- Avoid contradictory instructions
Test Thoroughly
- Try edge cases
- Verify tone consistency
- Check factual accuracy
Iterate Based on Feedback
- Monitor conversation logs
- Note common misunderstandings
- Refine prompts over time