From Natural Language to SQL: How FourSight AI Answers Supply Chain Questions

From Natural Language to SQL: How FourSight AI Answers Supply Chain Questions

The analytics bottleneck

Supply chain organizations generate enormous volumes of data and an enormous number of questions about it. 'Why are my Northeast shipments delayed this week?' 'Which carriers have the worst on-time performance on my top 20 lanes?' In most organizations, these questions flow to an analytics team. Turnaround: hours to days. During peak disruption, the queue grows and answers arrive too late.

Architecture

The Redshift Analytics Agent

At the core of FourSight AI is a system that translates natural language into SQL against the FourKites data warehouse. Not simple text-to-SQL. The agent understands the FourKites data model: which tables contain shipment data, how loads relate to orders, how facility timestamps map to operational events, and how to calculate derived metrics like OTIF percentage or average dwell time. When a user asks 'Why are my shipments delayed?', the agent decomposes it into sub-queries across geographic scope, time period, metrics, and explanatory dimensions (carrier, lane, facility, weather, day of week).

Domain knowledge layer

FourSight AI understands supply chain semantics. It knows 'late' means different things for different shipment types. It knows 'my top lanes' should rank by volume, not alphabetically. It knows dwell time at a DC measures gate-in to gate-out, not appointment to departure. This domain knowledge is encoded in the system, not learned from each prompt. A generic text-to-SQL tool needs the user to specify these semantics every time.

Small Language Model exploration

FourKites is exploring smaller, fine-tuned models for specific FourSight tasks. The hypothesis: a model trained on supply chain terminology, FourKites schemas, and common query patterns can match frontier model performance on FourSight-specific tasks while running faster and cheaper. The frontier model remains available for complex, multi-step analytical questions.

From answers to actions

The most important architectural decision: the handoff to Loft. When FourSight detects a pattern addressable by automation, it suggests a Loft workflow as a CTA. 'Your Carrier X shipments on Memphis-to-Dallas are late 35% of the time. Set up an automated escalation workflow?' Intelligence becomes execution. This closes the loop that every other analytics platform leaves open.

Newsletter
Stay Informed. Join 30,000+ monthly readers and get exclusive ebooks, reports, and industry insights from FourKites every week.

In order to respond to your inquiry, it's necessary for FourKites to process your personal information as requested in this form. More detailed information about the processing of your information can be found in our Privacy Notice.

Thank you for your submission!

Oops! Something went wrong while submitting the form.

One billion hours of operational work completed by AI agents over the next decade.

The supply chains that adopt autonomous execution in the next 24 months will define the competitive standard for the next decade. The ones that do not will spend that decade trying to catch up.
Ready? Talk to an Outcome Advisor
See our agents in action
Explore Outcomes