Lý thuyết
35 phút
Bài 2/15

Voiceflow Fundamentals

Làm quen với Voiceflow - nền tảng thiết kế conversation AI

🎯 Voiceflow Fundamentals

Voiceflow là nền tảng conversation design hàng đầu cho AI agents.

Giới thiệu Voiceflow

Tại sao chọn Voiceflow?

Text
1✅ Visual conversation designer
2✅ Built-in AI/NLU
3✅ Knowledge base integration
4✅ Multi-channel deployment
5✅ Great free tier
6✅ Active community

Account Setup

Text
1Steps:
21. Go to voiceflow.com
32. Sign up (free)
43. Create new project
54. Choose "Chat Assistant"
65. Name your project

Interface Overview

Main Sections

Text
1┌─────────────────────────────────────────────────┐
2│ [Project Name] [Preview] [Publish] [Share] │
3├────────┬────────────────────────────────────────┤
4│ │ │
5│ Steps │ CANVAS │
6│ Panel │ (Drag & drop blocks here) │
7│ │ │
8│ ────── │ ┌─────┐ ┌─────┐ │
9│ Blocks │ │Start│───▶│Block│ │
10│ │ └─────┘ └─────┘ │
11│ │ │
12└────────┴────────────────────────────────────────┘

Canvas

Text
1Where you build flows:
2- Drag blocks from left panel
3- Connect with arrows
4- Visual flow representation
5- Zoom in/out
6- Mini-map navigation

Steps Panel

Text
1Available blocks:
2- Start: Entry point
3- Listen: Wait for user input
4- AI: Generate responses
5- Set: Variables
6- Conditions: If/else logic
7- Integrations: API calls
8- And more...

Core Concepts

1. Blocks

Text
1Building blocks of conversations:
2
3Start Block:
4- Beginning of flow
5- Every flow needs one
6
7Talk Block:
8- Agent says something
9- Text, images, cards
10
11Listen Block:
12- Wait for user input
13- Capture responses
14
15AI Block:
16- Generate dynamic responses
17- Use prompts

2. Variables

Text
1Store data throughout conversation:
2
3System variables:
4- {last_utterance} - User's last message
5- {user_id} - Unique identifier
6- {platform} - web, voice, etc.
7
8Custom variables:
9- {user_name}
10- {order_number}
11- {selected_product}

3. Flows

Text
1Organize conversation into flows:
2
3Main flows:
4- Welcome
5- Support
6- Sales
7- FAQ
8
9Sub-flows:
10- Order tracking
11- Password reset
12- Product details

Building First Agent

Step 1: Start Block

Text
1Every project starts with:
21. Start block (auto-created)
32. Set initial variables if needed
43. Connect to first talk block

Step 2: Welcome Message

Text
1Talk Block setup:
21. Drag "Talk" to canvas
32. Connect from Start
43. Add welcome text:
5 "Hi! I'm your assistant. How can I help?"
64. Add quick reply buttons:
7 - "Track Order"
8 - "Get Support"
9 - "Browse Products"

Step 3: Listen Block

Text
1Capture user response:
21. Add "Listen" block
32. Connect from Talk block
43. Configure:
5 - Intent matching (auto)
6 - Entity extraction

Step 4: Conditions

Text
1Route based on response:
21. Add "Condition" block
32. Check what user selected:
4 - If "Track Order" → Order flow
5 - If "Get Support" → Support flow
6 - Else → General response

Working with Intents

What are Intents?

Text
1User's goal/intention:
2
3"I want to track my order"
4"Where is my package?"
5"Check order status"
6→ All map to: track_order intent
7
8"I need help"
9"Talk to support"
10"I have a problem"
11→ All map to: get_support intent

Creating Intents

Text
1In Voiceflow:
21. Go to NLU section
32. Create new intent
43. Name: track_order
54. Add training phrases:
6 - "track my order"
7 - "where is my order"
8 - "order status"
9 - "check my delivery"
10 - Add 10-15 variations

Using Intents

Text
1In Listen block:
21. Select intent matching
32. Agent auto-detects intent
43. Route to appropriate flow

Working with Entities

What are Entities?

Text
1Specific data in user input:
2
3"Track order #12345"
4→ Intent: track_order
5→ Entity: order_number = "12345"
6
7"My email is john@email.com"
8→ Intent: provide_email
9→ Entity: email = "john@email.com"

Built-in Entities

Text
1Voiceflow includes:
2- @sys.number (123, 1000)
3- @sys.date (tomorrow, Jan 5)
4- @sys.email (user@email.com)
5- @sys.phone (+1234567890)
6- @sys.name (John, Mary)

Custom Entities

Text
1Create your own:
21. Go to Entities
32. Create new entity
43. Name: product_category
54. Add values:
6 - Electronics
7 - Clothing
8 - Home & Garden
9 - Add synonyms

AI Response Block

Setup

Text
1Use AI to generate dynamic responses:
2
31. Add "AI Response" block
42. Configure prompt:
5 "You are a helpful support agent.
6 Answer the user's question: {last_utterance}
7 Be concise and friendly."
83. Set model (GPT-4, etc.)

Variables in Prompts

Text
1Include context:
2"User name: {user_name}
3Order: {order_number}
4Question: {last_utterance}
5
6Provide personalized help."

Preview & Test

Testing Your Agent

Text
11. Click "Preview" button
22. Test window opens
33. Type messages
44. See flow execution
55. Check variable values
66. Debug issues

Debug Panel

Text
1Shows:
2- Current block
3- Variable values
4- Intent matched
5- Entities extracted
6- Flow path

Best Practices

Design Tips
Text
11. Start simple
2 - Basic flow first
3 - Add complexity gradually
4
52. Use clear prompts
6 - Guide user input
7 - Provide options
8
93. Handle unknowns
10 - "I didn't understand"
11 - Offer alternatives
12
134. Test frequently
14 - Preview after each change
15 - Try edge cases

Common Issues

Troubleshooting
Text
1Intent not matching:
2- Add more training phrases
3- Check for typos
4- Test variations
5
6Variables empty:
7- Ensure capture block used
8- Check variable names
9- Review flow order
10
11AI response issues:
12- Check API key
13- Review prompt
14- Test with simple prompt first

Bài Tập

Practice

Build Welcome Flow:

  1. Create new Voiceflow project
  2. Add welcome message
  3. Create 3 button options
  4. Add Listen block
  5. Route based on selection
  6. Test in preview

Tiếp theo: Bài 3 - Building with Voiceflow