Knowledge source optimization for large datasets.
Your 3CX AI Agent is a powerful tool, transforming customer interactions and streamlining support. But what happens when your agent starts to slow down, or struggles to find information in a vast pool of knowledge?
Today, we're diving deep into best practices for structuring your 3CX AI Agent's knowledge sources, also commonly referred to as knowledge bases, to ensure it's always performing at its peak – delivering quick, accurate and relevant answers every time, especially when dealing with large datasets.
The Right Tool for the Job: Knowledge Source vs. Live Data
One of the most common questions we get is about using the knowledge sources for live inventory lookups or other dynamic data. While it might seem intuitive to upload a large CSV file with 50,000 rows of SKUs and inventory counts, this isn't an ideal use case for the 3CX AI Agents.
Why Large CSVs for Inventory Don't Work Well
- Precision and Speed: The knowledge sources are designed for descriptive information – FAQs, policies, product notes, troubleshooting steps and general guidance. For exact SKU or stock availability lookups, you need an answer that is precise, fast and current.
- Retrieval Limitations: At present, 3CX AI Agent knowledge sources are not built as a live inventory lookup engine. While splitting a large CSV into smaller files might improve retrieval in some cases, it won't be as reliable or efficient as querying your stock system directly. OpenAI, which powers our AI Agents, allows CSV uploads, but they aren't optimized for this specific type of real-time, precise data retrieval.
For dynamic, real-time data like inventory, you really want a database/API query. For now, avoid using the knowledge sources for large SKU inventories and keep it for general information the AI can answer reliably.
Optimizing your Knowledge Sources for Speed and Accuracy
Now, let's look at what they are perfect for, and how to make them efficient for those use cases. If you've noticed your AI Agent taking longer to respond when a knowledge source is attached, it often comes down to how your data is structured.
The key to fast retrieval is ensuring your data is properly split, clearly described and stored in a clean, structured format such as Markdown.
Here's how to make your retrieval as fast as possible
- Split by topic, not size: Instead of one giant file with mixed information, break your sources or files into clear, distinct topics. Each file or source should have a specific purpose. Example: If you sell cushions and pillows, create two separate knowledge sources: one for "Cushions Product Information" and another for "Pillows Product Information." This helps the AI isolate the relevant data, processing the smallest set possible.
- Avoid large, mixed files: Very large files - where unrelated topics are grouped together - will inevitably slow down retrieval and reduce accuracy. The AI has to sift through more irrelevant information to find what it needs.
- Prefer Markdown for knowledge source files: For best results, structure your knowledge source content in Markdown
(.md)whenever possible. Markdown files are lightweight, clean and easy for AI systems to read, split and retrieve accurately. They allow you to use headings, subheadings, bullet points, tables and clear sections, which helps the AI understand the structure of the information. - Use clear descriptions: When you create multiple knowledge sources, segregate information with no overlap. It’s important to provide a clear description for each knowledge source. This description acts as a guide for the AI, helping it select the most appropriate source based on the user's query.
- Structure your files intelligently: If you are using CSVs for descriptive data (not live inventory), ensure the content is easy to determine by proximity metrics. For example, if you have two CSVs, make sure the first column clearly defines the product type, or include a clear line at the top explicitly defining the content. This helps ensure only the most relevant file returns a strong match.
Example
Instead of uploading a PDF, Word document or plain text file as is, with unstructured content, convert it into Markdown first (You can use AI for this). This is especially useful for company knowledge bases, FAQs, product documentation, troubleshooting guides and policy documents.
An example of a well-structured Markdown file might include:
# Product Returns Policy
## Return Window
Customers can return products within 30 days of purchase.
## Conditions
- The product must be unused.
- The original receipt is required.
- Damaged items must be reported within 48 hours.
## Refund Process
Refunds are processed within 5 business days.
Join the Discussion
Join the 3CX discussion in our dedicated Partner or Customer Forums. Follow us on X and LinkedIn to stay-up-to date on latest news and feature releases.

