Horizon: Indonesian Journal of Multidisciplinary
Vol. 4 No. 4 (2026): HORIZON: Indonesian Journal of Multidisciplinary (In-Press)

Deteksi Ill-Formed Natural Language Query Berbasis Rule Pada Model Llm Text-to-SQL Berbahasa Indonesia

Mukti, Ricky Fajar (Unknown)
Prasetya, Agung (Unknown)
Cahyono, Taufiq Agung (Unknown)



Article Info

Publish Date
30 Jul 2026

Abstract

The performance of a Large Language Model (LLM)-based Text-to-SQL system is heavily influenced by the quality of the user-supplied Natural Language Queries (NLQs). Ill-formed NLQs, such as incomplete, ambiguous, or inconsistent information within the database schema, can generate syntactically valid but semantically incorrect SQL queries. This study aims to develop a rule-based ill-formed NLQ detection system as a pre-processing stage in an Indonesian Text-to-SQL pipeline. The system is built using the Experta library with 15 IF-THEN rules that identify six categories of ill-formed NLQs: insufficient information, multiple interpretations, incomplete conditions, illogical, out-of-schema reference, and unsafe/non-SELECT. After rule-only filtering, a LLaMA 3.2 3B Instruct-based validator is optionally used to examine cases requiring deeper semantic understanding. An evaluation of 202 Indonesian NLQs showed that the Rule-only mode achieved 89.60% Recall, 78.87% Precision, 83.90% F1-Score, and 78.71% Accuracy. False positives were primarily influenced by overly strict rules, while false negatives were dominated by semantic ambiguity. These results demonstrate that the rule-based approach provides a consistent and transparent initial filtering mechanism and can be combined with an LLM-based validator to handle cases requiring more complex semantic interpretation.  

Copyrights © 2026






Journal Info

Abbrev

hijm

Publisher

Subject

Agriculture, Biological Sciences & Forestry Humanities Decision Sciences, Operations Research & Management Economics, Econometrics & Finance Languange, Linguistic, Communication & Media Social Sciences Other

Description

Horizon: Indonesian Journal of Multidisciplinary (HIJM) journal aims to stimulate discussions at all levels of mathematics education through disseminating significant and innovative scholarly studies that are of value to the international research communities. The journal welcomes articles focusing ...