The present disclosure relates to systems and methods for retrieving
telematics data as well as for training
machine learning models. A method for retrieving
telematics data may comprise operating at least one processor to: provide a plurality of databases, each
database storing at least
telematics data originating from a plurality of telematics devices installed in a plurality of vehicles; receive a
natural language request from a user, the
natural language request comprising at least one textual question relating to the telematics data stored within one of the plurality of databases; generate, using a large
language model (LLM) that does not have access to the plurality of databases, an
executable query for retrieving a portion of the telematics data that is responsive to the
natural language request from the
database by inputting into the LLM at least: a contextual prompt, the contextual prompt providing to the LLM at least one or more features of the
database, an expected structure of the
executable query, and one or more example natural language requests and corresponding
executable query outputs, and the natural language request; execute the executable query for retrieving the portion of the telematics data from the database; and return at least the portion of the telematics data to the user, whereby the natural language request is responded to without providing the LLM with access to the telematics data stored on the plurality of databases.