https://retellai.com/?utm_source=discord&utm_medium=seo logo
Will increasing the amount of chunks returned from...
# ❓・ai-evy-support
m
@AI Evy Will increasing the amount of chunks returned from the knowledge base increase latency? and also by how much
a
Thanks for tagging me @Maurizio Isendoorn. I'll look through relevant sources and get back to you shortly.
### Answer Yes, increasing the number of chunks returned from the knowledge base will increase latency. [(1) ]() The latency breakdown includes a dedicated
knowledge_base
field that measures "Knowledge base retrieval latency from triggering retrieval to receiving all relevant context." The
knowledge_base
latency component tracks statistical metrics including p50, p90, p95, p99, min, max, num, and values for all individual latency data points in milliseconds. This field is only populated when the agent uses the knowledge base feature. However, the available documentation doesn't specify the exact amount of latency increase per additional chunk. To understand the impact on your specific use case, you can check the actual latency by retrieving call details using the Get Call API, which will show you the
knowledge_base
latency statistics. You can retrieve this information with:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: process.env['RETELL_API_KEY'],
}) ;
const callResponses = await client.call.list() ;
console.log(callResponses) ;
[(2) ]() The response will include the
latency
object with the
knowledge_base
component showing the retrieval time. [(2) ]() [(1) ]()
​ To learn more, see the sources I considered: [[1] Check actual latency](https://docs.retellai.com/reliability/check-actual-latency) [[2] List Calls](https://docs.retellai.com/api-references/list-calls) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.