Authors: Rajesh Chauhan, Akshay Bhardwaj, Vinay Kumar
Abstract: Writing correct, idiomatic Django Object-Relational Mapper (ORM) code remains a lasting productivity bottleneck for developers, especially developers who are new to the framework or working against unfamiliar schemas. In this paper, we present ORM Forge, a Django web application that utilizes the Anthropic Claude large language model (LLM) to translate natural language descriptions into production-ready Django ORM queries, and describe an empirical evaluation of the underlying natural language to query translation task, based on a publicly available benchmark, distributed as a structured tabular dataset. Instead of reiterating the system overview, we reframe ORM Forge as a research problem in natural-language-to-structured-query (NL2Query) translation, contextualize it within the wider text-to-SQL literature, and perform a quantitative analysis of translation difficulty based on a stratified sample of 120 question-query pairs from a cross-domain text-to-SQL benchmark.Queries were categorized by structural complexity (single-table, join, aggregation, nested/subquery) and manually mapped to their idiomatic Django ORM equivalents to evaluate how readily each SQL construct translates into ORM syntax such as Q objects, F expressions, annotate(), select_related(), and prefetch_related(). The results show that single-table filter and simple join queries translate almost directly (over 90% direct mapping) while nested subqueries and multi-level aggregations require non-trivial restructuring. This confirms that the query complexity is the dominant factor of translation difficulty. These observations motivate the design choices made by ORM Forge: structured JSON output, schema-grounded prompting, and bounded multi-turn refinement, and set the stage for discussing the limitations and future extensions of LLM-assisted ORM tooling.