Limits of Spacial Logic and Calculation in RAG

I’m building an Assistant to optimize pallet usage for orders by calculating the minimum number of pallets required for a customer order. This is a ‘simple’ and straightforward application of RAG, demanding the analysis of two small csv files and an integer as output. Here’s the data i’m providing to the model:

Product Details: product code, height, base surface area, weight, stacking possibility (top and bottom), toxicity
Order Details: order number, product codes

Palette max weight and dimension is constant, and the logical constraints I am imposing are relatively few - essentialy weight and volume, as well as item fragility and toxicity- nothing crazy.

However, the model’s performance has been exceptionaly, although not very surprisingly poor. Despite my extensive experience in prompting GPTs to conduct client analysis and recommendations using large structured data files (each exceeding 100,000 KB), it struggles notably with spatial logic. Basic concepts such as stacking objects and calculating available surface area seem to be challenging.

I’m curious if there are existing models proficient in spatial logic and reasoning that could better suit this application. Thus far, I haven’t come across any logistics software capable of handling a large and dynamically changing product database for this type of calculation.


I don’t see why you’d want to use an LLM here when you’re dealing with predefined dimensions.

Pass this, and any logic to what’s built for it: programming