Knowledge Base Size Limitations?

jerm324

Customer
Joined
Feb 9, 2023
Messages
22
Reaction score
2
I don't know if this is a limitation of the configuration in 3CX or a limitation in OpenAI's API. I uploaded a 1mb csv file with about 50,000 rows and just two columns containing SKU and Inventory to the knowledge base. When asking my AI agent to check stock on certain SKU's, it can't find them, even though they are there for sure. Asking about SKU's that are near the beginning usually has success but ones in the middle or near the end usually fail, like it's failing to load the whole file. Any ideas on how to solve this?
 
Hello,

While that size of file should be within the limits openAI has, splitting it either into smaller files within the same knowledge base, or if there is enough distinction amongst the items into properly defined separate knowledge bases might improve performance.

Could you let us know what models you have chosen and what the PBX and AI versions are? Have you tried other models?
 
This is not a good way to use AI. If you have a database with stock items, you should make an application that checks the stock with a database query. Uploading the whole CSV file is not going to be reliable and very expensive.

Of course you can build the application with the help of AI
 
This is not a good way to use AI. If you have a database with stock items, you should make an application that checks the stock with a database query. Uploading the whole CSV file is not going to be reliable and very expensive.

Of course you can build the application with the help of AI
Very well aware of this. I already have this. I don't see any way to allow the AI to use it within the current 3CX AI implementation. If there is I would very much like to know how.
 
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:
  1. Keep the inventory data in a proper database, for example PostgreSQL, MySQL, MariaDB, SQL Server, BigQuery, or similar.
  2. 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
  3. 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:
  1. Caller asks: “Do you have SKU ABC123 in stock?”
  2. The AI Agent detects that this requires an inventory lookup.
  3. The AI Agent calls a safe tool such as check_stock_by_sku.
  4. The MCP/API layer queries the inventory database.
  5. The result is returned to the AI Agent.
  6. 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.
 
Well my entire purpose of using a CSV file was to workaround the inability for the 3CX AI agent to work with my existing API's. So the real answer is that what I want to do is not currently possible.
 
Yes, that is a fair summary.

For the current 3CX AI Agent implementation, connecting directly to your existing external APIs during the conversation is not currently supported. So using a CSV as a Knowledge Base is understandable as a workaround, but it is not the right tool for exact inventory lookups at that scale.

For stock/SKU checks, the reliable solution is still an API or database query. That is exactly the type of scenario we want to support better in the future with tool/API/MCP-style integrations, where the AI Agent can call a controlled lookup such as check_stock_by_sku and return the live result.

So yes, for now, what you want to do is not possible in the clean way it should be done. The Knowledge Base can help with general/static information, but it should not be treated as a replacement for live API/database access. We need to wait for the MCP.

Thanks
 
  • Like
Reactions: Evolute IT

Members Online Now

No members online now.

Forum statistics

Threads
111,832
Messages
589,285
Members
164,662
Latest member
DejanMDS