基于BERT的领域知识问答系统实践研究
首发时间:2026-09-18
摘要:领域知识问答系统在离线运行、数据不出域及长期调用成本等方面存在实际约束。当前主流方案倾向于采用大参数量的生成式模型,但本文认为,对于领域专用任务,大模型中大部分参数用于编码通用语言知识,真正服务于特定领域的有效参数占比极低,构成显著的模型冗余。本文以海洋领域知识服务为背景,在端侧大语言模型(LLM)实验的基础上,回归判别式架构,采用"文本分类+预设答案"思路,使用仅约 1.02 亿(102M)参数的 bert-base-chinese 构建可离线部署的问答系统。实验先在国产 ARM 开发板上对比了 Ollama CPU 推理与 RKLLM NPU 推理的性能,发现端侧 LLM 在延迟、幻觉及资源占用方面存在局限,进而转向 BERT 分类方案。本文强调"领域即专业",训练数据来源于国家标准、行业规范及企业知识,确保答案的权威性。围绕知识提取、训练数据构造、模型训练与部署验证,形成了一套可复现的工程流程,并针对多源权威文档中同一概念存在不同表述的语义一致性问题,提出了基于分类置信度分析的训练数据去重方法,以"海温"短问题为例,置信度由 49.85% 提升至 94.16%,验证集准确率达 96.79%。对比实验表明,该方案无需 GPU,可在 x86 与 ARM 架构的 CPU 设备上流畅运行(x86 平台推理延迟约 87ms,ARM 平台约 307ms),是本地化 AI 部署的有益实践探索,在离线环境、涉密场景和标准问答等任务中具备实用价值,验证了"合适的模型比更大的模型更重要"这一选型思路。
关键词: 人工智能 BERT 知识问答 文本分类 训练数据清理 边缘部署
For information in English, please click here
Practical Research on BERT-based Domain Knowledge Question Answering System
Abstract:Domain knowledge question answering systems face practical constraints in offline operation, data localization, and long-term invocation costs. Current mainstream solutions tend to adopt large-parameter generative models. However, for domain-specific tasks, this paper argues that most parameters in large models are used to encode general linguistic knowledge, while the proportion of parameters truly serving a specific domain is extremely low, resulting in significant model redundancy. Taking marine domain knowledge services as the background, this paper returns to the discriminative architecture based on experiments with edge-side Large Language Models (LLM), and adopts a "text classification + preset answers" approach, using bert-base-chinese with only about 102 million (102M) parameters to build an offline-deployable question answering system. Experiments first compared the performance of Ollama CPU inference and RKLLM NPU inference on domestic ARM development boards, revealing limitations of edge-side LLMs in latency, hallucination, and resource occupation, leading to the shift toward the BERT classification scheme. This paper emphasizes "domain means specialty": the training data originate from national standards, industry norms, and enterprise knowledge to ensure authority. A reproducible engineering pipeline covering knowledge extraction, training-data construction, model training, and deployment verification is established. A confidence-analysis-based training-data deduplication method is proposed for the semantic-consistency problem where the same concept is expressed differently across multiple authoritative sources; taking the short question "sea temperature (海温)" as an example, the confidence increased from 49.85% to 94.16%, and the validation accuracy reached 96.79%. Comparative experiments show that the proposed scheme requires no GPU and runs smoothly on x86 and ARM CPUs (approximately 87ms on x86 and 307ms on ARM), serving as a useful exploration of localized AI deployment with practical value in offline, confidential, and standard-question-answering scenarios, validating the design philosophy that "a suitable model matters more than a larger one."
Keywords: AI BERT knowledge question answering text classification training data cleaning edge deployment
基金:
引用

No.****
同行评议
勘误表
基于BERT的领域知识问答系统实践研究
评论
全部评论