更新时间:2026-02-04
Natural Language Retrieval of BCC Corpus Based on Large Language Models
刘廷超 ,  鲁鹿鸣 ,  荀恩东 * ,  靳泽莹 ,  杨兆勇    作者信息&出版信息
语料库语言学   ·   2026年2月4日   ·   2025年 12卷 第1期  
14 0(CNKI)
PDF
该文暂无导航

AI 摘要

1 Introduction

This section introduces the impact of the growth of linguistic data in the information age on linguistic research and natural language processing, highlighting the importance of corpora. It mentions the achievements in the construction of Chinese corpora, such as the BCC corpus, and points out that using corpora for retrieval requires mastery of specific query rules, which increases the difficulty of use. Natural language querying has gained attention as a way to lower the barrier to usage, but research on converting natural language to corpus queries has seen limited progress. This paper aims to study the conversion of natural language to corpus queries, using the BCC corpus as the target. It develops the TextToBCC model through steps such as constructing datasets, designing conversion methods, and fine-tuning large language models to achieve the conversion of natural language to BCC queries, reduce usage difficulty, and provide an efficient retrieval tool for related fields.

2 Research Background

This section first elaborates on the importance of corpora in linguistic research, teaching, and natural language processing, while noting the limitations posed by the complexity of corpus queries on widespread application. It then introduces natural language query technology, emphasizing its ability to allow users to perform information retrieval in natural language form, with examples such as text-to-SQL conversion and natural language to CQL conversion research. Finally, it discusses large language models and their fine-tuning techniques, explaining the advancements of large language models in language understanding and generation, as well as the role of fine-tuning techniques like LoRA in optimizing model performance and reducing computational costs and memory usage.

3 Construction of the BCC Query Dataset

This chapter details the entire process of constructing the BCC query dataset. First, by analyzing the query logs and error logs of the BCC corpus, samples are categorized, organized, and extracted proportionally. Query generation strategies are designed to supplement data-deficient categories, ultimately constructing a balanced and comprehensive BCC query dataset. The BCC corpus is a multilingual online resource primarily focused on Chinese, offering advantages such as large data volume, comprehensive domain coverage, and efficient retrieval, using queries for high-efficiency searches. The study filtered fifty thousand user query instances from the query logs, classified them into six categories, and conducted statistical analysis. The data distribution was found to be imbalanced, so data augmentation techniques were applied. Additionally, ten thousand data points were extracted from the error logs, and error detection and correction mechanisms were designed to construct an error correction dataset. Moreover, to support model training and evaluation, example sentences were selected from the BCC corpus and annotated to build a high-quality sentence annotation dataset. BCC query generation rules were designed to produce diverse queries. Finally, the query dataset was constructed proportionally to enhance data processability and traceability.

4 TextToBCC Model Training

This section elaborates on the training process of the TextToBCC model, aimed at effectively converting natural language into BCC queries. First, by designing prompts containing key elements, natural language descriptions of BCC queries were generated using online large language models such as Tongyi Qianwen and ChatGLM. After manual review and correction, the dataset was constructed. Next, the generation of the TextToBCC model was introduced, which involves fine-tuning open-source large language models to achieve the objective. During the construction of the fine-tuning dataset, BCC queries and their natural language descriptions were used as input and expected output, respectively, while an error correction dataset was included to train the model to identify and correct erroneous queries. In the fine-tuning phase, both the ChatGLM3 and Tongyi Qianwen models were fine-tuned using LoRA technology to reduce training parameters and computational costs. Fine-tuning configurations were adjusted, and scripts were executed to complete the fine-tuning. Finally, the optimized models were merged with the original models to enhance their performance on the task of converting natural language to BCC queries.

5 Experiment

This chapter evaluates the performance of the fine-tuned ChatGLM3-6B and Qwen-7B models in converting natural language to BCC queries through a series of tests. The tests include natural language conversion tests, query error correction tests, and performance tests. In the natural language conversion test, the fine-tuned Qwen-7B model outperformed the fine-tuned ChatGLM3-6B model in both exact match rate and execution correctness rate. In the error correction test, both models demonstrated high capabilities in error identification and correction, with an average correction ability exceeding 99%. Performance tests showed that the average response time of the fine-tuned Qwen-7B model was significantly lower than that of the fine-tuned ChatGLM3-6B model. Comprehensive analysis indicates that the fine-tuned Qwen-7B model outperforms the fine-tuned ChatGLM3-6B model in both query conversion accuracy and performance, leading to the selection of the fine-tuned Qwen-7B model as the TextToBCC model.

6 Conclusion

This chapter summarizes the design and implementation of the TextToBCC model. By constructing a fine-tuning dataset and employing joint training methods, the model successfully converts natural language into BCC queries and includes error correction capabilities, significantly improving user experience and model practicality. Experimental results verify the high performance of the model, and this method demonstrates broad applicability, providing a new approach for the promotion of the BCC corpus.

* 以上内容由AI自动生成,内容仅供参考。对于因使用本网站以上内容产生的相关后果,本网站不承担任何商业和法律责任。

展开

当前期刊

当前期刊
    目录