Is there a way to add metadata filter to the knowl...
# support
s
I am trying to add memory to the assistant with the knowledge base, and now i have a task to give it user-level memory - my first approach was to use RAG with a tool call, but that is not very efficient and adds more latency. My goal is to save the transcript summary in the trieve in a "user_lvl_memory" knowledge with a phone_number metadata filter and when i make the call to the assistant - transient assistant, I will pass that user_lvl_memory knowledgebase with phone_number filter hope this makes sense, maybe this is not available or there are alternatives that can be used
v
According to the documentation I found, Vapi does support metadata fields in Trieve knowledgebases where you can "adjust numeric metadata for filtering" within individual chunks. For your use case, consider using the knowledgeBase payload with dynamic fileId in a transient assistant:
Copy code
json
{
  "model": {
    "provider": "openai",
    "model": "gpt-4o",
    "knowledgeBase": {
      "provider": "trieve",
      "datasetId": "your_dataset_id"
      // Metadata filtering would be configured here
    }
  }
}
For specific implementation details, I recommend contacting Trieve's support team directly. Sources: - [Vapi Documentation](https://docs.vapi.ai/knowledge-base/integrating-with-trieve) - [Discord Conversation](https://discord.com/channels/1211482211119796234/1339000190488543273)
k
Yes, you can implement user-level memory in Vapi by storing transcript summaries in a Trieve kB with phone number metadata, then using a query tool with filters to retrieve relevant memory during calls via a transient assistant, offering a more efficient alternative to tool-call-based RAG.
s
thanks
c
Marking this ticket as Solved ✅
2 Views