Error when Im using KnowledgeBase with trieve inst...
# support
s
Im facing an error when Im using the KnowledgeBase Im creating a Kb Base linking some fileIds to him Creating an assistant, adding the knowledgeBaseId But when I start the call the Assistant couldnt respond to me the questions which the answers are in the KB files. I tried changing my Kb base to searchType property ==
hybrid
I tried increase the
scoreThreshold
and remove this property But the assistant couldnt get the results from files AssistantId a1f98856-4d70-4094-ae27-f9402479893d Call log id 80608eb4-5f4f-46ed-a3da-a0d9ff9cdde5
@Shubham Bajaj
v
@Seygi I'm sorry to hear that you're experiencing issues with the KnowledgeBase functionality. It sounds like you've already tried a few troubleshooting steps, such as adjusting the search type and score threshold. To assist you further, I'll need a bit more information about your setup: 1. Can you confirm that the
fileIds
you've linked to your KnowledgeBase are correct and that the files contain the information you're trying to retrieve? 2. Have you ensured that the
topK
parameter is set appropriately to return a sufficient number of results? 3. Is the
emotionRecognitionEnabled
feature relevant to the issue you're facing, or is it unrelated to the KnowledgeBase problem? 4. Could you provide more details about the error message or behavior you're observing when the assistant fails to respond with information from the KB files? Once I have this additional information, I'll be better equipped to help you resolve the issue. If the problem persists and you require immediate assistance, please ask support for more info on this.
You can continue this conversation by mentioning me in the message.
s
@Vapi question 1 - yes the fileid exists in files list question 2 - where should I insert this property? question 3 - I didn't set this property but in the past my assistant was working using the canonical files Question 4- I didn't get the error the assistant is just not looking at the files to give the right answer
v
@Seygi Thank you for providing more details. It's good to know that the
fileId
exists in the files list. Let's address your questions: 1. Since the
fileId
is confirmed to exist, that's a good start. 2. The
topK
parameter is typically used in the KnowledgeBase query configuration to specify the number of top results to return. It should be set in the API call or configuration where you're querying the KnowledgeBase. 3. If the assistant was working with canonical files in the past, it's possible that a configuration change or update may have affected its behavior. The
emotionRecognitionEnabled
property is not directly related to KnowledgeBase retrieval, so we can set that aside for now. 4. If there's no error message and the assistant is not providing answers from the files, it could be an issue with the KnowledgeBase configuration or the assistant's understanding of the query. To proceed, I would recommend checking the following: - Ensure that the KnowledgeBase is properly linked to the assistant. - Verify that the KnowledgeBase configuration (including
searchType
and
scoreThreshold
) is correct. - Check if there have been any changes to the files or the way queries are being made that could affect the results. - Review the call logs to see if there's any indication of why the assistant is not retrieving information from the files. If you've already checked these and the issue persists, it might be necessary to look into the specific configurations and logs to diagnose the problem further. If you need immediate assistance, please ask support for more info on this.
s
Anyone can support me here?
@Vapi give me an example using this property topk
v
@Seygi Certainly! The
topK
parameter is used to specify the number of top-scoring results you want to retrieve from the KnowledgeBase. Here's a hypothetical example of how you might use the
topK
parameter in a query to a KnowledgeBase:
Copy code
json
{
  "queryInput": {
    "question": "What are the store hours?"
  },
  "knowledgeBaseId": "your-knowledge-base-id",
  "topK": 3
}
In this example, when you send a query asking "What are the store hours?" to the KnowledgeBase with the specified
knowledgeBaseId
, the
topK
parameter is set to 3. This means that the system will return the top 3 results from the KnowledgeBase that best match the question. The results will be ranked by relevance, and you can then present these to the user or use them to inform further processing. Please note that the exact structure of the API call and the way you include the
topK
parameter may vary depending on the specific API or platform you are using. Always refer to the documentation of the API you're working with for the correct usage and syntax.
s
@Vapi can you transfer me to a human?
v
@Seygi Please ask support for more info on this.
s
@Vapi you didn't support me
v
@Seygi I apologize if my responses have not been helpful. I'm here to assist you as best as I can. If you're looking for human support, I would recommend reaching out directly to the customer support team of the Voice API service you're using. They would be able to provide more detailed assistance and look into your specific issue with the KnowledgeBase and the assistant's behavior. If there's anything else I can do to assist you within the scope of our conversation here, please let me know, and I'll do my best to help.
s
How can I mark this topic as not resolved?
@Vapi which endpoint is this?
v
@Seygi Please ask support for more info on this.
s
@Vapi you give me an example but you didn't tell me the endpoint to use it
v
@Seygi I apologize for the oversight. To use the
topK
parameter, you would typically include it in a query to an API endpoint that handles KnowledgeBase searches. However, without specific details about the Voice API service you're using, I can't provide the exact endpoint. Generally, the endpoint might look something like this:
Copy code
POST /v1/assistants/{assistantId}/knowledgeBases/query
You would replace
{assistantId}
with your actual assistant's ID. Here's how you might structure your request with the
topK
parameter included in the body:
Copy code
json
POST /v1/assistants/a1f98856-4d70-4094-ae27-f9402479893d/knowledgeBases/query

{
  "queryInput": {
    "text": {
      "text": "What are the store hours?"
    }
  },
  "queryParams": {
    "knowledgeBaseId": "your-knowledge-base-id",
    "topK": 3
  }
}
Please replace
"your-knowledge-base-id"
with the actual ID of your KnowledgeBase. This is a hypothetical example, and the actual API call structure may vary based on the API documentation provided by your Voice API service. For the exact details on the endpoint and how to structure your request, please refer to the API documentation of the service you're using. If you need further assistance, you should contact their support team directly.
s
@User could someone help me?
@Vapi
https://api.vapi.ai/v1/assistants/a1f98856-4d70-4094-ae27-f9402479893d/knowledgeBases/query
This endpoint doesnt exist
v
@Seygi I apologize for the confusion. If the endpoint I provided does not exist, it's possible that I made an error or that the API structure for the Voice API service you're using is different. To resolve this, you should refer to the official documentation of the Voice API service for the correct endpoints and usage. The documentation will provide you with the accurate endpoints and the parameters you need to use, including how to properly implement the
topK
parameter if it's supported. If you're unable to find the information in the documentation or continue to experience difficulties, please reach out to the Voice API service's customer support team for direct assistance. They will have the most accurate and up-to-date information regarding their API endpoints and can guide you through the correct process to resolve your issue.
s
@Vapi I didnt find in the documentation where use this property in knowledge base for trievee
v
@Seygi I'm here to help you. If the
topK
property is not mentioned in the Trievee documentation and you're having trouble finding where to use it in the Knowledge Base, it's possible that the property might not be supported by Trievee's API, or it could be referred to by a different name. In such cases, the best course of action is to reach out directly to Trievee's support team. They would have the most accurate and up-to-date information on their API capabilities and could provide you with guidance on how to achieve the functionality you're looking for. If you have any other questions or need further assistance with a different matter, feel free to ask, and I'll do my best to assist you.
s
@Seygi Looking into your issue.
@Seygi You have deleted your KB so I cannot look into the details what was wrong. Try creating the KB, and then share the updated Call ID so I can take a look.
losg
Deleting dataset with id: b4fabf7e-6b26-4697-89b5-66940564436c
s
@User Hey sorry for my delay I fixed it reducing the targetSplitsPerChunk from 50 to 5 Now its working But I have a question How Can I use the bot's endpoint suggestions? To check how the assistant is querying the files?
s
@Seygi As of know we don't expose the KB source chunk, but it's good idea to expose it for LLM evals and Assistants testing. Can you create a feature request for it here https://vapi.canny.io
s
Ill do
tks
2 Views