Information not being extracted from the knowledge...
# support
c
After uploading the knowledge base file through the Vapi frontend, my assistant can't use it to provide information during calls. When I upload the file programmatically in make.com, I get errors like "invalid assistant" or "couldn't fetch" assistant. However, everything works fine if I remove the knowledge base part. I also tried using the gpt-4-turbo model, but the problem remains.
v
Hi @Christopher, I'm an AI assistant for Vapi. I'll analyze available sources and get back to you shortly.
----------------------------- **While I generate an answer, here are some sources that might be helpful**: * [Get Assistant]() * [Creating Custom Knowledge Bases for Your Voice AI Assistants]() * [Create Assistant]() * [Delete Assistant]() -----------------------------
### Answer It looks like you're encountering issues with integrating a knowledge base into your assistant. Here are a few steps and considerations to help resolve the problems: 1. **Ensure Proper Knowledge Base Configuration**: - Make sure you are following the correct steps for creating and configuring your knowledge base as outlined in the [documentation]() [(1)]() . - Verify that the documents uploaded to the knowledge base are correctly formatted and properly linked to the assistant. 2. **Creating an Assistant**: - When creating an assistant programmatically, ensure that the configuration includes the correct references to the knowledge base. Here’s an example of how you might create an assistant with knowledge base integration:
Copy code
javascript
    curl --request POST \
    --url https://api.vapi.ai/assistant \
    --header 'Authorization: Bearer <token>' \
    --header 'Content-Type: application/json' \
    --data '{
        "transcriber": {...},
        "model": {
            "provider": "openai",
            "model": "gpt-4-turbo",
            "knowledgeBase": {
                "fileIds": ["<file_id>"],  // Ensure this is correctly set
                "provider": "canonical"
            },
            ...
        },
        ...
    }'
[(2)]() , [(1)]() 3. **Handling Errors**: - If you are receiving errors like "invalid assistant" or "couldn't fetch assistant," double-check the assistant ID and ensure it matches the one you are trying to configure. An example cURL request to get an assistant configuration is:
Copy code
javascript
    curl --request GET \
    --url https://api.vapi.ai/assistant/{id} \
    --header 'Authorization: Bearer <token>'
[(3)]() 4. **Check for Permissions and Errors**: - Make sure your API token has the necessary permissions to access and modify assistants and knowledge base documents. - Review the logs for more detailed error messages that might indicate what’s going wrong with the assistant's configuration. 5. **Custom Functions**: - Consider using custom functions to interact with your knowledge base, as outlined in the [Function Calling documentation]() [(4)]() . By ensuring the configuration is correct and all steps are followed as per the documentation, you should be able to resolve the issues related to knowledge base integration.
a
If you're uploading a PDF, make sure it's not an image based PDF, these systems are unable parse text out of them. If it is an image based PDF, send it GPT-V ( or GPT-4o) and ask for a summary -> save summary to .txt -> upload that knowledge.
@Christopher 👆
c
I tried .txt, .docx, and text-based .pdf, and unfortunately the issue persists
s
Can you send us the document?
c
Yes, I sent it to you via email
s
Checking...
s
Hi! I have similar problem also. Is there a structure that the document has to be in?
s
We are working on it. We will notify you once it is fixed.
d
hi @Sahil we have uploaded a .Txt document to the Knowledge Base. the document contains a call center Q&A script that Vapi must follow when answering the questions, however, it's not using it to answer. What's the solution please?
s
call_id pls
and create a new support thread
4 Views