Spot pricing in container shipping is far more complex than looking at historical freight rates. A pricing decision has to weigh several real-time signals at once:
- demand and supply;
- vessel capacity utilisation;
- fuel prices;
- port congestion;
- seasonality and holidays;
- competitor pricing;
- the customer segment and its historical acceptance rate.
This is a conceptual design for an AI spot price recommendation engine that combines machine learning, large language models, retrieval-augmented generation (RAG) and the Model Context Protocol (MCP) to produce pricing recommendations people can understand and check.
What spot pricing means in container shipping
A spot rate is the price for a single shipment at current market conditions, as opposed to a contract rate agreed months ahead. Carriers now quote instant spot prices online on many trade lanes, so a decision that used to take a sales desk hours has to be made in seconds, consistently, across thousands of lanes and dates.
Architecture
- Historical booking data trains an XGBoost regression model.
- Feature engineering uses structured logistics data.
- RAG retrieves pricing policies, port disruption events, market intelligence, customer contracts and past pricing decisions.
- MCP tools provide live business context: vessel utilisation, competitor rates, the fuel index, demand forecasts and booking history.
The LLM does not set the price
XGBoost predicts the price. The LLM explains why the recommendation makes sense, using the business context retrieved through RAG and the live enterprise APIs exposed through MCP. That split keeps the number grounded in data and the explanation grounded in policy and market facts.
Example model features
Origin and destination, trade lane, container type, booking lead time, capacity utilisation, historical spot rate, competitor pricing, fuel price index, port congestion index, demand forecast, customer tier, historical acceptance rate, equipment availability, seasonality and weather risk.
Why combine XGBoost and an LLM?
Machine learning excels at prediction; LLMs excel at reasoning and explanation. Together they give accurate recommendations, explainable AI, business-aware pricing and a pricing assistant that commercial teams can question.
Guardrails: pricing teams stay in control
- Floors, ceilings and approval thresholds are set by the pricing team.
- The engine recommends; prices change automatically only on lanes where it has earned that trust.
- Every recommendation is logged with its inputs and explanation, so decisions can be audited.
- Recommendations are back-tested regularly against accepted and rejected quotes.
The same pattern applies well beyond shipping: airline pricing, hotel revenue management, insurance premiums, retail dynamic pricing and logistics optimisation.
Frequently asked questions
What is AI spot pricing?
AI spot pricing uses machine learning to recommend a price for a single shipment from live signals such as capacity, demand, fuel costs, congestion and competitor rates, instead of relying on a static rate card.
Why use XGBoost and an LLM together?
XGBoost is good at predicting a number from structured data; a large language model is good at explaining it. Using each for what it does best gives a price grounded in data and an explanation commercial teams can check.
What do RAG and MCP add to a pricing engine?
Retrieval-augmented generation (RAG) gives the model the right documents, such as pricing policies and contracts. The Model Context Protocol (MCP) gives it controlled access to live systems, such as vessel utilisation and booking history.
Does the AI set prices on its own?
Not by default. The engine recommends a price with an explanation, within limits set by the pricing team, and people approve exceptions. Automation is extended lane by lane as the recommendations prove reliable.
This thinking shaped our AI Spot Price Recommendation Engine, and it builds on our work on dynamic spot pricing for Maersk. See our revenue management and pricing services, or talk to us about pricing in your business.
Related reading: how to build spot pricing for a container booking platform; what is agentic AI?.
