PulseExploreJournal ClubDebatesTrendingResearchersJournals
Instagram
HomeExploreJournal ClubTrending
Synapse
⌘+K
Synapse
April 26, 2026Iconic Research and Engineering Journals0 citations

Natural Language Querying of DUCKDB using LLM

PDPoojitha K DCPChandana M PallegarGHG K Harshitha

Key Points

  • The aim is to facilitate data analysis for users without SQL knowledge by allowing natural language queries.
  • Developed a web-based application using Flask and a pre-trained large language model.
  • Processed CSV files with Pandas to create a structured dataset for DuckDB.
  • Converted natural language inputs into SQL queries and returned results in JSON format.
  • The application successfully converts natural language queries into SQL commands, ensuring accuracy in results.
  • User interactions are streamlined with an intuitive interface supporting real-time responses.
  • Demonstrated effectiveness in handling various datasets while maintaining data privacy.

Abstract

Many users work with CSV files to store data, but analyzing this data usually requires knowledge of SQL, which can be difficult for non-technical users. To overcome this problem, this project presents a web-based application that allows users to interact with their data using simple English queries instead of writing SQL commands. The system converts natural language input into SQL queries, making data analysis faster and easier without requiring any programming skills. The proposed system runs completely offline and is developed using the Flask web framework along with a locally hosted pre-trained Large Language Model. This approach ensures data privacy and avoids dependency on cloud-based services. When a CSV file is uploaded, it is processed using Pandas to clean column names, identify data types, and dynamically generate a relational structure inside DuckDB, an in-memory analytical database. The user’s query is combined with the dataset schema and processed by the language model to generate accurate SQL statements. These queries are validated to prevent unsafe operations and are then executed on the dataset, with results returned in a structured JSON format. The application provides a simple and interactive user interface built using HTML, CSS, and JavaScript, supporting drag-and-drop file uploads, data preview, and real-time query responses. This project demonstrates an efficient and secure solution for querying structured data using natural language, making it useful for academic, business, and inventory-related datasets. Future improvements may include support for multiple datasets, graphical data visualization, and enhanced model optimization for handling more complex queries.

Ask AI
Helpful
Bookmark
Share
View Full Paper

Cite This Study

D et al. (2026) studied this question.

synapsesocial.com/papers/69edacbd4a46254e215b4776https://doi.org/10.64388/irev9i10-1716470
Ask AI
Helpful
Bookmark
Share
View Full Paper