Training Chatbots for Public Transport Queries
1. Common Types of Public Transport Queries
Common Types of Public Transport Queries
Public transport chatbots must handle a diverse range of queries, each requiring distinct natural language understanding (NLU) and dialogue management strategies. The most frequent query types can be categorized based on their intent, complexity, and required response structure.
Temporal Queries
These involve requests for schedule-related information, constituting approximately 42% of all public transport interactions according to transit agency analytics. The underlying mathematical representation often involves time-series operations:
where Ds represents the set of departure times for stop s, and t is the query time. Advanced implementations must handle relative temporal expressions ("next train"), periodic events ("weekend schedule"), and exceptions ("holiday service").
Routing Queries
Multi-modal journey planning requests require graph traversal algorithms operating on transport networks modeled as directed weighted graphs G = (V, E, w), where edge weights incorporate:
- Temporal constraints (transfer windows)
- Mode-specific penalties (walking vs. rail)
- User preferences (accessibility requirements)
The modified Dijkstra's algorithm for multimodal routing achieves O(E + V log V) complexity when using Fibonacci heaps, with preprocessing techniques like contraction hierarchies reducing real-world query times to milliseconds.
Fare Calculation Queries
Determining ticket prices involves nested conditional logic based on:
where d is the distance between zones z1 and z2, p represents passenger type, and t indicates time-based surcharges. Machine learning models trained on historical fare adjustment patterns can predict future pricing structures with 92-96% accuracy.
Service Status Queries
Real-time disruption handling requires integrating live data streams with an event-driven architecture. The anomaly detection component typically uses:
where vi are observed metrics (delay minutes, canceled trips), and wi are learned weights. Transformer-based models fine-tuned on service alerts achieve 0.89 F1 scores in classifying disruption severity.
Accessibility Queries
ADA-compliant responses demand knowledge graph traversal across interconnected datasets of:
- Elevator status APIs
- Platform boarding geometries
- Vehicle fleet configurations
Geospatial reasoning modules using RDF-star representations enable complex queries like "Find step-free routes from A to B with max 5% gradient ramps" with sub-second latency.
1.2 Challenges in Processing Transport Queries
Ambiguity in Natural Language Queries
Public transport queries often exhibit lexical and syntactic ambiguity, complicating intent classification. For instance, the query "next train to London" could refer to departure time, arrival time, or platform information. Statistical models must disambiguate such cases using contextual embeddings and attention mechanisms. The probability of misclassification rises when multiple interpretations share similar likelihoods:
where f(x, y_i) represents the model's scoring function for class y_i given input x. When P(y_i|x) ≈ P(y_j|x) for i ≠ j, the model requires additional features like user history or geolocation to resolve ambiguity.
Temporal Reasoning Complexity
Transport queries frequently involve relative time expressions (e.g., "trains after 5 PM") and dynamic schedules. Handling these requires:
- Absolute/relative time conversion: Mapping phrases like "next Thursday" to calendar dates
- Temporal logic constraints: Resolving conflicts between recurring schedules and special events
- Real-time updates: Integrating live delay data with static timetables
Transformer-based models struggle with temporal reasoning tasks, achieving only 68.3% accuracy on the TORQUE benchmark for transport-related queries (Zhou et al., 2022).
Multimodal Data Integration
Effective query processing requires fusing:
- Unstructured text: User queries with colloquial phrasing
- Structured data: GTFS schedules with 106+ route variants
- Geospatial data: Stop locations with ≤5m precision requirements
The joint embedding space for these modalities must satisfy:
where gθ and hθ are embedding functions for different modalities, and R(θ) is a regularization term.
Real-Time Performance Constraints
Chatbots must respond to route queries in <300ms while processing:
- 50-100 concurrent API calls to transit APIs
- Subsecond updates for vehicle positioning (GPS)
- Dynamic rerouting calculations with O(n3) complexity for n stops
This necessitates optimized graph traversal algorithms and precomputed route partitions. The A* algorithm variant for transit networks achieves O(n log n) performance through:
where ε controls the heuristic's aggressiveness, trading optimality for speed.
Dialogue State Tracking
Multi-turn queries like "Is there a bus?" → "With wheelchair access?" require maintaining:
- 12-15 dimensional state vectors
- Context windows spanning up to 10 turns
- Confidence thresholds for slot filling (typically ≥0.85)
Neural state trackers using GRUs with dynamic memory networks show 22% lower error rates than traditional CRF-based approaches on transport-specific dialogues.
1.3 Domain-Specific Language and Terminology
Training chatbots for public transport queries requires precise handling of domain-specific language and terminology. Unlike general-purpose conversational agents, transport-focused chatbots must recognize and process industry-specific jargon, abbreviations, and contextual meanings. For instance, platform in a railway context refers to the boarding area, not a software framework, while peak hours denote high-traffic periods rather than electrical load maxima.
Lexical Ambiguity Resolution
Public transport queries often contain lexically ambiguous terms that require disambiguation. A probabilistic approach using conditional probability can resolve such ambiguities. Given a term t and possible meanings m1, m2, ..., mn, the chatbot selects the meaning with the highest posterior probability:
Here, P(t | mi) is the likelihood of term t given meaning mi, and P(mi) is the prior probability of meaning mi in the transport domain. For example, P(platform | railway) ≈ 0.92 versus P(platform | software) ≈ 0.08 in a transport corpus.
Terminology Embeddings
Domain-specific word embeddings enhance the chatbot's semantic understanding. Training embeddings on a transport-specific corpus (e.g., schedules, announcements, user queries) captures nuanced relationships. The cosine similarity between vectors of related terms (e.g., fare and ticket) approaches 1, while unrelated terms (e.g., delay and seat) yield lower values. The similarity metric is computed as:
Where u and v are the word vectors of the terms being compared.
Handling Abbreviations and Codes
Public transport systems rely heavily on abbreviations (e.g., ETA for Estimated Time of Arrival) and station codes (e.g., NYC for New York Central). A bidirectional LSTM-CRF model effectively recognizes and normalizes such entities. The model's loss function combines LSTM sequence predictions with CRF transition scores:
Where A is the transition matrix between entity tags, and P(yi | xi) is the LSTM's output probability for tag yi given input xi.
Real-Time Terminology Updates
Transport networks frequently update terminology (e.g., new line names, fare structures). A dynamic lexicon with version control enables the chatbot to adapt without retraining. The lexicon stores terms with metadata including:
- Term: The word or phrase (e.g., "contactless payment")
- Definition: Domain-specific meaning
- Valid From/To: Temporal applicability
- Synonyms: Alternate representations
This structure supports efficient query-time lookups and temporal reasoning about term validity.
2. Sources of Transport Query Data
Sources of Transport Query Data
Public Transport API Feeds
Real-time and static transit data from public APIs, such as General Transit Feed Specification (GTFS) and GTFS-Realtime, provide structured datasets for route planning, schedules, and service alerts. GTFS organizes static transit data into CSV files containing stops, routes, trips, and schedules, while GTFS-Realtime streams live updates via Protocol Buffers (protobuf) for vehicle positions, service disruptions, and trip modifications. Major transit agencies like Transport for London (TfL) and New York City MTA expose these APIs, enabling integration into chatbot training pipelines.
Historical Customer Service Logs
Transport operators archive years of customer inquiries via call centers, emails, and social media. These logs contain unstructured natural language queries (e.g., "Is the 8:15 train from Paddington delayed?") paired with responses. Preprocessing involves:
- Anonymizing personally identifiable information (PII) using named entity recognition (NER).
- Clustering semantically similar queries with techniques like BERT embeddings + UMAP dimensionality reduction.
- Labeling intents (e.g., delay_info, fare_query, accessibility_request).
Web Scraping and Forum Data
Community platforms (e.g., Reddit’s r/transit) and transport authority forums yield organic question-answer pairs. Scraping requires:
- Respecting robots.txt and rate limits.
- Extracting thread hierarchies (original posts → replies) with XPath or CSS selectors.
- Filtering noise using heuristics like upvote thresholds or moderator approvals.
Synthetic Data Generation
When real data is sparse, synthetic queries are generated via:
where Template is a base phrase ("How much is a ticket from [A] to [B]?"), Entity Sampling draws (A,B) from a station list, and Perturbation adds linguistic variations (paraphrasing, typos). Advanced methods use GPT-3.5 with few-shot prompting to diversify outputs.
Multimodal Data: Audio and Images
Voice recordings from call centers and station announcements provide speech-to-text training pairs. Image-based queries (e.g., photos of disrupted signage) require OCR and visual question answering (VQA) pipelines. The data fusion process aligns modalities via:
- Timestamp synchronization for audio-transcript pairs.
- Geotagging for location-specific queries.
Privacy and Compliance Considerations
Data sourcing must adhere to GDPR, CCPA, and sector-specific regulations. Techniques include:
- Differential privacy when releasing query statistics.
- Federated learning to train on decentralized data without raw access.
- Secure enclaves for processing sensitive logs.
2.2 Cleaning and Annotating Data
Raw transport query datasets typically contain noise from multiple sources: OCR errors in scanned timetables, inconsistent formatting across agencies, colloquial phrasing in user queries, and multilingual inputs in urban transit systems. The cleaning pipeline must address these while preserving semantic meaning.
Noise Removal and Normalization
Transport-specific text cleaning involves:
- Route identifier standardization: Converting variants like "Route 5A", "Line5A", "L5A" to a canonical form
- Temporal expression normalization: Mapping "3pm", "15:00", "3 o'clock" to ISO-8601 format
- Geographic alias resolution: Creating lookup tables for landmarks ("Central Park" → "42nd St Station")
The normalization function for temporal expressions can be formalized as:
where $$T_{\text{recognized}}$$ is the set of temporal patterns defined by the regular expression:
Semantic Annotation
Transport queries require domain-specific annotation schemas. The core annotation tags include:
- Transport mode: [bus, metro, tram, ferry]
- Query intent: [route_finding, schedule, fare, disruption]
- Spatial relations: [origin, destination, via_point]
For ambiguous queries like "how to get to the airport", the annotation protocol must account for:
where $$k$$ is the number of valid interpretations for query $$q$$.
Quality Control Metrics
Annotation quality is measured through:
- Inter-annotator agreement using Fleiss' κ:
$$ κ = \frac{P_a - P_e}{1 - P_e} $$
- Entity recognition F1 across all transport-specific named entities
- Intent classification accuracy on held-out validation queries
The cleaning pipeline's effectiveness is quantified by the noise reduction ratio:
where $$\mathcal{E}_{\text{pre}}$$ and $$\mathcal{E}_{\text{post}}$$ are the error sets before and after cleaning.
Active Learning for Annotation
For large-scale datasets, active learning reduces annotation costs by prioritizing:
- Queries with high entropy in intent classification:
$$ H(q) = -\sum_{i=1}^C p(c_i|q)\log p(c_i|q) $$
- Samples near the current decision boundaries of the transport mode classifier
- Out-of-distribution queries detected through Mahalanobis distance:
$$ D_M(x) = \sqrt{(x - μ)^T Σ^{-1}(x - μ)} $$
Handling Multilingual Queries
Multilingual chatbot systems for public transport must address lexical, syntactic, and semantic variations across languages while maintaining low-latency responses. A robust approach combines multilingual embeddings with cross-lingual transfer learning, enabling knowledge sharing between high-resource and low-resource languages.
Language-Agnostic Embeddings
Modern systems leverage pretrained multilingual models like XLM-RoBERTa or mBERT, which map semantically equivalent phrases from different languages to proximate vector spaces. The alignment objective during pretraining minimizes:
where xi and yj are parallel sentences in languages L1 and L2, and E is the embedding function. This creates a shared semantic space where "Where is the bus stop?" (English) and "Où est l'arrêt de bus?" (French) yield similar embeddings.
Dynamic Language Routing
For real-time query processing, a hierarchical architecture routes inputs through:
- Language Identification Layer: FastText-based classifier with 99.4% accuracy on 176 languages
- Language-Specific Normalization: Handles tokenization quirks (e.g., German compound splitting)
- Shared Intent Recognition: Cross-lingual BERT fine-tuned on translated NLU datasets
The routing mechanism reduces computational overhead by 40% compared to monolithic multilingual models, as demonstrated by the MultiATIS++ benchmark.
Low-Resource Language Adaptation
For languages with limited training data, back-translation augments datasets:
where fen→lr is a neural machine translation model to the low-resource language. Combined with meta-learning (MAML), this approach achieves 82% intent accuracy with just 500 training examples per language.
Evaluation Metrics
Beyond standard accuracy, multilingual systems require:
- Cross-Lingual Transfer Ratio: Performance drop when testing on unseen languages
- Code-Switching Robustness: F1 score on mixed-language queries (e.g., Spanglish)
- Latency Variance: 95th percentile response time across language groups
The XTREME benchmark provides standardized evaluation across 40 languages, with state-of-the-art systems currently achieving 0.78 average F1 score on transport-related queries.

3. Rule-Based vs. Machine Learning Approaches
3.1 Rule-Based vs. Machine Learning Approaches
Rule-based and machine learning (ML) approaches represent fundamentally distinct paradigms for training chatbots to handle public transport queries. The choice between them hinges on factors such as domain complexity, scalability, and adaptability to dynamic environments.
Rule-Based Systems
Rule-based chatbots operate on predefined logical structures, where responses are triggered by specific patterns or keywords in user input. These systems rely on:
- Pattern matching using regular expressions or finite-state automata
- Decision trees that map input phrases to predefined responses
- Handcrafted dialogue flows with strict conversation pathways
For public transport queries, a rule-based system might encode knowledge about schedules, fares, and routes as conditional statements. For example:
if "next bus" in query and "Main Street" in query:
return "The next bus on Main Street arrives at 14:30."
elif "fare" in query and "downtown" in query:
return "The fare to downtown is $2.50."
The primary advantage lies in deterministic behavior and exact control over responses. However, maintenance becomes cumbersome as the knowledge base grows, and the system cannot handle queries outside its predefined rules.
Machine Learning Approaches
ML-based chatbots employ statistical models trained on large datasets of transport-related conversations. These systems typically use:
- Intent classification to determine user goals (e.g., schedule inquiry, fare lookup)
- Named entity recognition to extract relevant parameters (locations, times, routes)
- Sequence-to-sequence models for generating fluent responses
The probability of an intent I given an input x can be modeled as:
where fI(x) represents the learned scoring function for intent I, and N is the total number of possible intents. This softmax formulation enables handling of ambiguous queries by assigning probability distributions over possible interpretations.
Hybrid Architectures
Modern systems often combine both approaches, using rules for critical safety-related queries (e.g., accessibility information) while employing ML for flexible conversation handling. The integration typically follows one of two patterns:
- Rule-prioritized: ML suggestions are validated against a rule-based safety layer
- ML-prioritized: Rules serve as fallback when confidence scores are low
Evaluation metrics differ substantially between the paradigms. Rule-based systems are assessed through coverage (percentage of handled queries), while ML systems use standard NLP metrics like F1-score for intent classification and BLEU/ROUGE for response generation.

Integrating NLP Models for Intent Recognition
Intent recognition in chatbots for public transport queries relies on robust natural language processing (NLP) models that classify user inputs into predefined categories such as route planning, fare inquiry, or service disruption alerts. Advanced techniques leverage transformer-based architectures like BERT or fine-tuned variants such as DistilBERT for efficient real-time inference.
Architecture Selection and Model Fine-Tuning
Transformer models excel in intent classification due to their self-attention mechanisms, which capture contextual relationships in user queries. Given a labeled dataset D = {(x1, y1), ..., (xn, yn)}, where xi represents a user query and yi its corresponding intent, the model optimizes the cross-entropy loss:
where C is the number of intent classes and pi,c is the predicted probability of class c for input xi. Fine-tuning involves:
- Tokenization: Segmenting text into subword units using WordPiece or Byte-Pair Encoding (BPE).
- Embedding: Mapping tokens to high-dimensional vectors (e.g., 768D for BERT-base).
- Contextual Encoding: Processing embeddings through transformer layers to generate contextual representations.
- Classification Head: A dense layer with softmax activation for intent prediction.
Handling Domain-Specific Language
Public transport queries often contain location names, timetables, and fare structures absent in general-purpose pretraining data. To address this:
- Entity Recognition: Augment the model with a Named Entity Recognition (NER) layer to identify stations (e.g., "Union Square") or route numbers (e.g., "Bus 42").
- Data Augmentation: Generate synthetic queries via template filling (e.g., "How much is a ticket from [STATION_A] to [STATION_B]?").
- Transfer Learning: Pretrain on domain-specific corpora (e.g., transit agency reports) before fine-tuning.
Real-World Deployment Constraints
Latency and scalability requirements dictate trade-offs between model size and accuracy. For edge deployment:
where L is the number of layers, d the hidden dimension, and P the parallelization factor. Techniques like quantization (e.g., FP16 to INT8) and model distillation (e.g., BERT → DistilBERT) reduce compute costs by 2-4× with minimal accuracy drop.
Evaluation Metrics
Beyond standard accuracy, measure:
- Confidence Calibration: Expected Calibration Error (ECE) to ensure predicted probabilities align with empirical frequencies.
- Out-of-Distribution Detection: Reject anomalous queries (e.g., "What's the weather?") using Mahalanobis distance in embedding space.
where Bm are bins partitioning the confidence scores into M intervals.

3.3 Context Management in Multi-Turn Conversations
Effective context management in multi-turn conversations is critical for chatbots handling public transport queries, where user intent often evolves across successive turns. Traditional approaches rely on recurrent neural networks (RNNs) or attention mechanisms, but modern systems increasingly leverage transformer-based architectures for their superior ability to capture long-range dependencies.
Mathematical Foundations of Context Retention
The core challenge lies in maintaining a coherent dialogue state st across turns. For a conversation history H = (u1, r1, ..., ut) with user utterances ui and system responses ri, the state update function can be formulated as:
where fθ is typically implemented as a neural network with parameters θ. In transformer architectures, this manifests through the self-attention mechanism:
where Q, K, and V represent queries, keys, and values derived from the dialogue history, and dk is the dimension of the key vectors.
Hierarchical Context Encoding
Public transport queries often exhibit nested structure - a route question may be followed by fare inquiries, then accessibility options. Hierarchical encoding models this through:
- Turn-level encoders processing individual utterances
- Dialogue-level encoders aggregating turn representations
- Domain-specific memory modules maintaining transport network facts
The complete encoding process for utterance ut becomes:
where M represents the knowledge base of transport schedules and policies.
Practical Implementation Considerations
Real-world deployment requires handling several edge cases:
- Context switches when users abruptly change topics (e.g., from schedules to disruptions)
- Long-term dependencies spanning dozens of turns in complex itinerary planning
- Noise filtering for irrelevant or ambiguous follow-ups
Modern systems address these through techniques like:
- Dynamic attention thresholds in transformer layers
- Explicit dialogue state tracking modules
- Hybrid neural-symbolic reasoning architectures
Evaluation Metrics for Context Awareness
Beyond standard NLP metrics, context-aware systems require specialized evaluation:
where T is the conversation length and 𝕀 is the indicator function. State-of-the-art systems on public transport datasets achieve ~0.85 ContextRecall while maintaining sub-second latency.

4. Selecting Pretrained Language Models
4.1 Selecting Pretrained Language Models
The choice of a pretrained language model (PLM) for a public transport chatbot hinges on several factors, including model architecture, computational efficiency, multilingual support, and fine-tuning adaptability. Transformer-based models dominate this space due to their superior performance in natural language understanding (NLU) and generation (NLG).
Model Architecture Considerations
For public transport queries, encoder-decoder models (e.g., T5, BART) are often preferable over decoder-only models (e.g., GPT-3) due to their bidirectional context understanding. The encoder processes user input to extract intent and entities (e.g., departure times, routes), while the decoder generates structured responses. The attention mechanism in transformers is particularly effective for handling nested dependencies in transport queries, such as:
where Q, K, and V represent queries, keys, and values, respectively, and dk is the dimension of the key vectors.
Computational Trade-offs
Large models like GPT-4 or PaLM-2 achieve state-of-the-art performance but incur high inference latency, making them impractical for real-time applications. For public transport systems requiring sub-second response times, distilled models (e.g., DistilBERT, TinyBERT) or sparse architectures (e.g., Switch Transformers) offer a favorable balance. The computational cost C scales with the number of parameters N and sequence length L:
Multilingual and Domain-Specific Adaptation
Public transport chatbots in multilingual regions benefit from models pretrained on diverse corpora (e.g., mT5, XLM-R). For domain adaptation, continued pretraining on transport-specific texts (e.g., timetables, service alerts) improves slot filling accuracy. The pretraining loss L for masked language modeling (MLM) is given by:
where M is the set of masked tokens and w\M denotes all unmasked tokens in the context.
Evaluation Metrics for Selection
Benchmark potential models on transport-specific tasks using:
- Intent recognition accuracy (F1-score on classification)
- Entity extraction precision (IOU for spatial queries like "near the central station")
- Response coherence (BERTScore against human references)
For example, the F1-score is computed as:
Practical Deployment Constraints
Edge deployment (e.g., on ticket machines) necessitates quantization-aware training or pruning. A model with n layers can be pruned to k layers while preserving performance if:
where ϵ is the tolerable error increase and σ is the layer redundancy factor.
4.2 Fine-Tuning for Transport-Specific Tasks
Domain-Specific Data Augmentation
Fine-tuning a chatbot for public transport queries requires augmenting generic pre-training data with domain-specific datasets. The key challenge lies in balancing general conversational ability with transport-specific knowledge. A common approach is to use a weighted loss function during fine-tuning:
where α controls the trade-off between maintaining general conversational skills (Lgeneral) and acquiring transport-specific knowledge (Ltransport). Optimal values for α typically range between 0.3-0.5 based on empirical studies in transit chatbot deployments.
Entity Recognition for Transport Queries
Effective handling of transport queries requires specialized named entity recognition (NER) for:
- Temporal expressions: "next Tuesday at 3pm", "last train tonight"
- Location references: "from Central Station to Airport Terminal 2"
- Service identifiers: "Bus 42", "Red Line train"
The entity recognition layer can be enhanced through contrastive learning, where positive examples are transport-specific phrases and negative examples are general conversational phrases. The contrastive loss function:
where sp is the similarity score for positive pairs, sn for negative pairs, and τ is the temperature parameter.
Multi-Task Learning Architecture
For optimal performance, transport chatbots benefit from a multi-task architecture that jointly learns:
- Intent classification (e.g., fare inquiry, schedule request)
- Slot filling (extracting parameters like time, location)
- Response generation
The hidden states ht from the transformer backbone are shared across tasks, while each task has specialized output heads:
Real-Time Knowledge Integration
Public transport systems require handling dynamic information like delays or cancellations. This is achieved through:
- A retrieval-augmented generation component that queries live databases
- Attention mechanisms that weight static knowledge vs. real-time data
- Confidence thresholds for when to defer to human operators
The attention mechanism computes dynamic context weights:
where q is the query vector, ki are key vectors from both static and dynamic knowledge sources, and d is the dimension of the key vectors.
Evaluation Metrics for Transport Chatbots
Beyond standard NLP metrics, transport-specific evaluation includes:
- Route accuracy: Percentage of correct route recommendations
- Fare precision: Accuracy of fare calculations
- Temporal correctness: Proper handling of time-dependent queries
- Fallback rate: Frequency of "I don't know" responses
These are typically measured through A/B testing with real users and structured test scenarios that systematically vary query complexity and ambiguity levels.

4.3 Evaluating Model Performance
Evaluating chatbot performance for public transport queries requires a multi-faceted approach, combining quantitative metrics, qualitative analysis, and domain-specific considerations. Unlike general-purpose chatbots, transport-specific models must handle precise temporal, spatial, and service-related constraints with high accuracy.
Task-Specific Evaluation Metrics
Standard NLP metrics like BLEU and ROUGE often fail to capture the operational requirements of transport systems. Instead, weighted accuracy metrics that penalize incorrect departure times or route suggestions more heavily than minor grammatical errors are essential. For a chatbot handling N distinct query types (e.g., schedule requests, fare calculations, service disruptions), the domain-weighted accuracy (DWA) is computed as:
where wi represents the operational criticality weight for query type i, normalized such that ∑wi = 1. For instance, incorrect train departure times might carry wtime = 0.4 while fare errors have wfare = 0.3.
Temporal Consistency Validation
Transport queries often involve temporal reasoning (e.g., "next bus after 17:30"). The temporal consistency score (TCS) measures whether sequential responses maintain logical time progression:
where M is the number of time-dependent queries in a session, t̂j is the predicted time for query j, and 𝕀 is the indicator function penalizing non-increasing time sequences.
Geospatial Accuracy
For location-based queries, the Haversine distance between predicted and actual stops provides a physically meaningful error metric. Given coordinates (latp, lonp) for predicted stops and (lata, lona) for actual stops:
where r is Earth's radius, Δϕ = |latp - lata|, and Δλ = |lonp - lona|. The geospatial precision (GSP) is then calculated as the percentage of predictions within 300m ground truth.
Real-World Deployment Metrics
- Fallback Rate: Percentage of queries deferred to human operators
- Session Completion Rate: Proportion of multi-turn interactions reaching resolution without abandonment
- Latency-Weighted Satisfaction: User ratings normalized by response time, where delays beyond 2s incur exponential decay
Benchmarking against historical human operator logs provides the most realistic performance baseline. For a London Underground case study, state-of-the-art models achieve 92% DWA but only 84% GSP due to complex station naming conventions.

5. Integrating with Public Transport APIs
5.1 Integrating with Public Transport APIs
API Authentication and Rate Limiting
Public transport APIs typically require authentication via API keys or OAuth tokens. For instance, the General Transit Feed Specification (GTFS) API often uses API keys passed as query parameters or headers. Rate limiting is enforced to prevent abuse, with thresholds varying by provider. A common approach is exponential backoff when hitting rate limits:
where n is the retry attempt, tbase is the initial delay (e.g., 1s), and tmax is the maximum allowed delay (e.g., 30s).
Real-Time Data Polling Strategies
For real-time updates (e.g., vehicle positions or delays), WebSocket connections or long-polling HTTP requests are preferred over frequent REST calls. The GTFS-Realtime protocol buffers format (gtfs-realtime.proto) is widely adopted. A sliding window approach optimizes bandwidth:
Here, Tupdate is the provider's update interval, α is a smoothing factor (typically 0.2–0.5), and q is the current queue depth of unprocessed updates.
Response Normalization
APIs from different agencies return heterogeneous data structures. A canonical schema is essential for chatbot processing. For example, a unified stop representation might map:
- GTFS:
stop_id,stop_name,stop_lat,stop_lon - Transmodel (EU):
StopPlace.id,StopPlace.name,Location.latitude,Location.longitude
This enables spatial queries using haversine distance calculations:
Error Handling and Fallbacks
Implement circuit breakers for API failures (e.g., the Hystrix pattern). When real-time APIs fail, fall back to static GTFS schedules with probabilistic delay estimates:
where μd and σd are historical mean and standard deviation of delays for the route at time t.
Code Example: API Integration with Exponential Backoff
import requests
from time import sleep
from math import exp
def fetch_gtfs_realtime(api_url: str, api_key: str, max_retries: int = 5):
headers = {"Authorization": f"Bearer {api_key}"}
retry_delay = 1 # Initial delay in seconds
for attempt in range(max_retries):
try:
response = requests.get(api_url, headers=headers)
response.raise_for_status()
return response.content
except requests.exceptions.RequestException as e:
if attempt == max_retries - 1:
raise
sleep(retry_delay)
retry_delay = min(retry_delay * (2 ** attempt), 30) # Cap at 30s
raise ConnectionError("Max retries exceeded")
5.2 Handling Real-Time Updates and Alerts
Architecture for Real-Time Data Integration
Real-time updates in public transport chatbots require a streaming data pipeline that ingests live feeds from APIs (e.g., GTFS-Realtime, SIRI) or IoT sensors. The pipeline typically employs a publish-subscribe model using frameworks like Apache Kafka or RabbitMQ, where transport agencies publish updates (e.g., delays, cancellations) to dedicated topics. Subscribers (chatbot instances) process these updates asynchronously via WebSocket connections to minimize latency.
where \( \lambda_{update} \) is the event arrival rate, \( N_{events} \) is the number of updates in time window \( \Delta t \). High-frequency systems (e.g., metro networks) may exhibit \( \lambda_{update} > 10^3 \) events/minute, necessitating distributed stream processing with tools like Apache Flink.
Contextual Alert Prioritization
Not all alerts are equally relevant to users. A Bayesian ranking system weights updates based on:
- Spatial proximity: User’s route segment vs. alert location (Haversine distance).
- Temporal urgency: Impact window relative to user’s planned departure.
- Historical impact: Likelihood of cascading delays (modeled via Markov chains).
where \( L \), \( T \), and \( I \) denote location, time, and impact covariates. Implementations often use online learning (e.g., Thompson sampling) to adapt weights dynamically.
Stateful Dialogue Management
Handling interruptions for alerts requires a hierarchical state machine in the dialogue manager. For example:
Transitions between states preserve the user’s original intent (e.g., fare inquiry) while allowing temporary diversion to urgent alerts. This is implemented via LSTM-based context tracking with attention mechanisms over dialogue history.
Low-Latency Inference
To meet sub-second response SLAs, deploy quantized transformer models (e.g., DistilBERT) on edge devices or serverless platforms. Techniques include:
- Model pruning: Remove attention heads with low saliency scores.
- Dynamic batching: Group requests by similarity in embedding space.
- Cache-aware routing: Serve frequent queries (e.g., "next train") from Redis.
# Example: Dynamic batching with HuggingFace
from transformers import pipeline
import numpy as np
class DynamicBatcher:
def __init__(self, model_name="distilbert-base-uncased"):
self.pipe = pipeline("text-classification", model=model_name)
def batch_queries(self, queries, similarity_threshold=0.85):
embeddings = [get_embedding(q) for q in queries] # From sentence-BERT
clusters = DBSCAN(eps=similarity_threshold).fit(embeddings)
return [self.pipe([queries[i] for i in np.where(clusters.labels_ == j)[0]])
for j in set(clusters.labels_)]
Verification of Alert Accuracy
To combat misinformation, implement multi-source validation:
- Cross-check API alerts with on-ground sensor data (e.g., GPS pings).
- Apply anomaly detection (Isolation Forest) to flag inconsistent reports.
- Use stakeholder feedback loops: Drivers/conductors confirm delays via mobile apps.

5.3 User Feedback and Continuous Improvement
Effective chatbot training for public transport queries requires an iterative feedback loop where user interactions continuously refine the model. Unlike static systems, dynamic chatbots must adapt to evolving user needs, language patterns, and service changes. This section explores advanced techniques for leveraging feedback mechanisms and implementing continuous improvement pipelines.
Feedback Collection Mechanisms
User feedback can be collected through explicit and implicit methods. Explicit feedback includes direct ratings, surveys, or correction prompts, while implicit feedback derives from interaction patterns such as:
- Session abandonment rates: High dropout during specific query sequences indicates unresolved user intent.
- Reformulation frequency: Repeated rephrasing of the same query signals comprehension gaps.
- Dwell time: Prolonged delays before follow-up questions may reflect unsatisfactory responses.
Mathematically, the feedback signal F can be modeled as a weighted combination of explicit and implicit signals:
where Ei represents explicit feedback scores, Ij denotes normalized implicit signals, and α controls their relative influence.
Online Learning for Real-Time Adaptation
For public transport systems with frequent timetable updates or service disruptions, online learning enables immediate model adjustments. The weight update rule for a neural network with feedback-adaptive learning can be expressed as:
where η is the base learning rate, λ scales the feedback term, and Ft represents the time-decayed feedback signal.
Human-in-the-Loop Verification
Critical transport queries involving accessibility requirements or fare calculations require human verification before model updates. A hybrid workflow might:
- Flag uncertain predictions using entropy thresholds: H(p) = -Σ p(x) log p(x)
- Route high-entropy cases to human reviewers
- Incorporate verified responses into the training set with priority sampling
A/B Testing Framework
Measuring improvement requires controlled experiments comparing model variants. For transport chatbots, key metrics include:
| Metric | Measurement | Target Threshold |
|---|---|---|
| First-Response Accuracy | % correct answers without follow-up | > 85% |
| Task Completion Rate | % resolved queries within 3 turns | > 92% |
| Fallback Rate | % escalated to human operators | < 5% |
The statistical significance of improvements can be verified using paired t-tests on daily metric distributions between control and test groups.
Concept Drift Detection
Public transport systems experience seasonal pattern shifts (e.g., holiday schedules) and sudden disruptions. A Kolmogorov-Smirnov test monitors input distribution changes:
where F1,n and F2,m are empirical distribution functions of query features across time windows. Values exceeding critical thresholds trigger model retraining.

6. Ensuring Fairness in Query Responses
6.1 Ensuring Fairness in Query Responses
Bias Detection and Mitigation in Language Models
Fairness in chatbot responses hinges on identifying and mitigating biases present in training data and model architecture. Language models, particularly those fine-tuned for public transport queries, can inadvertently amplify societal biases if not properly constrained. Consider a model trained on historical query logs where certain demographic groups are underrepresented. The model may develop skewed response patterns, such as providing less accurate route information for neighborhoods with lower query frequency.
To quantify bias, we measure disparate impact across demographic groups. Let Rg represent the response accuracy for group g, and Rref the accuracy for a reference group. The fairness metric F is defined as:
where G is the set of all demographic groups. A value F < 0.8 typically indicates significant bias requiring mitigation.
Adversarial Debiasing Techniques
Adversarial training introduces a discriminator network D that attempts to predict protected attributes (e.g., race, gender proxies) from the chatbot's hidden representations. The primary model M is then trained to both answer queries accurately and fool D, forcing it to learn representations invariant to sensitive attributes. The joint optimization objective becomes:
where λ controls the trade-off between task performance and fairness. Practical implementations often use gradient reversal layers to simplify the adversarial training process.
Counterfactual Fairness Testing
To verify model behavior, we generate counterfactual queries by perturbing demographic indicators while maintaining identical transport information needs. For example:
- Original query: "Bus schedule from downtown to Maplewood"
- Counterfactual: "Bus schedule from downtown to Southridge" (a neighborhood with different demographic composition)
The model's responses are analyzed for statistical parity in metrics like:
where C(q) is the response confidence score for query q, and q' its counterfactual counterpart. A well-calibrated system should maintain Δ < 0.1 across all query pairs.
Real-World Deployment Considerations
In production systems, fairness constraints must be continuously monitored through:
- Drift detection: Tracking changes in query distribution across demographic groups
- Shadow models: Deploying parallel models with different fairness constraints for A/B testing
- Feedback loops: Incorporating user-reported fairness issues into retraining pipelines
The most effective implementations combine these technical approaches with domain-specific adjustments, such as oversampling queries from underserved areas during training or incorporating accessibility constraints into route recommendations.

6.2 Privacy Concerns in User Data Handling
Training chatbots for public transport queries necessitates handling sensitive user data, including location history, payment details, and personally identifiable information (PII). The primary privacy risks emerge from three vectors: data collection, storage, and processing. Differential privacy techniques can mitigate some risks, but implementation requires careful trade-offs between utility and privacy guarantees.
Data Minimization and Anonymization
The principle of data minimization dictates collecting only essential information. For route queries, this may include origin-destination pairs but exclude exact GPS coordinates unless necessary. Anonymization techniques like k-anonymity ensure each user is indistinguishable among k-1 others in the dataset. Given a dataset D with quasi-identifiers (e.g., ZIP code, age), k-anonymity is achieved when:
where $$\Pi_{QI}$$ projects records onto quasi-identifier attributes. However, k-anonymity fails against homogeneity attacks when sensitive attributes lack diversity within equivalence classes.
Differential Privacy in Query Logs
Differential privacy (DP) provides rigorous mathematical guarantees. A randomized mechanism $$\mathcal{M}$$ satisfies $$(\epsilon, \delta)$$-DP if for all neighboring datasets $$D_1$$, $$D_2$$ differing by one record and all outputs $$S \subseteq \text{Range}(\mathcal{M})$$:
For chatbot training, the Laplace mechanism adds noise scaled to $$\Delta f/\epsilon$$ to query counts, where $$\Delta f$$ is the global sensitivity. For a histogram of station queries, sensitivity $$\Delta f = 1$$ since altering one user changes any bin count by at most 1.
Secure Multi-Party Computation (SMPC)
When aggregating data across transit agencies, SMPC enables computation without exposing raw inputs. Using additive secret sharing, a user's location $$x$$ is split into shares $$[x]_i$$ distributed among n servers. The sum query $$S = \sum x$$ is computed as:
where p is a large prime. No single server learns individual inputs, but correctness follows from the linearity of shares. Practical implementations use SPDZ or BGW protocols with communication overhead polynomial in the circuit depth.
Federated Learning Constraints
Federated learning (FL) decentralizes model training by keeping data on devices. For a global model $$w_t$$ at step t, each client k computes:
The server aggregates updates via secure aggregation (SecAgg), which masks gradients with pairwise one-time pads. However, FL for transport systems must address:
- Device heterogeneity: Mobile devices vary in computational capacity
- Geographical bias: Local data may not represent system-wide patterns
- Inference attacks: Gradient updates may leak PII through inversion
Compliance with GDPR and CCPA
Legal frameworks impose additional constraints. Article 35 of GDPR requires Data Protection Impact Assessments (DPIAs) for high-risk processing. Key considerations include:
- Purpose limitation (e.g., prohibiting secondary use of journey data for advertising)
- Storage limitation (maximum retention periods for query logs)
- Right to explanation (ability to provide meaningful information about algorithmic decisions)
The California Consumer Privacy Act (CCPA) grants users rights to access and delete collected data, necessitating immutable audit logs and cryptographic deletion mechanisms.
Homomorphic Encryption for Real-Time Queries
Fully Homomorphic Encryption (FHE) allows computation on encrypted data. For a user query encrypted as $$[\![q]\!]$$, the server computes:
where $$[\![w_i]\!]$$ are encrypted model weights. Using TFHE or CKKS schemes, this preserves privacy but incurs 1000x+ latency overhead compared to plaintext processing, making it impractical for real-time systems without specialized hardware accelerators.

6.3 Transparency and Explainability
Modern chatbot systems for public transport must provide transparent decision-making processes to build user trust and meet regulatory requirements. The challenge intensifies when dealing with complex neural architectures like transformer-based models, where traditional interpretability methods often fail to capture the full reasoning chain.
Attention Visualization for Route Explanations
For sequence-to-sequence models handling route queries, attention weights offer the first layer of explainability. Given an input sequence x = (x1,...,xn) and output sequence y = (y1,...,ym), the attention mechanism computes alignment scores:
where si-1 is the decoder's previous hidden state and hj is the j-th encoder hidden state. The normalized attention weights αij then become:
Visualizing these weights reveals which input tokens (e.g., station names, time references) most influenced specific output elements (e.g., transfer suggestions). However, this method has limitations—attention weights don't always correlate with feature importance, and multi-head attention creates complex interaction patterns.
Counterfactual Explanations for Fare Calculations
When explaining fare determinations, counterfactual analysis proves more effective than attention alone. Given a fare prediction model f(x) = ŷ, we generate minimal input perturbations δ that alter the output:
For a query like "Why does my trip cost $$5.50?", the system might demonstrate that removing one zone crossing reduces the fare to $$4.25. Implementing this requires solving the optimization problem with constraints:
where valid ensures the modified input remains semantically plausible (e.g., doesn't create impossible station sequences).
Uncertainty Quantification for Schedule Reliability
Bayesian neural networks provide inherent uncertainty measures crucial for delay predictions. The predictive distribution for arrival time t given input x becomes:
where θ represents the model parameters and 𝒟 the training data. Monte Carlo dropout approximates this during inference:
with T forward passes using different dropout masks. This allows statements like "There's a 70% probability your train will arrive within 3 minutes of schedule."
Knowledge Graph Grounding for Entity Resolution
Linking model decisions to structured transport knowledge graphs (KGs) enhances verifiability. For a station disambiguation task, the system traces predictions through KG embeddings:
where hq is the question embedding and hei the KG entity embedding. The explanation can then reference connected KG facts—for example, confirming "You're asking about 'Central Station' (ID Q1234) which serves lines A, B, and C."
Implementation Architecture
A complete explainability system for transport chatbots requires layered components:
- Attention monitors tracking cross-sequence dependencies
- Gradient-based saliency for input feature importance
- Neural symbolic converter mapping embeddings to KG relations
- Uncertainty estimator with calibrated confidence intervals
The computational overhead varies by method—attention visualization adds minimal latency (∼5-15%), while counterfactual generation may require 200-300ms per explanation. Hybrid approaches that cache frequent explanations (e.g., common fare calculations) maintain responsiveness while preserving explainability.

7. Key Research Papers and Articles
7.1 Key Research Papers and Articles
- A survey on chatbots and large language models: Testing and evaluation ... — "Survey on Chatbots": This keyword ensures coverage of existing review papers for benchmarking and identifying gaps in prior research. "Evaluation Method": This keyword was included to target studies discussing testing frameworks, metrics, and methodologies for chatbot performance and reliability.
- Machine learning for next‐generation intelligent transportation systems ... — 1 INTRODUCTION. Intelligent transportation systems, or ITS for short, typically refers to the application of information, communication, and sensing technology to transportation and transit systems. 1 ITS is likely to be an integral component of tomorrow's smart cities 2 and will include a variety of services and applications such as road traffic management, traveler information systems ...
- PDF CHATBOT IN THE ONLINE PROVISION OF PUBLIC SERVICES - Universidade de Lisboa — Chatbots have also been researched in the public sector [8][9]. As a new digital channel, it can improve the communication between citizens and the government and it allows greater expressiveness [10]. Through dialogs, chatbots can provide Government services even under specific circumstances [11][12].
- PDF Architecture for public service chatbots - Joinup — Global interest in chatbots is booming Chatbots can be trained . exponentially faster than humans can , they are 24/7 available and react instantly to user queries. On top of that, public administrations can save a huge amount of resources by the decrease in user queries to human operators (e.g. through the helpdesk). Another big plus for
- PDF Cognitive Computing Systems and Ublic Value the Case of Chatbots and ... — In addition to the above papers, which have been included in the thesis a HICSS conference paper has been published after submission of the thesis for examination: Makasi, T., Nili, A., Desouza, K., & Tate, M. (2022, January). Public Service Values and Chatbots in the Public Sector: Reconciling Designer efforts and User Expectations.
- Chatbots: History, technology, and applications - ScienceDirect — The most crucial area of research on chatbots is the natural language interface, which is a critical area for physical robots too. Therefore, in the field of physical robots, we find abundant applications of natural language. For example, a novel natural language interface is developed for the autonomous robot called KAMRO (Lueth et al., 1994).
- PDF Exploring new Channels of Public Service Delivery via Chatbots — An E-government research study by Abdessamad Taounza . 1 . 2 MASTER'S THESIS Exploring new channels of Public Service delivery via Chatbots ABDESSAMAD TAOUNZA As per the requirements of the Master's of Science (M.Sc.) of IT in usiness December 2017 1st Supervisor: Dr. Arno Knobbe
- PDF Chatbot: Design, Architecutre, and Applications — and history of chatbots. Section 3 will introduce two design approaches to chatbots. In Section 4, we will delve into the general architecture of chatbots and describe the technologies that support each component in detail. Finally, we will address existing chatbot applications and social and ethical considerations in Section 5.
- Design and Development of CHATBOT: A Review - ResearchGate — These chatbots, powered by AI, deliver personalized customer interactions, reshaping customer engagement. Operating through websites and mobile apps, they address user queries in real-time ...
- PDF Master thesis : Design and implementation of a chatbot in the context ... — traditional channels. They even see the perks of chatbots in comparison to other solutions. However, despite all of this, they still feel that current chatbots are not as ef-fective as they could be as observed in a survey conducted by Chatbots.org [4]. Across all generations, 53% of customers view chatbots as "not effective" or only
7.2 Open Datasets for Transport Queries
- Public Transportation Big Data Mining and Analysis — Thus, this section primarily introduces a public transportation big data platform that is based on the theoretical framework of E-Science [10], which was established using a combination of spatial data (geospatial data of public transportation network) and public transportation data (public transportation smart card data)—an E-Science public ...
- PDF GenerativeAIAssistantforPublic Transport Using Scheduled and Real-Time Data — Public Transport, a web interface that offers real-time information regarding buses, including their positions, routes, service alerts, and more. The objective of this thesis is to integrate an AI assistant into the existing Gaia Public Transport portal. 1.1 Background Urban transport, particularly public transit systems, operate in a large and ...
- PDF Architecture for public service chatbots - Joinup — Global interest in chatbots is booming Chatbots can be trained . exponentially faster than humans can , they are 24/7 available and react instantly to user queries. On top of that, public administrations can save a huge amount of resources by the decrease in user queries to human operators (e.g. through the helpdesk). Another big plus for
- Transforming the Public Transport Sector with AI Chatbots - Velaro — The integration of AI-powered chatbots into public transportation systems offers significant benefits by enabling real-time communication through messaging apps, websites, and voice channels. These technologies address communication inefficiencies, provide 24/7 support, and offer personalized assistance, which helps improve the overall ...
- Exploring the Potential of Large Language Models in Public ... — The study demonstrates that ChatGPT can effectively understand and respond to various queries about public transit schedules and services, showcasing its potential in enhancing transit information systems. ... that pre-trained LLM models have gathered a substantial amount of transportation-related information from their training datasets ...
- 11 Data sources for transport data | QGIS for Transport Research: an ... — There are many good transport datasets out there, but they are not always easy to find. 11.1 Useful data sources The list below provides links to some key data sources that may be of use and interest, starting with the most universal and easy to use, and ending in rather specific datasets.
- A collection of public transport network data sets for 25 cities - Nature — Design Type(s) data integration objective • source-based data transformation objective Measurement Type(s) Public Transportation Technology Type(s) digital curation Factor Type(s) geographic ...
- (PDF) Chatbots - An Interactive Technology for Personalized ... — a) Methods of ticket purchase in public transport and b) experience with chatbots (n=134) +1 a) User satisfaction with the BLS chatbot and b) demand for real-time travel information (n=84)
- Artificial intelligence for improving public transport: a ... - Springer — The objective of this study is to provide a better understanding of the potential of using Artificial Intelligence (AI) to improve Public Transport (PT), by reviewing research literature. The selection process resulted in 87 scientific publications constituting a sample of how AI has been applied to improve PT. The review shows that the primary aims of using AI are to improve the service ...
- PDF Communicating and Transacting With Chatbots: Insights From Public Transport — The empirical study was separated in two online surveys: The first focused on 134 customers in the public transport sector and asked about their general preferences and habits queries the ...
7.3 Tools and Libraries for Chatbot Development
- How to Train a Chatbot on Your Own Data: A Comprehensive Guide - FastBots — 3. Dialogflow: A Google-owned platform that allows for training chatbots on custom data, albeit with some limitations. 4. Botpress: An open-source chatbot creation platform supporting multiple languages and custom data training. 5. Wit.ai: A Facebook-owned tool that offers support for custom data training and chatbot development.
- Top 7 Frameworks for Building Chatbots - GeeksforGeeks — Intuitive drag-and-drop interface simplifies chatbot development. Advanced NLP engine understands user intent and conversational flow. Pre-built features and functionalities to expedite chatbot creation. Pros: Beginner-Friendly: Dialogflow's drag-and-drop interface and pre-built features make it a fantastic choice for those new to chatbot ...
- The Chatbot Connection: Transforming Global Public Transport — As an all-in-one quality assurance platform for conversational AI, it ensures that the financial investments transport agencies make in chatbots will provide the return they expect. Complete QA with chatbot testing services. Chatbots represent one of the best opportunities for public transport to upgrade CX without spending exorbitantly.
- Chatbot development using Java tools and libraries — The aim of this paper is the development of an intelligent programming robot for help with coding, using Java tools and libraries. This paper will examine the development process of Java software bots and their general objective. For the purpose of the successful development of an intelligent programming robot, the paper will provide theoretical guidance in selecting frameworks and development ...
- Full Guide to Chatbot Development: Processes & Tools - ElifTech — Now that we understand the features chatbots can have and the tools available for their development, it's time to create a roadmap—a step-by-step plan for developing chatbots. This roadmap may differ from team to team, so we'll discuss the chatbot development process that we at ElifTech follow and have found to be the most effective based ...
- PDF Architecture for public service chatbots - Joinup — provide public services via chatbots. The scope of this study is limited to a desk research on the usage of chatbots in the public sector and includes input from: • the 2018 report "Report on the promotion for the uptake of the tools" 2, where a CPSV-AP based chatbot PoC was developed;
- Transforming the Public Transport Sector with AI Chatbots - Velaro — The integration of AI-powered chatbots into public transportation systems offers significant benefits by enabling real-time communication through messaging apps, websites, and voice channels. These technologies address communication inefficiencies, provide 24/7 support, and offer personalized assistance, which helps improve the overall ...
- Chatbot: an intelligent tool for libraries - ResearchGate — AI has been used in the libraries in applications of Chatbots for providing assistance to users and answering queries (Kaushal and Yadav, 2022; Sanji et al., 2022; Shanthi et al., 2019). It has ...
- Train AI Chatbot: A Comprehensive Guide to Mastering It - Techstack — While training computerized assistants, our data scientists also use deep neural networks and different machine learning libraries. Here's what steps we take while educating chatbots: Step 1: Data preparation. High-quality data is essential for chatbot training. We can gather data from: Customer support logs; FAQs and knowledge bases
- Communicating and Transacting with Chatbots: Insights from Public Transport — The paper presents the chatbot applicability for the health and safety of workers in the container transportation context. Starting from a literature review of risks and hazardous activities in ...








