Incomplete mobility trajectories can obscure the observations needed to identify important travel events and their endpoints. This study evaluates whether compact, locally deployed large language models (LLMs) can recover missing mobility information from incomplete trajectories, using high-confidence air trips as a controlled test case, and whether more explicit prompts can compensate for the loss of endpoint evidence. Using nationwide location-based services (LBS) data from the United States in January 2022 and airport reference data, thirty high-confidence air trips were converted into three incomplete-trajectory conditions by removing observations near the origin airport, the destination airport, or both. Four prompt variants and two LLMs generated 720 requests, each using a two-stage procedure to identify the flight transition segment and then select the origin and destination airports. Exact transition accuracy is 9.2%, while origin and destination accuracy are 31.4% and 10.7%, respectively. Only 1.9% of requests recover both the rule-identified transition and the reference airport pair. The most explicit prompt produced the highest observed exact transition and exact airport-pair recovery rates. The study introduces a controlled endpoint-removal framework for evaluating recovery of discrete mobility events from incomplete trajectories, allowing failures to be examined by inference stage and helping analysts decide whether recovered information should be retained, independently verified, or left unresolved.
Figures & tables
Figure 1: Framework of the study
ID
Timestamp
Latitude
Longitude
Place name
Sfacd-243rg
2022-01-07 00:10:09
37.618816
-122.37556
convenience store
Sfacd-243rg
2022-01-07 00:45:10
37.618926
-122.37671
San Francisco International Airport (SFO)
Sfacd-243rg
2022-01-07 00:49:35
37.618815
-122.37552
San Francisco International Airport (SFO)
Sfacd-243rg
2022-01-07 07:31:07
38.851436
-77.03773
Ronald Reagan Washington National Airport (DCA)
Sfacd-243rg
2022-01-07 07:33:14
38.851445
-77.03777
Ronald Reagan Washington National Airport (DCA)
Sfacd-243rg
2022-01-07 11:21:20
38.851495
-77.03787
chain coffee shop
Table 1: Sample of LBS Data
Code
Condition
Construction and intended evidence loss
E10
Origin removed
Removes observations within 20 mi of the origin endpoint during the 30 min preceding departure.
E01
Destination removed
Removes observations within 20 mi of the destination endpoint during the 30 min following arrival.
E11
Both removed
Removes the union of the origin and destination deletion sets.
Table 2: Endpoint-Removal Conditions
Figure 2: Example of an air-trip trajectory before and after endpoint removal
Code
Stage 1 instruction
Stage 2 instruction
P00
"Select the transition row that most plausibly represents an air trip."
"Select the nearest plausible origin and destination airports."
P01
"Evaluate the distance, speed, and elapsed time when selecting the transition rows."
"Select airports using endpoint-to-airport distance."
P10
"Compare all candidate rows before selecting the flight transition."
"Map the FROM endpoint to the origin and the TO endpoint to the destination."
P11
"Select transition rows after checking timing, distance, speed, and non-air alternatives."
"Select airports after verifying geographic proximity."
Table 3: Summary of the Two-Stage Prompt Instructions
Figure 3: P01 Stage-1 Full Prompt Text
Condition
Exact transition
Origin
Destination
Exact OD
Transition + OD
E10
23/240 (9.6%)
69/240 (28.8%)
33/240 (13.8%)
8/240 (3.3%)
8/240 (3.3%)
E01
19/240 (7.9%)
73/240 (30.4%)
18/240 (7.5%)
1/240 (0.4%)
1/240 (0.4%)
E11
24/240 (10.0%)
84/240 (35.0%)
26/240 (10.8%)
5/240 (2.1%)
5/240 (2.1%)
Overall
66/720 (9.2%)
226/720 (31.4%)
77/720 (10.7%)
14/720 (1.9%)
14/720 (1.9%)
Table 4: Performance by Endpoint-Removal Condition
Prompt
Exact transition
Origin
Destination
Exact OD
Transition + OD
P00
12/180 (6.7%)
53/180 (29.4%)
16/180 (8.9%)
3/180 (1.7%)
3/180 (1.7%)
P01
17/180 (9.4%)
58/180 (32.2%)
20/180 (11.1%)
2/180 (1.1%)
2/180 (1.1%)
P10
17/180 (9.4%)
54/180 (30.0%)
19/180 (10.6%)
3/180 (1.7%)
3/180 (1.7%)
P11
20/180 (11.1%)
61/180 (33.9%)
22/180 (12.2%)
6/180 (3.3%)
6/180 (3.3%)
Overall
66/720 (9.2%)
226/720 (31.4%)
77/720 (10.7%)
14/720 (1.9%)
14/720 (1.9%)
Table 5: Performance Across Prompt Variants
Condition
P00
P01
P10
P11
E10
2/60 (3.3%)
1/60 (1.7%)
1/60 (1.7%)
4/60 (6.7%)
E01
0/60 (0.0%)
0/60 (0.0%)
0/60 (0.0%)
1/60 (1.7%)
E11
1/60 (1.7%)
1/60 (1.7%)
2/60 (3.3%)
1/60 (1.7%)
Table 6: Exact-OD Recovery by Endpoint-Removal Condition and Prompt
Condition
Model
P00
P01
P10
P11
E10
Gemma
1/30 (3.3%)
1/30 (3.3%)
1/30 (3.3%)
4/30 (13.3%)
E10
Llama
1/30 (3.3%)
0/30 (0.0%)
0/30 (0.0%)
0/30 (0.0%)
E01
Gemma
0/30 (0.0%)
0/30 (0.0%)
0/30 (0.0%)
1/30 (3.3%)
E01
Llama
0/30 (0.0%)
0/30 (0.0%)
0/30 (0.0%)
0/30 (0.0%)
E11
Gemma
1/30 (3.3%)
0/30 (0.0%)
1/30 (3.3%)
0/30 (0.0%)
E11
Llama
0/30 (0.0%)
1/30 (3.3%)
1/30 (3.3%)
1/30 (3.3%)
Table 7: Exact-OD recovery by model, endpoint-removal condition, and prompt
Condition
S1 failure
S1 pass
S2 failure ∣ S1 pass
S2 pass ∣ S1 pass
E10
217/240 (90.4%)
23/240 (9.6%)
15/23 (65.2%)
8/23 (34.8%)
E01
221/240 (92.1%)
19/240 (7.9%)
18/19 (94.7%)
1/19 (5.3%)
E11
216/240 (90.0%)
24/240 (10.0%)
19/24 (79.2%)
5/24 (20.8%)
Overall
654/720 (90.8%)
66/720 (9.2%)
52/66 (78.8%)
14/66 (21.2%)
Table 8: Stage 1 and Stage 2 outcomes by endpoint-removal condition
Department of Civil and Environmental Engineering, University of Maryland College Park, MD, 20742 · Maryland Transportation Institute Department of Civil and Environmental Engineering, University of Maryland College Park, MD, 20742