You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vapi offers two ways to integrate with [Trieve](https://trieve.ai):
9
+
Vapi integrates with [Trieve](https://trieve.ai) through the BYOD (Bring Your Own Dataset) approach, allowing you to use your Trieve API key to import your existing Trieve datasets into Vapi.
10
10
11
-
1.**Direct Integration**: Create and manage Trieve datasets directly through Vapi
12
-
2.**BYOK (Bring Your Own Key)**: Use your Trieve API key to import your existing Trieve datasets into Vapi
11
+
## Integrating with Trieve
13
12
14
-
## Direct Integration with Trieve
15
-
16
-
When using Trieve directly through Vapi, you can create and manage datasets, but they'll be tied to Vapi's account. This approach offers:
17
-
18
-
- Quick setup with minimal configuration
19
-
- Basic dataset management through Vapi's API
20
-
- Limited customization options
21
-
22
-
### Setting up Direct Integration
23
-
24
-
1. Navigate to the [Vapi dashboard credentials page](https://dashboard.vapi.ai/keys)
25
-
2. Add your Trieve API key from [Trieve's dashboard](https://dashboard.trieve.ai/org/keys)
26
-
3. Create a new knowledge base with Trieve as the provider:
27
-
28
-
```json
29
-
{
30
-
"name": "my-trieve-kb",
31
-
"provider": "trieve",
32
-
"searchPlan": {
33
-
"scoreThreshold": 0.2,
34
-
"searchType": "semantic"
35
-
},
36
-
"createPlan": {
37
-
"type": "create",
38
-
"chunkPlans": [
39
-
{
40
-
"fileIds": ["file-123", "file-456"],
41
-
"websites": ["https://example.com"],
42
-
"targetSplitsPerChunk": 50,
43
-
"rebalanceChunks": true
44
-
}
45
-
]
46
-
}
47
-
}
48
-
```
49
-
50
-
## BYOK with Trieve (Recommended)
51
-
52
-
The BYOK approach offers more flexibility and control over your datasets. You can:
13
+
The BYOD approach offers flexibility and control over your datasets. You can:
53
14
54
15
- Fully manage your datasets in Trieve's native interface
55
16
- Use Trieve's advanced features like:
@@ -293,12 +254,12 @@ Use Trieve's search playground to:
293
254
294
255
1. Create your Trieve API key from [Trieve's dashboard](https://dashboard.trieve.ai/org/keys)
295
256
2. Add your Trieve API key to Vapi [Provider Credentials](https://dashboard.vapi.ai/keys)
296
-

257
+

297
258
3. Once your dataset is optimized in Trieve, import it to Vapi:
Copy file name to clipboardExpand all lines: fern/knowledgebase.mdx
+10-42Lines changed: 10 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,39 +20,18 @@ Using a Knowledge Base with your voice AI assistant offers several benefits:
20
20
21
21
## **How to Create a Knowledge Base**
22
22
23
-
To create a Knowledge Base, follow these steps:
23
+
To create a Knowledge Base with Trieve, follow these steps:
24
24
25
-
### **Step 1: Upload Your Files**
25
+
### **Step 1: Create a Knowledge Base with Trieve**
26
26
27
-
Navigate to Platform > Files and upload your custom files in Markdown, PDF, plain text, or Microsoft Word (.doc and .docx) format to Vapi's Knowledge Base.
28
-
29
-
<Framecaption="Adding files to your Knowledge Base">
30
-
<img
31
-
src="./static/images/knowledge-base/files.png"
32
-
alt="Adding files to your Knowledge Base"
33
-
/>
34
-
</Frame>
35
-
36
-
Alternatively you can upload your files via the API.
37
-
38
-
```bash
39
-
curl --location 'https://api.vapi.ai/file' \
40
-
--header 'Authorization: Bearer <YOUR_API_KEY>' \
41
-
--form 'file=@"<PATH_TO_YOUR_FILE>"'
42
-
```
43
-
44
-
### **Step 2: Create a Knowledge Base**
45
-
46
-
Use the ID of the uploaded file to create a Knowledge Base along with the KB configurations.
47
-
48
-
1. Provider: [trieve](https://trieve.ai)
27
+
Vapi integrates with [Trieve](https://trieve.ai) using the BYOD (Bring Your Own Dataset) approach. First, create and optimize your dataset in Trieve (see our [Integrating with Trieve guide](knowledge-base/integrating-with-trieve) for detailed instructions), then import it to Vapi:
- For Manhattan Distance, Euclidean Distance, and Dot Product: Excludes chunks above the threshold
92
63
- Set to 0 or omit for no threshold
93
64
94
-
##### Chunk Plan Options
65
+
##### Import Options
95
66
96
-
-**fileIds** (optional): Array of file IDs to include in the vector store
97
-
-**websites** (optional): Array of website URLs to crawl and include in the vector store
98
-
-**targetSplitsPerChunk** (optional): Number of splits per chunk. Default: `20`
99
-
-**splitDelimiters** (optional): Array of delimiters used to split text before chunking. Default: `[".!?\n"]`
100
-
-**rebalanceChunks** (optional): When true, evenly distributes remainder splits across chunks. For example, 66 splits with `targetSplitsPerChunk: 20` will create 3 chunks with 22 splits each. Default: `true`
67
+
-**providerId** (required): The ID of your Trieve dataset that you want to import
68
+
-**type** (required): Must be set to "import" for the BYOD approach
101
69
102
-
### **Step 3: Create an Assistant**
70
+
### **Step 2: Create an Assistant**
103
71
104
72
Create a new assistant in Vapi and, on the right sidebar menu. Add the Knowledge Base to your assistant via the PATCH endpoint. Also make sure you customize your assistant's system prompt to utilize the Knowledge Base for responding to user queries.
0 commit comments