AI-based automated SQL query generation for SQLite databases in Mobile forensics
Автоматизированная генерация SQL-запросов на основе ИИ для баз данных SQLite в мобильной криминалистике
2026-03-21
SCID: 54.1/ggeuzjhg
Discuss with AI
ForSQLiteLMSQLite databasesText-to-SQL generationmobile forensicsretrieval-augmented generation
Figures from the paper
Abstract (AI)
SQLite databases play a central role in mobile phone forensics. Mobile applications frequently use them for data storage. Efficient extraction and interpretation of SQLite data is crucial for reconstructing device usage and user activities. In practice, digital forensic investigators must formulate and analyse complex SQL queries to retrieve evidence from various heterogeneous databases. This task requires extensive expertise in SQL, database schemas, and application-specific data logic. In this paper, we investigate an LLM-based approach to assist digital forensic investigators by automating the generation of SQL queries for forensic analysis. This enables investigators to query SQLite databases more efficiently and with less technical effort. First, we propose a mobile forensic dataset that captures typical investigative questions and database structures. We then use this model to fine-tune a local LLM. We introduce ForSQLiteLM, a 4-bit quantised LLaMA-3.1–8B model. It is optimised on a self-defined, domain-specific dataset tailored to mobile forensic scenarios. We compare ForSQLiteLM with several state-of-the-art LLMs to evaluate its effectiveness in generating forensic queries. We show that effective forensic Text-to-SQL generation can be achieved with a locally deployable 3B-parameter LLM by combining realistic SQLite schemas, execution-based evaluation, and domain-specific fine-tuning. Finally, as a proof of concept, we demonstrate how the proposed model can be integrated into the FQLite data retrieval tool via a retrieval-augmented generation (RAG) pipeline.
Key Findings
1
A proof-of-concept integrates the model into the FQLite retrieval tool through a retrieval-augmented generation pipeline.
2
Effective forensic Text-to-SQL generation is achieved by combining realistic schemas, execution-based evaluation, and domain-specific fine-tuning.
3
ForSQLiteLM is a locally deployable, domain-fine-tuned Llama 3.2-3B bf16 model for generating forensic SQLite queries.
4
ForSQLiteLM is benchmarked against several state-of-the-art LLMs to assess forensic SQL-query generation effectiveness.
5
The paper introduces a mobile-forensics dataset containing typical investigative questions and heterogeneous SQLite database structures.
Research Object
SQLite databases used in mobile phone forensics
Research Subject
Automated generation and forensic effectiveness of SQL queries for extracting and interpreting evidence from heterogeneous mobile-application databases
Publication Details
Publication Date
2026-03-21
Journal
Publisher
ISSN
Cited by
0
Open access PDF
Access Type
Author Information
Download PDF
Subscribe to digest