Narvalis is the name of this submission; the app and its repository files use the name Rail Copilot. Both refer to the same project.
The problem
When a train is late or cancelled, the operator's feed has the facts, but in raw form. A traveller wants to know where the train is, what this means for them and what to take instead, often on a platform with a poor connection.
What it does
- Departures for your trip, cancelled trains struck out and the best option marked by a Connection Scan planner (not AI).
- Your route on the operator's track and your train on it. Positions between operator readings are estimates and are labelled as such.
- An AI summary of what the situation means for you, and Ask: free questions about your trip, answered from the trip's facts and checked as they arrive.
- Operator notices explained or translated; a recorded loudspeaker announcement read by the cloud model.
- Traveller reports, offline trip saving, an organisation view, Android and web apps, English and Spanish.
How we use Firebase AI Logic hybrid inference
- Web (Chrome, firebase/ai): online, short tasks use PREFER_IN_CLOUD because it was much faster on our test PC; offline, or when the user prefers the device, they use PREFER_ON_DEVICE, with a cloud retry if the local attempt fails. Traveller reports try the device first.
- Android (Kotlin, firebase-ai + firebase-ai-ondevice): a ready Gemini Nano model is used first when preferred; where there is none, requests fall back to the cloud. Long outputs and audio use the cloud.
- Each answer is labelled from the response's inferenceSource. A built-in check sends ONLY_ON_DEVICE requests, so the cloud cannot stand in.
- App Check protects AI Logic (Play Integrity in the Android release APK, reCAPTCHA Enterprise or a debug provider on the web).
Trust by design
The model receives a fact sheet with each item tagged (timetable, live, estimate, unknown and others). A guard rejects generated times, durations and probabilities that are not in it. It does not verify the rest of the wording, and the app says so.
What is demonstrated, and what is not
- Web (Chrome 158 on one Windows PC): cloud and on-device AI. Cloud answers took about 1 s; in-app on-device answers 44.5 s and 48.7 s. Two saved local-only checks answered on_device (including 67.8 s and 6.1 s). Chrome's log of 29 Nov shows a Gemma 4 model, enabled with the 'Gemma 4 for Built-in AI' flag. Chrome does not call it Gemini Nano 4; whether it meets that requirement is the organiser's decision.
- Android: cloud AI. The release APK answered from the cloud with no access code on a Xiaomi 11 Lite 5G NE (the entrant's confirmation, not recorded).
- On-device AI on Android is not verified. That phone is not on Google's ML Kit Prompt API device list.
- Part 1 of the video is a continuous recording on an Android emulator (cloud only); part 2 is the web app, shown as screenshots in sequence. The voice-over is AI generated.
- AI wording can be wrong. Live delays only where the operator publishes them. No hosted web URL.
- 320 automated tests passed on 30 Nov.
Coverage and data
Bundled timetables for Spain, Finland, Norway, France and Ireland to 20 December 2026, Switzerland to 12 December. Renfe (CC BY 4.0), Fintraffic/Digitraffic (CC BY 4.0), Entur (NLOD 2.0), opentransportdata.swiss, SNCF Voyageurs (ODbL), Transport for Ireland (CC BY 4.0), OpenStreetMap contributors (ODbL), Natural Earth. No affiliation with any operator.
Built during the submission period
Work started on 17 November 2026: timetable builder, real-time normaliser, journey planner, fact guard, hybrid AI tasks, web app, organisation view and the Android app with its native AI bridge. Written with an AI coding assistant (Claude); third-party components are listed in docs/PRIOR_WORK.md.
Built With
- android
- chrome
- firebase
- firebase-ai-logic
- gemini
- kotlin
- preact
- typescript
- vite