My assistant always says goodbye when needs to use...
# support
j
I'm using trieve as my knowledge base. I need search in a table stored in trieve to say the price of a product. But, every time that I ask for some price there, the assistant don't answer me or says goodbye. I don't know how to solve it. There is another way to make that? After I would like make questions as "what's the lowest price of jackets, etc". Can you help me?
v
Hi there! 👋 I can help you troubleshoot your assistant that's saying goodbye when trying to access your Trieve knowledge base. First, let's fix the knowledge base access issue: 1. Check your knowledge base configuration - Make sure your knowledge base is correctly set up with the appropriate
fileIds
that your assistant can access. Verify that the knowledge base ID is correctly associated with your assistant [source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334889552002809928). 2. Verify API keys - Ensure you're using the correct API keys for Trieve. An unauthorized or incorrect API key could cause your assistant to fail when accessing the knowledge base [source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1333333836884671012). 3. Check permissions - Confirm your assistant has the necessary permissions to access the knowledge base [source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336051824402239579). 4. Review your assistant configuration - Make sure your assistant is properly configured to use the knowledge base. Here's an example configuration:
Copy code
json
{
  "model": {
    "knowledgeBaseId": "YOUR_KNOWLEDGE_BASE_ID",
    "temperature": 0.2,
    "provider": "openai",
    "model": "gpt-4o",
    "messages": [
      {
        "content": "You are a smart assistant who responds to user queries using the information you know or information supplied by outside context.",
        "role": "system"
      }
    ]
  }
}
For implementing complex queries like "what's the lowest price of jackets": 1. Configure your search plan - Adjust your search plan settings for better retrieval:
Copy code
json
{
  "searchPlan": {
    "scoreThreshold": 0.3,
    "searchType": "hybrid"
  }
}
2. Optimize your data structure - Make sure your product data is well-structured in Trieve and that chunk sizes are optimized (200-1000 tokens recommended) [source](https://docs.vapi.ai/knowledge-base/integrating-with-trieve). 3. Capture and pass queries - Ensure your frontend properly captures user queries and passes them to the Vapi assistant:
Copy code
javascript
let questions = getQuestionsFromUserInput();
let apiRequestData = {
  type: "assistant-request",
  call: {
    questions: questions
  }
};
Let me know if you need more specific help with any of these steps! 🙂 Sources: - [Discord Discussion](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334889552002809928) - [Discord Discussion](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1333333836884671012) - [Discord Discussion](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336051824402239579) - [Vapi Docs](https://docs.vapi.ai/knowledge-base/integrating-with-trieve) - [Discord Discussion](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1335230139252080691)
n
It's probably a system prompt issue
It usually needs to be tweaked with something so the model knows how to use the retrieved context
a
Hey! To help track down this issue, could you share: - The call ID This would really help us figure out what went wrong!