https://retellai.com/?utm_source=discord&utm_medium=seo logo
im having issues with the bot correctly chunking f...
# ❓・ai-evy-support
x
@AI Evy im having issues with the bot correctly chunking from the knowledge base, my knowledge base has a lot of information but what im trying to get is in there multiple times both chunked and unchunked(large file), what is good practice to increase accuracy on the knowledge base retrievals
a
Thanks for tagging me @xmangomelon. I'll look through relevant sources and get back to you shortly.
### Answer To improve knowledge base retrieval accuracy in Retell AI, follow these best practices: Format and Structure: - Use markdown format for your sources with clear paragraphs - it will be easier to chunk and is easier to be retrieved [(1) ]() - Group relevant information together in one chunk to improve retrieval accuracy - Avoid ambiguity and use specificity in references - when the chunk is retrieved, it's best to contain specific references like name, dates, and less ambiguous terms like
it
or
this
File Organization: - For tabular data or image data, it's sometimes hard for the system to recognize the correct data and put relevant information together in one chunk, so it might yield suboptimal results - Use correct file extensions - files with incorrect extensions (like XML files ending with .md) can cause processing issues [(2) ]() Knowledge Base Improvements: Retell AI recently upgraded to Knowledge Base 2.0, which provides [(3) ]() : - Smarter recall - agents now focus on the most relevant parts of each conversation to retrieve accurate answers - Improved ranking - irrelevant chunks no longer show up ahead of the correct information - Better precision - key details like phone numbers and addresses are much more likely to surface - Up to 50% improvement in answer accuracy in large-scale tests Technical Considerations: - The knowledge base is intended to supply supporting information to the agent, so it should not be used to provide instructions or prompts to the agent [(1) ]() - During calls, the agent uses the transcript so far (prompt is not included) to f
ind the most relevant chunks from the knowledge base - Retrieved knowledge base content will be appended to the LLM prompt under the header ///## Related Knowledge Base Contexts If you're still experiencing chunking issues after implementing these practices, the recent Knowledge Base 2.0 upgrade should significantly improve retrieval accuracy for your use case.
​ To learn more, see the sources I considered: [[1] Knowledge Base](https://docs.retellai.com/build/knowledge-base) [[2] Knowledge base bug](https://discord.com/channels/1186424376300679209/1395139321622958160) [[3] Major Platform Upgrades: Knowledge base, warm transfer, Voice & Analytics](https://www.retellai.com/changelog/major-platform-upgrades-knowledge-base-warm-transfer-voice-analytics) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
x
Garbage Pickup and Bulk Trash Schedule For ADDRESS , garbage pickup is on Tuesday & Friday and bulk trash is during the Second Week of the Month. For ADDRESS , garbage pickup is on Tuesday & Friday and bulk trash is during the Second Week of the Month. For ADDRESS , garbage pickup is on Tuesday & Friday and bulk trash is during the Second Week of the Month. For ADDRESS , garbage pickup is on Tuesday & Friday and bulk trash is during the Second Week of the Month. For , garbage pickup is on Tuesday & Friday and bulk trash is during the Second Week of the Month. For ADDRESS , garbage pickup is on Tuesday & Friday and bulk trash is during the Second Week of the Month. this is how its formatted now, i converted all of the actual addresses for privacy
@AI Evy Garbage Pickup and Bulk Trash Schedule For ADDRESS , garbage pickup is on Tuesday & Friday and bulk trash is during the Second Week of the Month. For ADDRESS , garbage pickup is on Tuesday & Friday and bulk trash is during the Second Week of the Month. For ADDRESS , garbage pickup is on Tuesday & Friday and bulk trash is during the Second Week of the Month. For ADDRESS , garbage pickup is on Tuesday & Friday and bulk trash is during the Second Week of the Month. For , garbage pickup is on Tuesday & Friday and bulk trash is during the Second Week of the Month. For ADDRESS , garbage pickup is on Tuesday & Friday and bulk trash is during the Second Week of the Month. this is how its formatted now, i converted all of the actual addresses for privacy
a
Thanks for the follow-up, @xmangomelon. I'll get back to you soon.
### Answer Looking at your garbage pickup schedule format, I can suggest several improvements based on Retell AI knowledge base best practices: Format Improvements for Better Chunking: Your current format has repetitive information that could confuse the retrieval system [(1) ]() . Here's how to improve it using markdown formatting:
Copy code
markdown
# Garbage Pickup and Bulk Trash Schedule

## Schedule Information
- **Garbage Pickup Days**: Tuesday & Friday  
- **Bulk Trash Week**: Second Week of the Month

## Covered Addresses
- [Specific Address 1]
- [Specific Address 2] 
- [Specific Address 3]
- [Specific Address 4]
- [Specific Address 5]
- [Specific Address 6]
Key Recommendations: 1. Use markdown format with clear paragraphs - it will be easier to chunk and is easier to be retrieved 2. Group relevant information together - instead of repeating the same schedule for each address, consolidate the schedule information and list the addresses separately 3. Avoid ambiguity and use specificity in references - when the chunk is retrieved, it's best to contain specific references like names, dates, and less ambiguous terms 4. Split your knowledge base - as mentioned in the workshop, it's better to split knowledge bases and use markdown format for better reliability [(2) ](

▾

) The current repetitive format may cause the system to retrieve multiple similar chunks with the same information, reducing accuracy. By structuring it with clear sections, you'll improve both chunking and retrieval performance.
​ To learn more, see the sources I considered: [[1] Knowledge Base](https://docs.retellai.com/build/knowledge-base) [[2] Master The Future of Voice AI - Conversation Design & Agent Persona](

https://www.youtube.com/watch?v=42V0bDQIsb0▾

) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
x
@AI Evy the file is like 27000 lines long
a
Thanks for the follow-up, @xmangomelon. I'll get back to you soon.
### Answer For a 27,000-line file, you have several options to optimize knowledge base performance: File Size Limits: Each knowledge base has a limit of at max 25 files, with each file at max 50MB [(1) ]() . Your file should be within the size limit, but the length creates chunking challenges. Recommended Approach for Large Files: 1. Split into multiple knowledge bases - You can create multiple knowledge bases to overcome the limits, and an agent can have more than one knowledge base linked to it . 2. Break down by logical sections - Instead of one massive file, create separate files for different areas, neighborhoods, or zones. This will improve retrieval accuracy since the system can focus on more relevant chunks. 3. Use structured markdown format - Use markdown format for the source, with clear paragraphs as it will be easier to chunk and is easier to be retrieved . For your garbage schedule specifically:
Copy code
markdown
# Zone A Garbage Schedule
## Tuesday & Friday Pickup Areas
- Address 1
- Address 2
- Address 3

## Bulk Trash: Second Week of Month
All addresses in Zone A follow this schedule.
Knowledge Base 2.0 Benefits: The recent upgrade provides up to 50% improvement in answer accuracy, with smarter recall that focuses on the most relevant parts of each conversation to retrieve accurate answers [(2) ]() . Best Practice: Group relevant information together in one chunk to improve retrieval accuracy, and avoid ambiguity by using specific references like names and dates rather than ambiguous terms [(1) ]() . Breaking your 27,000-line file into logical, smaller knowledge bases will significantly improve chunking and retrieval performance.
​ To learn more, see the sources I considered: [[1] Knowledge Base](https://docs.retellai.com/build/knowledge-base) [[2] Major Platform Upgrades: Knowledge base, warm transfer, Voice & Analytics](https://www.retellai.com/changelog/major-platform-upgrades-knowledge-base-warm-transfer-voice-analytics) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.