REVIEW 4 major objections 6 minor 13 references
Adaptations of AI models for querying the LandMatrix database in natural language
T0 review · 4 major / 6 minor · reviewed 2026-08-11 · deepseek-v4-flash
Pith's one-line read On Land Matrix data, a code-focused model with an entity-extraction agent turns plain-language questions into correct queries for two-thirds of REST requests and half of GraphQL requests.
desk verdict A useful Land Matrix benchmark and reproducible comparison, but the headline validity metric is under-specified and the paper overreads its own tables. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The central mechanism is the two-agent pipeline: a first agent extracts [entity: value] pairs from the user's question using predefined values in the Land Matrix database, and a second agent generates the REST or GraphQL query using those values, a small set of similar question-query pairs retrieved by RAG, the database schema, and API rules. This targeted context avoids dumping the full schema into the prompt, which the paper argues overwhelms the model. Evaluation relies on Jaccard similarity $J(A,B)=|A\cap B|/|A\cup B|$ between generated and reference queries and between their API results, with valid-query and valid-result thresholds on top of that similarity.
What would settle it
Run the Codestral-Agentic configuration dozens of times on the same 60 questions with non-zero temperature and plot the distribution of Valid Result for REST; if the 66% figure fluctuates by more than the gap to the second-best configuration, the paper's headline comparison is not stable.
Extended reading notes
Core claim
The paper claims that the winning combination is a code-specialized large language model paired with an entity-extraction agent that pre-fills known attribute values before the query-writing step. On the roughly 60-question corpus, this setup reaches 52% syntactic validity for REST and 77% for GraphQL, and 66% valid results for REST versus 51% for GraphQL, which the authors describe as two-thirds of the results expected by database users for REST and half for GraphQL. The same evaluation shows agentic adaptation beating prompt engineering, and prompt engineering beating RAG, with RAG sometimes hurting performance by adding irrelevant retrieved context. The authors frame the contribution as an extensible, reproducible comparison rather than a deployed product.
Load-bearing premise
The headline comparison rests on about 60 expert-written question-query pairs being representative of real user intent, and on single-run scores from each stochastic model at undisclosed decoding settings, so unrepresentative questions or noisy runs could reshuffle the ranking.
Editorial extensions
If this is right
- Agentic adaptation outperforms prompt engineering and RAG across models and metrics, and is the only configuration that makes REST query generation usable at all.
- Codestral-22B, specialized for code, dominates the general instruction-tuned models on both syntax validity and filter accuracy, so code specialization matters more than model size in this task.
- Even the best setup returns correct data for only 66% of REST questions, so roughly one-third of natural-language REST requests still fail end-to-end today.
- GraphQL syntax is consistently easier for all models than REST syntax, indicating that the request format is a bigger barrier than user phrasing.
- Because the code and data are released, new models can be added to the same benchmark and compared directly on the same corpus.
Reading between the lines
- The reported success rates imply that a practical natural-language interface to Land Matrix would still need a verification or repair step before showing results, since about one REST question in three fails even with the best tested setup.
- The entity-extraction-then-query-generation split should transfer to other structured databases whose main difficulty is mapping user words to canonical attribute values rather than query syntax.
- The single-run, roughly 60-question protocol means the exact percentages are point estimates; a stratified benchmark with more questions would reveal which question types drive the failures.
- RAG underperforming both simpler prompt engineering and the agentic setup suggests that retrieved similar examples can distract the generator when the schema is already present, a hypothesis the paper does not test directly.
Signed reviews
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper compares three open-weight LLMs (Llama3-8B, Mixtral-8x7B-instruct, Codestral-22B) under three adaptations (prompt engineering, RAG, and an agentic pipeline) for translating natural-language questions into REST and GraphQL queries against the Land Matrix database. The authors built a corpus of about 60 real non-technical user questions with expert-written ground-truth queries, and they evaluate generated queries for syntactic validity, filter accuracy, and result-set coverage. The central empirical claim is that Codestral-22B in the agentic configuration performs best, achieving 52% valid REST queries and 77% valid GraphQL queries, with 66% and 51% valid results respectively. The paper also describes a reproducible GitHub repository and a Streamlit demonstration.
Significance. If the headline result holds, the paper provides a useful and honest applied benchmark for natural-language access to a specific real-world database, with an emphasis on reproducibility through a public repository and a working demonstrator. The use of real user questions and expert-configured ground-truth queries is a strength, and scoring against independent expert queries avoids direct circularity. The main value is practical: it identifies a promising configuration (code-specialized LLM with an entity-extraction agent) for the Land Matrix and similar structured-data portals. The contribution is empirical rather than methodological, and the evaluation design currently limits how strongly the comparison can be trusted.
major comments (4)
- [Section 4.1.1 and Table 1] The metric definition and the table caption are inconsistent. Valid Query is defined as Jaccard similarity between the generated query and the expert query, but Table 1 is captioned 'Validity of the syntax of the requests' and Section 5.1 interprets the numbers as syntactic validity. No threshold is given for converting Jaccard values into the reported percentages, and no indication is given of whether the percentages were obtained by executing the queries against the API or by thresholding similarity. Because every model comparison in Tables 1 and 4 inherits these binary percentages, the headline claim that Codestral-Agentic reaches 52% REST and 77% GraphQL 'valid queries' cannot be assessed until the authors specify the mapping from Jaccard values to the reported percentages and distinguish syntactic validity from semantic similarity to the ground truth.
- [Section 5 (Tables 1-4)] Each condition is evaluated with a single run of a stochastic system, and decoding parameters such as temperature, top-p, and random seed are not reported. With roughly 60 test questions, the difference between Codestral-Agentic (52% REST valid query) and Codestral-RAG (29%) may correspond to a handful of questions, so the ranking is not statistically grounded. The authors should report per-condition raw counts, multiple runs, or confidence intervals, or at minimum disclose the decoding settings and seed so that the single-run comparison is reproducible.
- [Section 5.2 (Tables 2 and 3)] Filter accuracy is computed only on syntactically valid queries, but the tables do not report the number of valid queries per cell. For example, Codestral prompt-engineering REST has 2% valid queries in Table 1, so a 100% precision / 100% recall row likely rests on one observation; similarly, Llama3 agentic REST (2% valid) yields 100% precision but only 36% recall. The paper should give per-cell denominators or present raw counts for sparse cells, since percentages based on one or two queries are not comparable to those based on dozens.
- [Sections 3.2 and 3.3] The RAG configuration does not report the top-k value or the Faiss retrieval settings, and the agentic configuration does not specify the model and prompt used for the entity-extraction agent. Because the paper advertises reproducibility, these parameters should be stated in the manuscript itself (or the repository version should be pinned with a clear commit), rather than left to the reader to infer from the code.
minor comments (6)
- [Section 4.1] The sentence 'These include metrics for evaluating the overall quality of the queries and those for assessing the attributes used within them like.' is incomplete and should be rewritten.
- [Tables 2 and 3] The table header contains 'recallL' and 'accuracy' with inconsistent formatting, and the dash entries are not defined in a caption or footnote.
- [Section 5.1] The discussion paragraph contains the typo 'GrapQL' instead of 'GraphQL'.
- [Section 7] The reference 'Pedro et al. (2023)' appears as a standalone line immediately before the description of the demonstrator; it is not integrated into the surrounding text.
- [Section 3] The paper says the corpus contains 'almost 60' questions but does not report the exact corpus size, the number of REST versus GraphQL questions, or the train/test split used for the evaluation.
- [Figure 1] Figure 1 is referenced in Section 3.1 but the figure content is not included in the manuscript text; the prompt structure should be visible or fully described in prose.
Circularity Check
No significant circularity: model outputs are scored against independent expert-written ground-truth queries, and no central claim reduces to a fitted input or self-citation.
full rationale
The paper's derivation chain is an empirical benchmark: real user questions with expert-written REST/GraphQL queries are used as ground truth; LLMs generate queries under three adaptations; generated queries are executed and compared to ground truth by Jaccard similarity of result sets and filter accuracy. None of the reported percentages are defined in terms of the model's own outputs, and no parameter is fitted to the test set and then renamed as a prediction. The corpus is described as split into a part used to give the LLM query structure and a test part, which is the standard protection against RAG leakage; although the RAG section does not explicitly state that the retrieval index excludes test questions, the split statement makes the opposite interpretation unsupported. The mismatch between the Jaccard-based 'Valid Query' definition in Section 4.1.1 and the 'syntactic validity' caption in Table 1, and the absence of a stated similarity threshold, are threats to interpretability and correctness, not circularity. References are standard external work; no load-bearing self-citation or author-imported uniqueness claim appears. The central conclusion therefore has independent empirical content, so the circularity score is 0.
Assumptions & free parameters
free parameters (3)
- RAG top-k =
not reported
- Validity threshold for Jaccard-based metrics =
not reported
- LLM decoding parameters =
not reported
assumptions (3)
- domain assumption Expert-configured queries in the corpus are correct ground-truth interpretations of user intents.
- domain assumption The roughly 60-question corpus is representative of real non-technical user requests to Land Matrix.
- domain assumption The Land Matrix API schema and value lists used in prompts are accurate and complete.
Cite this review
Pith. "Pith review of Adaptations of AI models for querying the LandMatrix database in natural language." pith.science (2026). https://pith.science/paper/PSGTBKSF
@misc{pith2026241212961,
author = {Pith},
title = {Pith review of: Adaptations of AI models for querying the LandMatrix database in natural language},
year = {2026},
howpublished = {\url{https://pith.science/paper/PSGTBKSF}},
note = {Machine review of arXiv:2412.12961}
}
read the original abstract
The Land Matrix initiative (https://landmatrix.org) and its global observatory aim to provide reliable data on large-scale land acquisitions to inform debates and actions in sectors such as agriculture, extraction, or energy in low- and middle-income countries. Although these data are recognized in the academic world, they remain underutilized in public policy, mainly due to the complexity of access and exploitation, which requires technical expertise and a good understanding of the database schema. The objective of this work is to simplify access to data from different database systems. The methods proposed in this article are evaluated using data from the Land Matrix. This work presents various comparisons of Large Language Models (LLMs) as well as combinations of LLM adaptations (Prompt Engineering, RAG, Agents) to query different database systems (GraphQL and REST queries). The experiments are reproducible, and a demonstration is available online: https://github.com/tetis-nlp/landmatrix-graphql-python.
Figures
Reference graph
Works this paper leans on
- [1]
-
[2]
Balaguer, A., V . Benara, R. L. d. F. Cunha, R. d. M. E. Filho, T. Hendry, D. Holstein, J. Marsman, N. Mecklenburg, S. Malvar, L. O. Nunes, R. Padilha, M. Sharp, B. Silva, S. Sharma, V . Aski, and R. Chandra (2024). RAG vs Fine-tuning: Pipelines, Tradeoffs, and a Case Study on Agriculture. arXiv:2401.08406 [cs]
arXiv 2024
-
[3]
Brown, T. B., B. Mann, N. Ryder, M. Subbiah, J. Kaplan, P. Dhariwal, A. Neelakantan, P. Shyam, G. Sastry, A. Askell, S. Agarwal, A. Herbert-V oss, G. Krueger, T. Henighan, R. Child, A. Ramesh, D. M. Ziegler, J. Wu, C. Winter, C. Hesse, M. Chen, E. Sigler, M. Litwin, S. Gray, B. Chess, J. Clark, C. Berner, S. McCandlish, A. Radford, I. Sutskever, and D. Am...
arXiv 2020
- [4]
-
[5]
Hong, Z., Z. Yuan, Q. Zhang, H. Chen, J. Dong, F. Huang, and X. Huang (2024). Next-generation database interfaces: A survey of LLM-based text-to-SQL
work page 2024
- [6]
-
[7]
Liu, S., J. Xu, W. Tjangnaka, S. J. Semnani, C. J. Yu, and M. S. Lam (2024). SUQL: Conversational Search over Structured and Unstructured Data with Large Language Models. arXiv:2311.09818 [cs]
arXiv 2024
-
[8]
Pedro, R., D. Castro, P. Carreira, and N. Santos (2023). From prompt injections to SQL injection attacks: How protected is your LLM-integrated web application? Rozière, B., J. Gehring, F. Gloeckle, S. Sootla, I. Gat, X. E. Tan, Y . Adi, J. Liu, R. Sauvestre, T. Remez, J. Rapin, A. Kozhevnikov, I. Evtimov, J. Bitton, M. Bhatt, C. C. Ferrer, A. Grattafiori,...
arXiv 2023
Show all 13 references
-
[9]
Sun, R., S. O. Arik, A. Muzio, L. Miculicich, S. Gundabathula, P. Yin, H. Dai, H. Nakhost, R. Sinha, Z. Wang, and T. Pfister (2024). SQL-PaLM: Improved large language model adaptation for text-to-SQL (extended)
2024
-
[10]
Shazeer, N
Vaswani, A., N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, L. Kaiser, and I. Polosukhin (2017). Attention Is All You Need. Number: arXiv:1706.03762 arXiv:1706.03762 [cs]
2017 arXiv
-
[11]
Yang, J., H. Jin, R. Tang, X. Han, Q. Feng, H. Jiang, B. Yin, and X. Hu (2023). Harnessing the Power of LLMs in Practice: A Survey on ChatGPT and Beyond. arXiv:2304.13712 [cs]
2023 arXiv
-
[12]
Zhao, W. X., K. Zhou, J. Li, T. Tang, X. Wang, Y . Hou, Y . Min, B. Zhang, J. Zhang, Z. Dong, Y . Du, C. Yang, Y . Chen, Z. Chen, J. Jiang, R. Ren, Y . Li, X. Tang, Z. Liu, P. Liu, J.-Y . Nie, and J.-R. Wen (2023). A Survey of Large Language Models. arXiv:2303.18223 [cs]
2023 arXiv
-
[13]
Chiang, Y
Zheng, L., W.-L. Chiang, Y . Sheng, T. Li, S. Zhuang, Z. Wu, Y . Zhuang, Z. Li, Z. Lin, E. P. Xing, J. E. Gonza- lez, I. Stoica, and H. Zhang (2023). LMSYS-Chat-1M: A Large-Scale Real-World LLM Conversation Dataset. arXiv:2309.11998 [cs]. 8
2023 arXiv
Reviewed August 11, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.