The Rules That Eliminate 65% of WestJet’s Network

▶ Watch (3:42)

A Canadian carrier cannot fly Las Vegas to New York with a Toronto stop. That violates cabotage. Minimum connection times kill short layovers. Security rules block Toronto-to-Dublin via Vancouver. Every rule applies per day, week, and season. The result is a combinatorial explosion. Of WestJet’s theoretical network, only 35% becomes routable. The other 65% is eliminated by business rules. Thousands of flights and hundreds of airports make manual validation impossible.

From Spreadsheets to SIM Files to SPS

▶ Watch (4:57)

Schedules were once updated twice a year in spreadsheets. WestJet replaced that with the Schedule Publication Service (SPS). SPS ingests industry-standard SIM files, a flat-file format from the 1970s with fixed-width fields. It also receives daily amenities data and minimum connection times from a vendor. Business rules for cabotage, security, and seasonality are applied. SPS outputs clean routable origin-destination pairs, routes, and amenities data that power westjet.com.

Breaking the Cypher Barrier

▶ Watch (7:03)

The SPS data lives in a Neo4j graph database. Airports are nodes, flights are edges, with properties for times, distances, equipment, and connection rules. The scheduling and network planning teams, who decide which cities WestJet flies to, do not know Cypher. The query language was a barrier to asking business questions. The mission: democratize access to the flight network graph. Let anyone ask questions in plain English and get answers backed by real data.

MCP in Production: Architecture and Demo

▶ Watch (7:47)

The solution runs on Kubernetes. A cloud desktop client sends a natural language question to a custom MCP proxy. The proxy forwards to a Neo4j MCP server that exposes tools. Claude interprets the question, loads the Neo4j schema, generates a Cypher query, and runs it. The response is formatted as an answer. In the demo, the question “How many direct destinations WestJet serves from Victoria, BC?” returned “eight direct non-stop destinations.” The tool is not a proof of concept; people use it.

Q&A

How does the schedule optimization team use the tool? The team uses it to analyze connections at airports and increase the number of possible layovers. ▶ Watch (10:42)

What does the proxy layer do that the Neo4j server doesn’t? The proxy adds an authentication layer and can expose other informational services from the team. ▶ Watch (11:23)

Have you talked to Neo4j about fine-tuning LLMs for Cypher? Neo4j said they have no plans for a fine-tuned model; they recommended using state-of-the-art models and have their own text-to-Cypher project. ▶ Watch (12:59)

How did you validate the query results are correct? The team built the tool with minimal resources and gave it to another team to test with real use cases before deciding whether to invest more. ▶ Watch (13:52)

Notable Quotes

Democratize access to WestJet flight network graph. Anton Lysov · ▶ Watch (7:24)

MCP made it all possible, not as a proof of concept, not as a hack day project, it’s an actual tool that people use. Anton Lysov · ▶ Watch (7:39)

The query language shouldn’t be a barrier for it. Anton Lysov · ▶ Watch (7:19)

Every single discount airline launched in Canada since 2000 has folded. Every single one. Anton Lysov · ▶ Watch (0:58)

Key Takeaways

  • MCP enables natural language queries against Neo4j without requiring Cypher knowledge.
  • WestJet’s schedule system handles thousands of flights using SIM files and SPS.
  • Claude generates Cypher queries from plain English, returning real data in seconds.

About the Speaker(s)

Anton Lysov is a Software Developer at WestJet, working on backend systems that power westjet.com, mobile apps, and services used by teams across the organization. Before WestJet, he was one of the first hires at Rafflebox, helping build a platform that raised over $500M CAD for nonprofits.