AGENTIC SAFETY ASSISTANT MANAGER
Systems and methods of assisting fleet safety managers using agentic large language models are provided. A method for processing fleet safety queries using a two-model machine learning architecture. The method receives natural language queries regarding fleet safety data and analyzes each query using a first machine learning model to determine whether the query matches predetermined query patterns. Upon determining that a query does not match any predetermined patterns, the method generates a proposed data retrieval plan using a second machine learning model, identifies data sources required to fulfill the proposed plan, retrieves data from the identified sources, and generates a response including the retrieved data. The method provides supporting evidence links associated with factual assertions in the response, enabling verification of response accuracy against primary data sources.
1 . A method for processing fleet safety queries, comprising:
receiving, at one or more processors, a natural language query regarding fleet safety data;
analyzing, using a first machine learning model, whether the natural language query matches any predetermined query patterns;
upon determining the query does not match any predetermined patterns:
generating, using a second machine learning model, a proposed data retrieval plan;
identifying data sources required to fulfill the proposed plan;
retrieving data from the identified sources; and
generating a response including the retrieved data; and
providing supporting evidence links associated with factual assertions in the response.
2 . The method of claim 1 , wherein analyzing whether the natural language query matches any predetermined query patterns comprises:
generating a vector representation of the natural language query by encoding semantic features of the query into a multi-dimensional embedding space;
comparing the vector representation against a query pattern database storing previously processed query vectors; and
computing a similarity metric between the vector representation and each stored query vector.
3 . The method of claim 1 , wherein generating the proposed data retrieval plan comprises:
generating a structured data retrieval plan that specifies target database tables, query parameters, join conditions linking disparate data sources, and temporal filters.
4 . The method of claim 3 , wherein retrieving data from the identified sources comprises:
executing the structured data retrieval plan to retrieve fleet safety data from a plurality of data sources, wherein the plurality of data sources comprises at least two of: a GPS tracking database, a vehicle telemetry database, a video event database, or a driver performance database; and
integrating retrieved data from the plurality of data sources by correlating records based on temporal proximity and vehicle identifiers.
5 . The method of claim 1 , wherein generating the response further comprises:
identifying, within the retrieved data, safety-related data elements, wherein safety-related data elements comprise at least one of: collision event records, driver alert violations exceeding a severity threshold, hours-of-service compliance deviations, or vehicle maintenance fault codes;
executing a verification operation against a primary data source to confirm accuracy of each identified safety-related data element; and
generating a confidence indicator for each safety-related data element based on verification results.
6 . The method of claim 1 , further comprising:
analyzing a complexity score for the natural language query based on a count of distinct data sources required to fulfill the query, a count of distinct entity types referenced, and a count of temporal constraints specified;
in response to the complexity score exceeding a complexity threshold:
identifying temporal relationships between data records from different sources based on timestamp alignment within a configurable temporal window;
detecting data inconsistencies across sources by comparing overlapping data fields; and
generating a data consistency score for integrated retrieved data.
7 . The method of claim 1 , further comprising:
storing the proposed data retrieval plan in a query pattern database for subsequent pattern matching operations, wherein storing comprises:
extracting analysis parameters from the natural language query comprising entity types, temporal ranges, and aggregation functions;
recording metadata identifying each data source accessed; and
associating verification requirements with the stored plan based on data sensitivity classifications.
8 . The method of claim 1 , further comprising:
detecting, from the natural language query, a request for time-sensitive safety information based on presence of urgency indicators;
in response to detecting the request for time-sensitive safety information, routing the query to a dedicated processing pathway configured to bypass pattern matching and directly access real-time data feeds.
9 . The method of claim 1 , wherein the response further comprises uncertainty indicators for assertions lacking corresponding source records, wherein each uncertainty indicator includes explanatory text indicating data limitations.
10 . The method of claim 1 , further comprising:
receiving feedback data indicating user assessment of the response; and
adjusting a relevance weight associated with query patterns based on the feedback data.
11 . The method of claim 1 , further comprising:
upon generating the response, storing the natural language query in a query tracking database associated with a fleet identifier of an originating fleet management terminal;
periodically analyzing the query tracking database to identify query patterns that exceed a predetermined frequency threshold across a plurality of fleet management terminals;
generating user interface component specifications based on the identified query patterns;
computing a cluster priority score for each identified query pattern based on a weighted combination of cluster size, aggregate fleet size of contributing fleets, and aggregate safety performance scores of contributing fleets; and
ranking generated user interface component specifications by cluster priority score.
12 . The method of claim 11 , wherein computing the cluster priority score comprises:
retrieving, for each fleet contributing queries to a query pattern cluster, a computed safety score derived from collision rates, alert frequencies, and compliance metrics; and
applying elevated weighting to query contributions from fleets having safety scores exceeding a performance threshold.
13 . The method of claim 12 , further comprising:
determining fleet similarity between fleets associated with the plurality of fleet management terminals by representing each fleet profile as a vector encoding fleet size category, operational category, primary geographic region, and cargo type classification;
computing a distance metric between fleet profile vectors; and
distributing generated user interface component specifications to fleet management terminals associated with fleets having distance metrics below a similarity threshold.
14 . The method of claim 1 , further comprising:
prior to generating the response, analyzing the natural language query to determine whether requested analysis complies with predetermined operational guidelines by:
parsing the natural language query to identify requested analysis parameters comprising target data fields, aggregation dimensions, and filter criteria;
comparing the requested analysis parameters against a compliance rule database storing prohibited analysis patterns; and
generating a compliance risk score based on matching between requested analysis parameters and prohibited analysis patterns;
in response to the compliance risk score exceeding a compliance threshold, generating an alternative query that achieves safety-related analytical objectives while avoiding prohibited analysis patterns and processing the alternative query in place of the natural language query; and
logging the natural language query, compliance assessment, and the response in an audit database.
15 . The method of claim 14 , further comprising:
analyzing terminology used in the natural language query against a terminology guidance database storing term pairs comprising disfavored terms and preferred alternative terms;
detecting presence of disfavored terms in the natural language query;
generating a terminology suggestion comprising the preferred alternative term and an explanatory rationale; and
presenting the terminology suggestion prior to generating the response;
wherein the terminology guidance database stores term pairs comprising:
a first term pair mapping a collision-related disfavored term to a preferred neutral term; and
a second term pair mapping a driver qualification disfavored term to a preferred standard-of-care-neutral term.
16 . The method of claim 1 , further comprising:
subsequent to generating the response, computing a query abstraction of the natural language query that preserves analytical intent while removing fleet-identifying information, wherein computing the query abstraction comprises:
extracting semantic features from the natural language query;
identifying named entities in the natural language query comprising driver names, vehicle identifiers, location names, and customer references;
replacing identified named entities with categorical tokens indicating entity type without specific identity; and
normalizing numerical values referenced in the natural language query to categorical ranges; and
storing the query abstraction in a community knowledge database aggregating abstracted query representations from a plurality of fleet management systems.
17 . The method of claim 16 , further comprising:
periodically analyzing the community knowledge database to identify high-value query patterns based on correlation between query patterns and fleet safety performance improvements, wherein identifying comprises:
tracking safety performance metrics for fleets subsequent to query submission;
computing correlation coefficients between query pattern occurrence and safety metric improvements; and
classifying query patterns having correlation coefficients exceeding a correlation threshold as high-value query patterns.
18 . The method of claim 17 , further comprising:
identifying source fleets having safety performance metrics in a top performance tier;
applying elevated weighting to queries from top-tier fleets when computing correlation coefficients;
generating best-practice query collections comprising high-value query patterns predominantly contributed by top-tier fleets; and
transmitting suggested query templates derived from the best-practice query collections to target fleet management systems based on contextual applicability criteria.
19 . A system for processing fleet safety queries, comprising:
one or more processors; and
a memory coupled to the one or more processors and storing instructions that, when executed by the one or more processors, cause the system to:
receive a natural language query regarding fleet safety data;
analyze, using a first machine learning model, whether the natural language query matches any predetermined query patterns;
upon determining the query does not match any predetermined patterns:
generate, using a second machine learning model, a proposed data retrieval plan;
identify data sources required to fulfill the proposed plan;
retrieve data from the identified sources; and
generate a response including the retrieved data; and
provide supporting evidence links associated with factual assertions in the response.
20 . A non-transitory computer-readable medium storing instructions that, when executed by one or more processors, cause the one or more processors to perform operations comprising:
receiving a natural language query regarding fleet safety data;
analyzing, using a first machine learning model, whether the natural language query matches any predetermined query patterns;
upon determining the query does not match any predetermined patterns:
generating, using a second machine learning model, a proposed data retrieval plan;
identifying data sources required to fulfill the proposed plan;
retrieving data from the identified sources; and
generating a response including the retrieved data; and
providing supporting evidence links associated with factual assertions in the response.