Hi Team
Nick is correct here. A 50,000-row inventory CSV is not a good fit for a Knowledge Base lookup.
The Knowledge Base is better suited for descriptive information such as FAQs, policies, product notes, troubleshooting steps, and general guidance. For exact SKU or stock availability lookups, you really want a database/API query, because the answer needs to be precise, fast, and current.
At the moment, the 3CX AI Agent Knowledge Base should not be treated as a live inventory lookup engine. Splitting the CSV into smaller files may improve retrieval in some cases, but it will still not be as reliable as querying your stock system directly. Also, while OpenAI allows CSV files to be uploaded, CSVs are not ideal for this type of retrieval use case.
The right long-term approach would be something like this:
- Keep the inventory data in a proper database, for example PostgreSQL, MySQL, MariaDB, SQL Server, BigQuery, or similar.
- Place an MCP server or API layer in front of that database, exposing safe lookup actions such as check_stock_by_sku Examople DBHub which supports all the above mentioned databases
- Wire the AI Agent to speak to that MCP/API layer instead of trying to search a large CSV file. (We have to do this from our side.)
The flow would look like this:
3CX AI Agent → MCP client layer → MCP/API server → Database
For example:
- Caller asks: “Do you have SKU ABC123 in stock?”
- The AI Agent detects that this requires an inventory lookup.
- The AI Agent calls a safe tool such as check_stock_by_sku.
- The MCP/API layer queries the inventory database.
- The result is returned to the AI Agent.
- The AI Agent replies: “Yes, SKU ABC123 is in stock. We currently have 14 units.”
This type of integration is something we are working towards, especially around MCP/tool/API-style integrations. For now, I would avoid using the Knowledge Base for large SKU inventories and keep it for general information the AI can answer from reliably.