### Answer
If your Retell AI agent is pulling information from the wrong knowledge base or returning unrelated answers, some possible causes and troubleshooting steps are:
- If you have uploaded files with similar or duplicate content (like employee names) in multiple knowledge bases, the retrieval mechanism may not always return the expected file unless the content is well-structured and unambiguous [(1) ](
) .
- The agent retrieves the most relevant "chunks" from all linked knowledge bases based on the conversation context, not just on file or KB name. If the same name appears in multiple places, it may match any of those chunks .
- File format and structure are important. Issues have been reported when files have the wrong extension (e.g., .md for XML content) , which can cause the agent to misinterpret the content and fail to retrieve the correct information. Use the correct file extension for each file type [(2) ](
) .
- For best results, use clear headings, short and focused sections, and avoid ambiguous references in your knowledge base files. Group related details together, and use well-structured Markdown (.md) files where possible [(1) ](
) .
- If your data is tabular (like a list of employees and departments) , consider reformatting it into FAQ-style entries or splitting complex data into smaller files for more accurate retrieval [(3) ](
) .
You can review and adjust your knowledge base structure following these guidelines. If you continue to experience issues, check that your files have the correct format and extension, and consider restructuring your data for better retrieval accuracy.