https://retellai.com/?utm_source=discord&utm_medium=seo logo
Can we extract data about the knowledgebase docume...
# ❓・ai-evy-support
s
@AI Evy Can we extract data about the knowledgebase documents used during a call through the API?
a
Thanks for tagging me @skitrobot. I'll look through relevant sources and get back to you shortly.
### Answer Yes, you can extract data about the knowledge base documents used during a call through the API. The Get Call API response includes a field called knowledge_base_retrieved_contents_url, which provides a URL to the retrieved contents related to the knowledge base for that call. This file can be downloaded and checked against the transcript to view the knowledge base retrieval results [(1) ]() , [(2) ]() , [(3) ]() , [(4) ]() , [(5) ]() .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
s
@AI Evy Would this url be deleted if opt_out_sensitive_data_storage is set to true?
a
Thanks for the follow-up, @skitrobot. I'll get back to you soon.
### Answer If you set opt_out_sensitive_data_storage to true, Retell AI will not store transcripts, recordings, or logs, which includes knowledge base retrieved contents logs. However, you will still receive webhook events with links to sensitive data (such as the knowledge_base_retrieved_contents_url) , but these links (including to call recordings or knowledge base retrieval files) will expire after 10 minutes upon receiving the webhook. After that, querying the call with the get call API will not return these fields or files—they are not stored long-term if opt-out is enabled [(1) ]() .
​ To learn more, see the sources I considered: [[1] Data Storage Settings - Retell AI](https://docs.retellai.com/accounts/privacy-disable) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
s
@AI Evy I did a test web call but I don't see knowledge_base_retrieved_contents_url in the call object
a
Thanks for the follow-up, @skitrobot. I'll get back to you soon.
### Answer The field knowledge_base_retrieved_contents_url is documented as part of the call object in the API responses for phone calls and web calls [(1) ]() [(2) ]() [(3) ]() [(4) ]() . However, if you do not see this field after a test web call, it may indicate that no knowledge base retrieval occurred during that call, or that the agent/conversation flow did not trigger retrieval from the knowledge base. It's also possible for this field to be absent if the knowledge base is not configured or not consulted during the call [(5) ]() . If you are expecting retrieval and not seeing the field, you may want to verify the following: - The knowledge base is properly linked to the agent and conversation flow. - The conversation flow or prompts are designed to trigger knowledge base retrieval. - There are no configuration or indexing issues with the knowledge base . You can check the conversation logs (public_log_url) or review the call details to confirm if a retrieval attempt was made [(2) ]() [(3) ]() [(4) ]() . For more troubleshooting, see the discussion at [Knowledge base retrieval is not happening]() [(5) ]() .
​ To learn more, see the sources I considered: [[1] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) [[2] List Calls](https://docs.retellai.com/api-references/list-calls) [[3] Get Call](https://docs.retellai.com/api-references/get-call) [[4] Create Web Call](https://docs.retellai.com/api-references/create-web-call) [[5] Knowledge base retrieval is not happening](https://discord.com/channels/1186424376300679209/1352014353922002975) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.