Having trouble using Assistant coreectly
# support
s
I am building an AI agent using Python for backend and fastapi framework, but I am having some trouble while using Vapi.i am using ngrok and I connected my webhook with API request tool and I am also connecting my knowledge base through my frontend which is in next JS so through my frontend I made a page where I am I can upload the knowledge base and then it will fetch and create tool in Vapi, so what is happening when I am using both the tools together then the vapi agent is not responding correctly. It is saying some file name to shra1252, something and then it is responding. Plus, I set the system prompt also, according to my use, it is it looks like it is not correctly using it. before when I was just connected my webhook with API request tool what it was doing is when I say some query, the AI was responding through , my ChatGPT open AI API, but when I’m using both the tools together, knowledge tool and API request tool, it is not triggering my open AI API key to respond. It is responding by itself. So please give me some guidance. #1211483291191083018
v
Suggestion: To avoid conflicts between your knowledge base and API request tool, make your knowledge base description as specific as possible so the assistant only uses it for targeted queries. For example, when creating your Query Tool, set the description like this:
Copy code
json
{
  "description": "Use this knowledge base only when the user asks about product specifications. For all other queries, use the API request tool."
}
This helps Vapi route queries correctly and ensures your OpenAI API is triggered for general questions. After updating, test with different queries to confirm the behavior. [See more in the official docs.](https://docs.vapi.ai/knowledge-base/using-query-tool#knowledge-base-description) Source: - [Using the Query Tool for Knowledge Bases](https://docs.vapi.ai/knowledge-base/using-query-tool)
p
Make sure tool names match precisely in the prompt, return a strict JSON response with the correct
toolCallId
and
result
fields, and check Webhook Logs to confirm the issue..
s
The problem is if i am using both tools together it is not even triggering my webhook
p
Include all required parameters with
"strict": true
, and your webhook returns a 200 response with the correct JSON, including the exact
toolCallId
and a single-line string result..