AI Corpus Linguist: More than a Year of Experience
Summary
Querying language corpora usually requires a formal query language such as CQL, which most humanities scholars never learn. The authors built Corpus Linguist, a custom GPT on OpenAI's platform that lets users ask research questions in plain language. The system is connected to multilingual corpora through the Czech National Corpus (CNC) API. Its hybrid design works in stages. The LLM first clarifies what the user wants, for example whether they mean lemmas or word forms. It then calls the earlier rule-based translator Alpha to produce CQL, checks and fixes the result, retrieves corpus data, and runs further analysis in Python.
Over roughly 20 months of real use, the tool attracted thousands of API calls without any media promotion. The authors present it as the first corpus interface with voice input. The main lesson they report is that dependence on a third-party platform was costly: unannounced model changes and routing across models of varying quality made the system's behaviour unpredictable. They plan to move to the Model Context Protocol (MCP) to regain control.
Key points
- Usage: From March 2024 to November 2025, the system made 10,360 API calls across 382 active days, about 27.1 per active day. Usage peaked in November 2024 at 3,258 calls.
- API endpoints: The CNC-side API offers endpoints such as /translate (Alpha), /concordance (KWIC), /term-frequency (IPM, ARF), /freqs, /collocations (logDice by default), /text-types, /corplist and /info.
- Languages queried:
- Written Czech corpora: about 7,200 prompts.
- Spoken Czech corpora: 250 prompts.
- English (InterCorp English, BNC): 550 prompts.
- Smaller counts for German (167), Polish (117), French (68) and others.
- Recurring errors:
- Mistakes in CQL syntax.
- Endpoints that do not exist.
- Failing to tell users about available features, such as subcorpus comparisons or charts.
- Under GPT-5.x routing, the system is barely usable in non-thinking mode.
- Open materials: The system prompt and API description are published on Zenodo and OSF. Planned next steps are migration to MCP, an agentic setup, and less reliance on Alpha.
Cite
@inproceedings{milicka2026ai,
title = {{AI Corpus Linguist: More than a Year of Experience}},
author = {Milička, Jiří and Machálek, Tomáš},
booktitle = {Proceedings of the 10th Joint SIGHUM Workshop on Computational Linguistics for Cultural Heritage, Social Sciences, Humanities and Literature 2026},
year = {2026},
doi = {10.18653/v1/2026.latechclfl-1.29},
url = {https://doi.org/10.18653/v1/2026.latechclfl-1.29}
}References
- Tony McEnery and Andrew Hardie. 2011. Corpus linguistics: Method, theory and practice. Cambridge University Press. find
- Annelie Ädel. 2010. How to use corpus linguistics in the study of political discourse. In The Routledge handbook of corpus linguistics, pages 591–604. Routledge. find
- Paul Baker. 2006. Using corpora in discourse analysis. Continuum. find
- Tony Berber Sardinha. 2023. Corpus linguistics and historiography. Journal of Research Design and Statistics in Linguistics and Communication Science, 7(1):69–90. find
- Kaj Bostrom and Greg Durrett. 2020. Byte pair encoding is suboptimal for language model pretraining. In Findings of the Association for Computational Linguistics: EMNLP 2020, pages 4617–4624, Online. Association for Computational Linguistics. find
- Vaclav Brezina. 2018. Statistical choices in corpus-based discourse analysis. In Corpus approaches to discourse, pages 259–280. Routledge. find
- Winnie Cheng and 1 others. 2013. Corpus-based linguistic approaches to critical discourse analysis. The encyclopedia of applied linguistics, pages 1353–1360. find
- Stefan Thomas Gries and Anatol Stefanowitsch. 2007. Corpora in cognitive linguistics: Corpus-based approaches to syntax and lexis, volume 172. Walter de Gruyter. find
- Jiseung Hong, Grace Byun, Seungone Kim, Kai Shu, and Jinho D. Choi. 2025. Measuring sycophancy of language models in multi-turn dialogues. Preprint, arXiv:2505.23840. find
- Ziwei Ji, Nayeon Lee, Rita Frieske, Tiezheng Yu, Dan Su, Yan Xu, Etsuko Ishii, Ye Jin Bang, Andrea Madotto, and Pascale Fung. 2023. Survey of hallucination in natural language generation. ACM Computing Surveys, 55(12):1–38. find our card
- Anthony McEnery and Helen Baker. 2016. Corpus linguistics and 17th-century prostitution: Computational linguistics and history. Bloomsbury Academic. find
- Tony McEnery and Gavin Brookes. 2024. Corpus linguistics and the social sciences. Corpus linguistics and linguistic theory, 20(3):591–613. find
- Jiří Milička. 2026. Subjektivita umělé inteligence a robotů v českém jazykovém diskurzu: korpusová analýza let 2010–2023. In Michal Škrabal, Barbora Štěpánková, and Hana Skoumalová, editors, Korpus třicetiletý. Nakladatelství Lidové noviny. Forthcoming. find
- Jiří Milička and Denisa Šebestová. 2024. Query a corpus in near-natural language: A human-friendly corpus query language not only for linguists. In Crossing Boundaries through Corpora: Innovative corpus approaches within and beyond linguistics, pages 248– 262. John Benjamins Publishing Company. find
- Jiří Milička. 2024. Theoretical and methodological framework for studying texts produced by large language models. Preprint, arXiv:2408.16740. — [arXiv:2408.16740](https://arxiv.org/abs/2408.16740) find
- Nitarshan Rajkumar, Raymond Li, and Dzmitry Bahdanau. 2022. Evaluating the text-to-sql capabilities of large language models. Preprint, arXiv:2204.00498. — [arXiv:2204.00498](https://arxiv.org/abs/2204.00498) find
- Ute Römer. 2011. Corpus research applications in second language teaching, volume 31. Annual Review of Applied Linguistics. find
- John Sinclair. 1991. Corpus, concordance, collocation. Oxford University Press. find
- Hamada M Zahera, Manzoor Ali, Mohamed Ahmed Sherif, Diego Moussallem, and Axel-Cyrille Ngonga Ngomo. 2024. Generating sparql from natural language using chain-of-thoughts prompting. In SE-MANTICS, pages 353–368. find
This page in Markdown → https://md.research.elamur.ai/free/en/papers/milicka-2026-ai-corpus-linguist-more-than/