一种基于大模型和检索增强的表格问答方法

By fine-tuning the CodeLLaMA-7B-Instruct-hf model using LoRA and enhancing the multimodal knowledge base, the accuracy issues of table-based question answering and multi-table queries in Chinese software development scenarios were resolved, achieving efficient and accurate data analysis and lowering the query threshold.

CN120929485BActive Publication Date: 2026-07-17CHONGQING UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHONGQING UNIV
Filing Date
2025-07-28
Publication Date
2026-07-17

AI Technical Summary

Technical Problem

Existing table-based question-answering technologies suffer from low accuracy, difficulty in adapting to multiple table structures, and lack of domain knowledge in Chinese software development scenarios, making it difficult to meet the needs for efficient and accurate data analysis.

Method used

We constructed a Text-to-SQL model, LLMforTable, using the CodeLLaMA-7B-Instruct-hf large model combined with LoRA parameter fine-tuning. We then generated a structured Prompt to improve accuracy by using a multimodal knowledge base and an incremental difficulty training strategy, combined with Sentence-BERT and IVF-PQ algorithms.

Benefits of technology

In Chinese software development scenarios, it significantly improves the accuracy of SQL generation, reduces training resource consumption, shortens training time, and enables non-technical users to directly obtain database information through natural language, thus lowering the query threshold.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120929485B_ABST
    Figure CN120929485B_ABST
Patent Text Reader

Abstract

本发明涉及一种基于大模型和检索增强的表格问答方法,包括如下步骤:选用CodeLLaMA‑7B‑Instruct‑hf,利用LoRA技术进行参数微调得到LLMforTable;构建多模态知识库,对多模态知识库中非结构化文档转换为纯文本,按语义粒度分块使用Sentence‑BERT将文本转化为768维知识向量;将用户输入的自然语言问题转换为向量,与知识向量计算相似度,选取相似度大于阈值且按降序排列的前Top‑K个相似度所对应的知识向量,然后再将提取Top‑K个知识向量对应的知识片段;制作结构化提示Prompt,将Prompt作为LLMforTable的输入,输出SQL语句。
Need to check novelty before this filing date? Find Prior Art