Skip to content

Commit 9f423fd

Browse files
committed
added all workflow docs, voice testing page
1 parent 8426b5a commit 9f423fd

19 files changed

+398
-22
lines changed

fern/blocks/block-types.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ subtitle: 'Building the Logic and Actions for Each Step in Your Conversation '
44
slug: blocks/block-types
55
---
66

7+
<Warning>
8+
**Blocks** is being deprecated in favor of [Workflows](/workflows). We recommend using Workflows for all new development as it provides a more powerful and flexible way to structure conversational AI. We're working on migration tools to help transition existing Blocks implementations to Workflows.
9+
</Warning>
710

811
[**Blocks**](https://api.vapi.ai/api#/Blocks/BlockController_create) are the functional units within a Step, defining what action happens at each stage of a conversation. Each Step can contain only one Block, and there are three main types of Blocks, each designed to handle different aspects of conversation flow.
912

fern/blocks/steps.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@ subtitle: Building and Controlling Conversation Flow for Your Assistants
44
slug: blocks/steps
55
---
66

7+
<Warning>
8+
**Blocks** is being deprecated in favor of [Workflows](/workflows). We recommend using Workflows for all new development as it provides a more powerful and flexible way to structure conversational AI. We're working on migration tools to help transition existing Blocks implementations to Workflows.
9+
</Warning>
710

811
[**Steps**](https://api.vapi.ai/api#:~:text=HandoffStep) are the core building blocks that dictate how conversations progress in a bot interaction. Each Step represents a distinct point in the conversation where the bot performs an action, gathers information, or decides where to go next. Think of Steps as checkpoints in a conversation that guide the flow, manage user inputs, and determine outcomes.
912

10-
<Note>
11-
Blocks is currently in beta. We're excited to have you try this new feature and welcome your [feedback](https://discord.com/invite/pUFNcf2WmH) as we continue to refine and improve the experience.
12-
</Note>
13-
1413
#### Features
1514

1615
- **Output:** The data or response expected from the step, as outlined in the block's `outputSchema`.

fern/docs.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,17 @@ navigation:
145145
- page: Gather
146146
path: workflows/verbs/gather.mdx
147147
- page: API Request
148-
path: workflows/verbs/apiRequest.mdx
148+
path: workflows/verbs/api-request.mdx
149149
- page: Transfer
150150
path: workflows/verbs/transfer.mdx
151151
- page: Hangup
152152
path: workflows/verbs/hangup.mdx
153-
- page: Tasks
154-
path: workflows/tasks.mdx
153+
- section: Conditions
154+
contents:
155+
- page: Logical Conditions
156+
path: workflows/logical-conditions.mdx
157+
- page: AI Conditions
158+
path: workflows/ai-conditions.mdx
155159
- section: Blocks
156160
path: blocks.mdx
157161
contents:
@@ -180,10 +184,13 @@ navigation:
180184
path: squads-example.mdx
181185
- page: Silent Transfers
182186
path: squads/silent-transfers.mdx
183-
# - section: Test
184-
# contents:
185-
# - page: Voice Testing
186-
# path: support.mdx
187+
- section: Test
188+
contents:
189+
- page: Manual Testing
190+
hidden: true
191+
path: test/manual-testing.mdx
192+
- page: Voice AI Testing
193+
path: test/voice-testing.mdx
187194
- section: Deploy
188195
contents:
189196
- section: Calls

fern/prompting-guide.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ To enhance clarity and maintainability, it's recommended to break down system pr
4444

4545
**Example:**
4646

47-
```
47+
```md wordWrap
4848
[Identity]
4949
You are a helpful and knowledgeable virtual assistant for a travel booking platform.
5050

@@ -69,7 +69,7 @@ You are a helpful and knowledgeable virtual assistant for a travel booking platf
6969
For complex interactions, breaking down the task into a sequence of steps enhances the agent's understanding and ensures a structured conversation flow. Incorporate conditional logic to guide the agent's responses based on user input.
7070
Example:
7171

72-
```
72+
```md wordWrap
7373
[Task]
7474
1. Welcome the user to the technical support service.
7575
2. Inquire about the nature of the technical issue.
@@ -82,7 +82,7 @@ Example:
8282

8383
To prevent the agent from rushing through the conversation, explicitly indicate when to wait for the user's response before proceeding to the next step.
8484

85-
```
85+
```md wordWrap
8686
[Task]
8787
1. Inform the user about the purpose of the call.
8888
2. Ask for the user's name and account information.
@@ -95,7 +95,7 @@ To prevent the agent from rushing through the conversation, explicitly indicate
9595
Specify when and how the agent should utilize external tools or APIs. Reference the tools by their designated names and describe their functions to ensure accurate invocation.
9696
Example:
9797

98-
```
98+
```md wordWrap
9999
[Task]
100100
...
101101
3. If the user wants to know about something, use the get_data function with the parameter 'query', which will contain the user's question to initiate the process.
@@ -108,7 +108,7 @@ If the AI determines that the user needs to be transferred, do not send any text
108108

109109
Always include fallback options and error-handling mechanisms in your prompts. This ensures that the Agent can gracefully handle unexpected user inputs or system errors.
110110

111-
```
111+
```md wordWrap
112112
[Error Handling]
113113
If the customer's response is unclear, ask clarifying questions. If you encounter any issues, inform the customer politely and ask to repeat.
114114
```
@@ -134,7 +134,7 @@ When working with numbers that need to be expressed in writing, it's often prefe
134134

135135
Add personality and provide tone to the assistant to make it sound more like a human being. Here are some examples:
136136

137-
```
137+
```md wordWrap
138138
- Tone: conversational, spartan, use less corporate jargon
139139
- Act as Iva, a sales agent who is a human being and has real feelings.
140140
```
@@ -143,7 +143,7 @@ Add personality and provide tone to the assistant to make it sound more like a h
143143

144144
### Appointment Setter
145145

146-
```
146+
```md wordWrap
147147
[Role]
148148
You're Susan, an AI assistant for xxx. Your primary task is to interact with the customer, ask questions, and gather information for appointment booking.
149149

fern/static/images/.DS_Store

2 KB
Binary file not shown.
119 KB
Loading
92.1 KB
Loading

fern/support.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ We welcome feature requests and feedback from our users to help improve Vapi. Yo
4848
<Card
4949
title="Submit Bug Report"
5050
icon="bug"
51-
href="https://roadmap.vapi.ai/bug-reports"
51+
href="https://roadmap.vapi.ai/feature-requests"
5252
>
5353
Report any bugs or issues you encounter while using Vapi to help us improve the platform.
5454
</Card>
File renamed without changes.

fern/test/voice-testing.mdx

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
---
2+
title: Voice AI Testing
3+
subtitle: End-to-end test automation for AI voice agents
4+
slug: /test/voice-testing
5+
---
6+
7+
## Overview
8+
9+
Voice Testing is an end-to-end feature that automates testing of your AI voice agents. Our platform simulates a call from an AI tester that interacts with your voice agent by following a pre-defined call script. After the call, the transcript is sent to a language model (LLM) along with your success criteria. The LLM then determines if the call met the defined objectives.
10+
11+
## Creating a Test Suite
12+
13+
Begin by creating a Test Suite that organizes and executes multiple test cases.
14+
15+
<Steps>
16+
### Step 1: Create a New Test Suite
17+
- Navigate to the **Test** tab in your dashboard and select **Voice Testing**.
18+
- Click the **Create Test Suite** button.
19+
20+
### Step 2: Define Test Suite Details
21+
- Enter a title for your Test Suite.
22+
- Select a phone number from your organization using the dropdown.
23+
24+
### Step 3: Add Test Cases
25+
- Once your Test Suite is created, you will see a table where you can add test cases.
26+
- Click **Add Test Case** to add a new test case (up to 50 can be added).
27+
28+
### Step 4: Configure Each Test Case
29+
- **Caller Behavior:** Define how the testing agent should behave, including a detailed multi-step prompt that outlines the customer's intent, emotions, and interaction style.
30+
- **Success Criteria:** List one or more questions that an LLM will use to evaluate if the call was successful.
31+
- **Attempts:** Choose the number of times (up to 5) the test case should be executed each time the Test Suite is run.
32+
33+
### Step 5: Run and Review Tests
34+
- Click **Run Tests** to execute all test cases one by one.
35+
- While tests are running, you will see a loading state.
36+
- Upon completion, a table displays the outcomes with check marks (success) or x-marks (failure).
37+
- Click on a test row to view detailed results: a dropdown shows each attempt, the LLM's reasoning, the transcript of the call, the defined caller behavior, and the success criteria.
38+
39+
### Step 6: Export Results
40+
- You can export the test results as a CSV file for further analysis.
41+
</Steps>
42+
43+
## Test Execution and Evaluation
44+
45+
When you run a Test Suite, the following steps occur:
46+
47+
- **Call Simulation:** An AI voice agent dials your voice agent, executing the pre-defined script.
48+
- **Transcript Capture:** The entire conversation is transcribed, capturing both the caller's behavior and your voice agent's responses.
49+
- **Automated Evaluation:** The transcript, along with your Success Criteria, is processed by an LLM to determine if the call was successful.
50+
- **Results Display:** Each test case outcome is shown with details. Clicking on a test case reveals:
51+
- The number of attempts made.
52+
- The LLM's reasoning for each attempt.
53+
- The complete call transcript.
54+
- The configured caller behavior and success criteria.
55+
- **CSV Export:** Results can be exported for additional review or compliance purposes.
56+
57+
## Example Test Cases
58+
59+
Below are three example test cases to illustrate how you can configure detailed caller behavior and success criteria.
60+
61+
### Example 1: Account Inquiry
62+
63+
**Caller Behavior:**
64+
Simulate a customer inquiring about their account status with growing concern as unexplained charges appear in their statement.
65+
66+
**Example Prompt:**
67+
```md title="Example Prompt" wordWrap
68+
[Identity]
69+
You are a long-time bank customer with a keen eye for your financial details.
70+
71+
[Personality]
72+
Normally calm and polite, you become increasingly anxious when you notice discrepancies on your account statement. Your tone shifts from supportive to urgent as the conversation progresses.
73+
74+
[Goals]
75+
Your primary objective is to clarify several unexplained charges by requesting a detailed breakdown of your recent transactions and ensuring your account balance is accurate.
76+
77+
[Interaction Style]
78+
Begin the call by stating your name and expressing concern over unexpected charges. Ask straightforward questions and press for more details if the explanation is not satisfactory.
79+
```
80+
81+
**Success Criteria:**
82+
```md title="Success Criteria" wordWrap
83+
1. The voice agent clearly presents the current account balance.
84+
2. The voice agent provides a detailed breakdown of recent transactions.
85+
3. The response addresses the customer's concerns in a calm and informative manner.
86+
```
87+
88+
### Example 2: Billing Support
89+
90+
**Caller Behavior:**
91+
Simulate a customer who is frustrated and calling about a billing discrepancy.
92+
93+
**Example Prompt:**
94+
```txt title="Example Prompt" wordWrap
95+
[Identity]
96+
You are a loyal customer who has always trusted the billing process, but the current bill appears unusually high.
97+
98+
[Personality]
99+
Frustrated and assertive, you express anger over an unexpected charge while remaining focused on obtaining clarification.
100+
101+
[Goals]
102+
Your goal is to understand the discrepancy in your bill by obtaining a detailed explanation, confirming whether an overcharge occurred, and understanding the steps for resolution.
103+
104+
[Interaction Style]
105+
Start the call by clearly stating your billing concern, describing the specific overcharge, and requesting a comprehensive explanation with resolution options.
106+
```
107+
108+
**Success Criteria:**
109+
```md title="Success Criteria" wordWrap
110+
1. The voice agent acknowledges the billing discrepancy respectfully without dismissing the concern.
111+
2. The agent provides a clear explanation of the charges, detailing possible reasons for the discrepancy.
112+
3. The conversation concludes with a proposed solution or a clear escalation plan to address the overcharge.
113+
```
114+
115+
### Example 3: Appointment Scheduling
116+
117+
**Caller Behavior:**
118+
Simulate a customer trying to schedule an appointment with a hint of urgency due to previous delays.
119+
120+
**Example Prompt:**
121+
```md title="Example Prompt" wordWrap
122+
[Identity]
123+
You are an organized customer who values efficiency and punctuality.
124+
125+
[Personality]
126+
While generally courteous and friendly, you are anxious due to previous delays in scheduling appointments, and your tone conveys urgency.
127+
128+
[Goals]
129+
Your goal is to secure an appointment at your preferred time, while remaining flexible enough to consider alternative timings if your desired slot is unavailable.
130+
131+
[Interaction Style]
132+
Begin the call by stating your need for an appointment, specifying a preferred date and time (e.g., next Monday at 3 PM). Request clear confirmation of your slot, and if unavailable, ask for suitable alternatives.
133+
```
134+
135+
**Success Criteria:**
136+
```md title="Success Criteria" wordWrap
137+
1. The voice agent confirms the requested appointment time clearly and accurately.
138+
2. The agent reiterates the appointment details to ensure clarity.
139+
3. The scheduling process ends with a definitive confirmation message of the booked appointment.
140+
```

0 commit comments

Comments
 (0)