Knowledge Base override per call.
# support
n
Hi! So I have a Trieve account with a bunch of datasets with my data. I would like to be able to dynamically assign specific dataset to assistant call. Is that possible? If I create a KB upfront and assign it to the assistant - it queries it and works fine. But when I do an override like this: { "variableValues": { "productName": "Dummy Product", "categoryName": "Dummy Category", "companyEmail": "contact@dummycompany.com", "productId": 101, "namePhoneticSpelling": "Duh-mee Prod-uct" }, "model": { "knowledgeBase": { "createPlan": { "type": "import", "providerId": "0a418e98-805f-4513-a563-339db6a07a53" }, "provider": "trieve" }, "model": "gpt3.5", "provider": "openai" }, "server": { "url": "https://dummyserver.com/callback" } } It does not query my dataset, it seems. What am I doing wrong? Is there a way to achieve dynamic override? Or do I need to attach KB beforehand?
n
Right now I believe you can only have one knowledge base per assistant
s
@nazar can you share the call ID so I can check it? You can only use one knowledge base with your assistant, but you can configure it at runtime using assistant overrides.
Thanks @Nick K - CEO @ Trieve for helping @nazar .
n
@Shubham Bajaj here is an example call id where I attached the trieve dataset on the fly: "call": { "id": "24ecce51-1ed1-4214-afcd-9a804e33ffdd" } Yes. I need only one but I indeed want to configure which trieve dataset to use on the fly. Should I create KB for each dataset in advance and provide assistant overrides with that KB id instead of what I am passing into it now? I cannot find relevant API documentation for this.
@Shubham Bajaj could you please help me here?
s
@nazar The approach you are following is correct, and you can continue with this as long as you intend to use a dynamic or transient trie ve database. For the shared call ID there was an issue with API key, which is resolved by now. You can try again and it will work. 🟡 11:19:00:172 Error searching Trieve: { "message": { "message": "Request failed with status code 401", "data": {"message": "Unauthorized"} },
@nazar let me know if you require further help.
n
Thank you for your feedback! This sounds promising and I tried once again. Call id: af0d40d3-f854-437d-ba2c-a608736b62b5 I attached trieve dataset via KB but there were no queries to that dataset throughout the call with assistant. Do you know why? Is there still 401 error?
n
Are you sure the update to the assistant to attach the KB was successful? Can you see the knowledgeBaseId attached when you get the assistant via API?
n
I’m not attaching KB to the assistant permanently. That is not the intention and not the question. I have N concurrent calls where for each call assistant needs to use another dataset. So I cannot statically attach KB to the assistant- it won’t work. The way I’m trying out and request that I put as an example above is meant to attach trieve dataset to the assistant on a per-call basis, as an override.
n
Hmm, let me take a look again today and get back to you
n
Thanks
k
Marking this ticket as Solved ✅
n
It was not solved.
n
If you want, feel free to DM me and I can send you a cal link to try and help you live debug
s
@nazar what's the issue your facing as of now?
n
I tried once again. Call id: af0d40d3-f854-437d-ba2c-a608736b62b5 I attached trieve dataset via KB but there were no queries to that dataset throughout the call with assistant. Do you know why? Is there still 401 error?
k
Hey, can you use the KB directly via dashboard? .
n
So I ended up switching to custom KB and not using trieve or anything else
This can be considered resolved.