Query analysis method and device based on large language model, equipment and storage medium

By constructing a multi-source data knowledge graph and entity links and causal attribution of a large language model, the problems of static solidification of knowledge system and shallow analysis capability of large language model in enterprise-level applications are solved. Semantic fusion and in-depth diagnostic analysis of multi-source data are realized, and the business relevance and accuracy of analysis results are improved.

CN122285852APending Publication Date: 2026-06-26SHENZHEN EXX IND AUTOMATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610739171.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-27
Publication Date
2026-06-26

Smart Images

  • Figure CN122285852A_ABST
    Figure CN122285852A_ABST
Patent Text Reader

Abstract

This invention relates to the field of data analysis technology, and in particular to a query analysis method, apparatus, device, and storage medium based on a large language model. The method provides comprehensive and effective data support for enterprise decision-making. It achieves semantic fusion of multi-source heterogeneous data through a unified knowledge graph, breaking the limitations of traditional data silos and providing a comprehensive and accurate business knowledge foundation for the large language model, reducing model illusions from the source. It achieves differentiated analysis processing through task type classification, automatically scheduling different capability modules of the large language model according to user needs, balancing the efficiency of basic queries with the accuracy of in-depth analysis. It obtains the full business context through entity links, limiting the reasoning process of the large language model to the enterprise's real business scenarios, significantly improving the business relevance of the analysis results. It achieves in-depth diagnostic analysis through causal attribution, fully leveraging the logical reasoning capabilities of the large language model and overcoming the limitations of descriptive analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data analysis technology, and in particular to a query analysis method, apparatus, device, and storage medium based on a large language model. Background Technology

[0002] Currently, data-driven decision-making has become a key component of a company's core competitiveness. Traditional business intelligence tools typically employ visual drag-and-drop query builders or fixed template report systems. The core cognitive burden of data analysis is concentrated on the user end, requiring users to clearly define their analysis objectives and master data structures and SQL query skills in advance. This creates a cognitive barrier for non-professional data users and makes it difficult to meet the needs of companies for data-driven operations across the board.

[0003] The emergence of Natural Language to SQL (NL2SQL) technology provides a technical approach to overcome the aforementioned cognitive barriers. In particular, NL2SQL solutions based on Large Language Models (LLM) can achieve data querying through natural language interaction, significantly reducing the operational threshold for data analysis. However, solutions that simply rely on LLM to directly generate SQL have unavoidable technical defects: First, they are prone to model illusion, resulting in logical errors or inconsistencies with business terminology in the generated SQL statements; second, they lack sufficient precision in understanding enterprise-specific business terminology, leading to semantic ambiguity; and third, they struggle to generate complex nested queries, multi-table joins, and other high-level SQL statements, resulting in query stability and accuracy that cannot meet the needs of enterprise-level applications.

[0004] Meanwhile, existing related technical solutions generally suffer from five core bottlenecks: First, the knowledge system is static and fixed, unable to adapt to the dynamic changes in business scenarios, and the upper limit of intelligence is strictly limited by the completeness of manually predefined content; second, the interaction mode is passive and can only respond to user-initiated queries, unable to autonomously uncover hidden business opportunities and risks in the data; third, the analysis capability is superficial, only able to perform descriptive data queries, unable to support in-depth diagnostic analysis, and difficult to provide effective support for business decisions; fourth, the understanding of business context is limited, unable to integrate multi-source heterogeneous data to construct a complete business scenario, and the analysis conclusions lack depth.

[0005] It is evident that existing technologies still need improvement and enhancement. Summary of the Invention

[0006] To overcome the shortcomings of existing technologies, the present invention aims to provide a query analysis method based on a large language model, which solves the problems of static and fixed knowledge system, shallow analytical capabilities, and limited understanding of business context in existing technologies.

[0007] The first aspect of this invention provides a query analysis method based on a large language model, comprising: acquiring multi-source data and constructing a knowledge graph based on the multi-source data; when a query request is received, identifying and extracting candidate business entities and task types, wherein the candidate business entities include defined entities and the task types include descriptive analysis tasks and diagnostic analysis tasks; when the candidate business entity is a defined entity, constructing entity links between the candidate business entity and the knowledge graph to extract full business context from the knowledge graph; when the task type is a descriptive analysis task, generating standardized SQL statements based on the full business context to obtain query result data; when the task type is a diagnostic analysis task, performing causal attribution and causal inference based on the full business context to obtain attribution analysis conclusions; converting the query result data or the attribution analysis conclusions into visualized data and opening a pre-built interactive analysis entry.

[0008] Optionally, in a first implementation of the first aspect of the present invention, the step of acquiring multi-source data and constructing a knowledge graph based on the multi-source data includes: acquiring multi-source data, wherein the multi-source data includes structured data, semi-structured data, and unstructured data; extracting tables, fields, and primary and foreign key relationships from the structured data, extracting entities and hierarchical attributes from the semi-structured data, and extracting business entities and related relationships from the unstructured data through a named entity recognition and relationship extraction model; aligning and linking entities extracted from different data sources using a three-level matching mechanism combining literal similarity, semantic similarity, and business rules to obtain alignment information; completing the alignment information based on ontology reasoning rules and a graph embedding algorithm, and constructing the knowledge graph based on the completed alignment information.

[0009] Optionally, in a second implementation of the first aspect of the present invention, the candidate business entity further includes an undefined entity. When a query request is received, after identifying and extracting the candidate business entity and task type, the method further includes: when the candidate business entity is an undefined entity, counting the frequency of occurrence of the undefined entity and the number of independent users triggering it within a preset statistical period to determine whether the undefined entity is a high-frequency undefined entity; when determined to be a high-frequency undefined entity, obtaining defined indicator information of the same type as the undefined entity; inputting the name of the undefined entity and the same type of defined indicator information into a pre-trained dynamic indicator generation engine to generate inference information, the inference information including the inference entity definition, inference calculation logic, and SQL mapping draft; obtaining user feedback information based on the inference information; when the user feedback information is an inference confirmation, generating candidate indicators based on the inference information and storing them in a pre-built candidate indicator pool.

[0010] Optionally, in a third implementation of the first aspect of the present invention, when the candidate business entity is a defined entity, constructing an entity link between the candidate business entity and the knowledge graph to extract the full business context from the knowledge graph includes: calculating the semantic similarity between the candidate business entity and all entity nodes in the knowledge graph to generate a candidate matching node set; performing business rationality verification on the candidate matching node set, and filtering the candidate matching node set based on the rationality verification result to obtain a filtered matching node set; obtaining a preset confidence threshold, and constructing an entity link between the candidate business entity and the knowledge graph based on the confidence threshold and the filtered matching node set; and traversing the knowledge graph to obtain the indicator calculation methods, dimension enumeration values, business constraint rules, associated business events, and historical analysis conclusions related to the entity link to form the full business context.

[0011] Optionally, in the fourth implementation of the first aspect of the present invention, the step of generating a standardized SQL statement based on the full business context to obtain query result data includes: based on the full business context, matching the indicator calculation logic, dimension mapping relationship, and user-specified filtering condition rules corresponding to the entity link to obtain entity matching results; generating a standardized SQL statement based on the entity matching results, and sequentially performing syntax validity verification, business scope consistency verification, and permission compliance verification on the standardized SQL statement; obtaining the original query result data based on the standardized SQL statement that has passed the three verifications, and sequentially performing format standardization, null value filling, and outlier cleaning processing on the original query result data to generate the query result data.

[0012] Optionally, in a fifth implementation of the first aspect of the present invention, the step of performing causal attribution and causal inference based on the full business context to obtain an attribution analysis conclusion includes: confirming the target business indicator based on the query request, performing structured attribution analysis on the target business indicator to generate a structured attribution result; retrieving internal and external time-series data related to the target business indicator from the full business context, identifying business events, external environmental factors, and related indicators associated with the structured attribution result from the internal and external time-series data, and generating time-series related events; generating multiple verifiable causal hypotheses based on the pre-stored business causal logic in the knowledge graph, combined with the time-series related events, and calculating a credibility score for each causal hypothesis to determine whether the credibility score of the causal hypothesis meets a preset credibility threshold; integrating the structured attribution result, the time-series related events, and the causal hypotheses whose credibility scores meet the preset credibility threshold to generate the attribution analysis conclusion.

[0013] Optionally, in the sixth implementation of the first aspect of the present invention, after constructing the knowledge graph based on the multi-source data, the method further includes: according to a preset scanning cycle, calling a time series anomaly detection model, a key driving factor analysis model, an association rule mining model, and a time series prediction model respectively to scan the pre-constructed underlying original business database and generate multiple candidate insight events; setting weights based on four dimensions—business impact, statistical significance, novelty, and executability—to score each candidate insight event and obtain a comprehensive score corresponding to each candidate insight event; selecting candidate insight events with a comprehensive score not lower than a preset threshold as high-value insight events; calling a pre-trained insight narrative engine to convert the selected high-value insight events into natural language summaries; constructing an analysis dashboard for the high-value insight events; integrating the analysis dashboard and the natural language summaries to form indicator change information; and performing personalized push operations on the indicator change information.

[0014] A second aspect of the present invention provides a query analysis device based on a large language model, comprising: a construction module for acquiring multi-source data and constructing a knowledge graph based on the multi-source data; a response module for identifying and extracting candidate business entities and task types when a query request is received, wherein the candidate business entities include defined entities and the task types include descriptive analysis tasks and diagnostic analysis tasks; a linking module for constructing entity links between the candidate business entities and the knowledge graph when the candidate business entities are defined entities, so as to extract full business context from the knowledge graph; an acquisition module for generating standardized SQL statements based on the full business context when the task type is a descriptive analysis task, so as to acquire query result data; an inference module for performing causal attribution and causal inference based on the full business context when the task type is a diagnostic analysis task, so as to obtain attribution analysis conclusions; and an interaction module for converting the query result data or the attribution analysis conclusions into visualized data and opening a pre-built interactive analysis entry.

[0015] A third aspect of the present invention provides a query analysis device based on a large language model, the query analysis device based on a large language model comprising: a memory and at least one processor, the memory storing instructions; at least one processor calling the instructions in the memory to cause the query analysis device based on a large language model to perform the various steps of the query analysis method based on a large language model described above.

[0016] A fourth aspect of the present invention provides a computer-readable storage medium storing instructions that, when executed by a processor, implement the steps of the query analysis method based on a large language model as described above.

[0017] The technical solution of this invention addresses the core shortcomings of existing technologies, such as static and rigid knowledge systems, shallow analytical capabilities, and limited understanding of business context. It achieves semantic fusion of multi-source heterogeneous data through a unified knowledge graph, breaking the limitations of traditional data silos and providing a comprehensive and accurate business knowledge foundation for large language models, reducing model illusions from the outset. Differentiated analysis and processing are achieved through task type classification, automatically scheduling different capability modules of the large language model according to user needs, balancing the efficiency of basic queries with the accuracy of in-depth analysis. The full business context is obtained through entity links, limiting the reasoning process of the large language model to real-world business scenarios, significantly improving the business relevance of the analysis results. In-depth diagnostic analysis is achieved through causal attribution, fully leveraging the logical reasoning capabilities of the large language model and overcoming the limitations of descriptive analysis. Attached Figure Description

[0018] Figure 1 A flowchart illustrating the query analysis method provided in this embodiment of the invention; Figure 2 This is a schematic diagram of the structure of the query analysis device provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of the query analysis device provided in an embodiment of the present invention. Detailed Implementation

[0019] This invention provides a query analysis method, apparatus, device, and storage medium based on a large language model. In this invention, the terms "first," "second," "third," "fourth," etc. (if present)," in the specification, claims, and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" or "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0020] The query analysis method disclosed in this application uses a large language model as the core intelligent engine, adopts a layered architecture that combines a general-purpose base large language model with multiple vertical special task engines, and integrates knowledge graphs to build an end-to-end query analysis system. It effectively solves the core problems of traditional large language models in enterprise-level applications, such as business understanding bias, model illusion, uncontrollable output, and poor scenario adaptability, while retaining the original advantages of large language models in natural interaction, flexible reasoning, and content generation. In the layered architecture, the general-purpose base language model serves as the underlying foundation, possessing general natural language understanding, semantic encoding, logical reasoning, and text generation capabilities. All vertical-specific task engines are based on this base language model, fine-tuned through LoRA low-rank adaptation, eliminating the need for full-parameter quantization training and balancing model consistency and scenario adaptability. Specifically, the vertical-specific task engines include four engines: 1. A dedicated entity parsing engine is used for user query intent classification, business entity extraction, and contextual semantic verification, corresponding to the entity recognition and linking process in steps 101 and 103. 2. A dedicated engine for dynamic indicator generation, used for semantic inference of undefined entities, standardized generation of new business indicators, and construction of SQL mapping drafts, corresponding to the indicator self-evolution process in steps 301 to 304; 3. Dedicated engine for attribution reasoning, used for generating business causal hypotheses, verifying evidence, and integrating multi-dimensional reasoning, corresponding to the diagnostic attribution analysis process in step 105; 4. A dedicated engine for insightful narratives, used for technical analysis of data, business-oriented translation of insightful events, and generation of natural language summaries, corresponding to the proactive insight push process in steps 701 to 704.

[0021] This application discloses a query analysis method based on a large language model. For ease of understanding, the specific process of the embodiments of this invention is described below. Please refer to [link / reference]. Figure 1 One embodiment of the query analysis method based on a large language model in this invention includes: 101. Obtain multi-source data and construct a knowledge graph based on the multi-source data; In this embodiment, by integrating various data resources from within and outside the enterprise, and using a large language model to assist in the semantic extraction and fusion of multi-source data, a unified knowledge foundation covering all business scenarios is formed. This breaks down information silos between different data sources, realizes a unified semantic representation of multi-source data, provides a comprehensive knowledge background for the large language model to understand complex business problems, enhances the system's business cognition ability, and enables the large language model to accurately understand enterprise-specific business terms and business logic.

[0022] 102. When a query request is received, candidate business entities and task types are identified and extracted. The candidate business entities include defined entities, and the task types include descriptive analysis tasks and diagnostic analysis tasks. In this embodiment, a BERT-CRF model fine-tuned with enterprise business data is used to extract candidate business entities, accurately identifying three core entities in the query: metrics, dimensions, and filtering conditions. The BERT-CRF model uses the open-source BERT-base as its base encoder, coupled with a CRF sequence constraint layer. Enterprise query corpora are collected and labeled, data augmented, and the dataset is partitioned. The underlying general parameters of the model are frozen, and the top-level network and CRF layer are fine-tuned using LoRA low-rank adaptation. Iterative training is performed using cross-entropy and sequence maximum likelihood joint loss, and model convergence is determined based on the F1 score on the validation set. The BERT-CRF model is obtained through iterative fine-tuning. Simultaneously, a text classification model based on a large language model is used for task type identification. By analyzing the semantic features of the query text, it distinguishes whether the user's need is a descriptive analysis task to obtain basic data or a diagnostic analysis task to explore the cause, achieving accurate identification of the user's query intent. Complex natural language needs are transformed into structured processing instructions, laying the foundation for subsequent targeted scheduling of different capability engines of the large language model, and improving the accuracy and efficiency of the system response.

[0023] 103. When the candidate business entity is a defined entity, construct entity links between the candidate business entity and the knowledge graph to extract the full business context from the knowledge graph; In this embodiment, the candidate business entities extracted by the large language model are semantically matched and associated with the standardized entities in the knowledge graph to obtain all business information related to the candidate business entities, forming a complete analysis context, i.e., a full business context, which is then injected into the large language model. This solves the problem of comprehension bias caused by the lack of business context in the large language model, provides rich business background for query generation and analysis reasoning of the large language model, effectively reduces model illusion, and improves the business relevance of the analysis results.

[0024] 104. When the task type is a descriptive analysis task, a standardized SQL statement is generated based on the full business context to obtain query result data; In this embodiment, for query requirements that only need to obtain basic information such as indicator values ​​and trends, i.e., descriptive analysis tasks, the large language model generates structured query parameters in combination with the business context. The system converts the structured parameters into standardized SQL statements based on predefined indicator mapping rules to obtain accurate data results from the underlying database. This avoids the instability of SQL directly generated by the large language model, ensures the rigor of the query logic and the consistency of business definitions, and significantly improves the accuracy and reliability of descriptive queries, while retaining the convenience of natural language interaction.

[0025] 105. When the task type is a diagnostic analysis task, causal attribution and causal inference are performed based on the full business context to obtain attribution analysis conclusions. In this embodiment, for the query requirement of exploring the reasons for changes in business indicators, i.e. diagnostic analysis task, the large language model combines business context to perform multi-dimensional analysis and reasoning, integrates statistical analysis results and business knowledge, mines the causal relationships behind the data, and forms logically clear in-depth analysis conclusions. This breaks through the limitation of existing technologies that can only perform descriptive analysis, and gives full play to the logical reasoning ability of the large language model, providing in-depth explanations of causes and decision-making basis for business decisions.

[0026] 106. Convert the query results data or the attribution analysis conclusions into visualized data and open a pre-built interactive analysis portal; In this embodiment, an ECharts-based visualization component library is used. The large language model automatically selects the most suitable chart type based on the data type and business meaning of the analysis results, converting the analysis results into intuitive visualization charts, thus lowering the threshold for users to understand complex data. At the same time, a pre-built interactive analysis entry is provided, allowing users to conduct further exploration and analysis through clicks, drags, and other operations, meeting different levels of analysis needs and improving the user interaction experience.

[0027] The query analysis method based on a large language model disclosed in this application addresses the core shortcomings of existing technologies, such as static and fixed knowledge systems, shallow analytical capabilities, and limited understanding of business context. It achieves semantic fusion of multi-source heterogeneous data through a unified knowledge graph, breaking the limitations of traditional data silos and providing a comprehensive and accurate business knowledge foundation for the large language model, reducing model illusions from the outset. Differentiated analysis processing is achieved through task type classification, automatically scheduling different capability modules of the large language model according to user needs, balancing the efficiency of basic queries with the accuracy of in-depth analysis. The full business context is obtained through entity links, limiting the reasoning process of the large language model to real business scenarios, significantly improving the business relevance of the analysis results. In-depth diagnostic analysis is achieved through causal attribution, fully leveraging the logical reasoning capabilities of the large language model and overcoming the limitations of descriptive analysis.

[0028] Furthermore, in this embodiment of the invention, the step of acquiring multi-source data and constructing a knowledge graph based on the multi-source data includes: 201. Obtain multi-source data, including structured data, semi-structured data, and unstructured data; In this embodiment, structured data refers to data with a fixed format, a predefined data model, and can be expressed through a two-dimensional table structure. Specific sources include enterprise OLTP business databases, OLAP data warehouses, standardized Excel reports, and table data in relational databases. Semi-structured data refers to data that does not have a strict two-dimensional table structure but contains self-descriptive tags and markers to separate semantic elements and hierarchical structures. Specific sources include API return data in JSON / XML format, system log files, BI report templates, and non-standard tables in CSV format. Unstructured data refers to data without a predefined data model and cannot be expressed through a structured format. Specific sources include enterprise business documents, product manuals, news, meeting minutes, customer service chat logs, and emails. By acquiring multi-source data, the integration and utilization of the enterprise's full data resources are achieved, avoiding knowledge gaps caused by a single data source, and providing a comprehensive data foundation for building a complete business knowledge system.

[0029] 202. Extract tables, fields, and primary and foreign key relationships from the structured data; extract entities and hierarchical attributes from the semi-structured data; and extract business entities and related relationships from the unstructured data using a named entity recognition and relationship extraction model. In this embodiment, for structured data, the system connects to the underlying database via JDBC, parses the database schema information, and automatically extracts information such as table names, field names, data types, and primary and foreign key constraints. For semi-structured data, the system uses Jackson or Gson parsing libraries to parse JSON / XML format data and extract entity nodes, attribute values, and hierarchical relationships. For unstructured data, the system uses a BERT-base-NER model fine-tuned with enterprise business data for named entity recognition, which can accurately identify enterprise-specific business entities, such as product names, department names, and business metrics. The REBEL relation extraction model is used to extract relationships between entities, which can identify various business relationships such as causal relationships, subordinate relationships, and association relationships. Targeted extraction techniques are used to achieve effective semantic extraction of various types of data, ensuring the accuracy and completeness of entities and relationships in the knowledge graph.

[0030] 203. A three-level matching mechanism combining literal similarity, semantic similarity, and business rules is adopted to align and link entities extracted from different data sources to obtain alignment information; In this embodiment, literal similarity matching uses the edit distance algorithm to calculate the degree of difference between two entity name strings. The smaller the difference, the higher the similarity, thus initially filtering out potentially identical entities. Semantic similarity matching uses the Sentence-BERT model to convert entity names and descriptions into 768-dimensional semantic vectors. The semantic consistency of entities is determined by calculating the cosine similarity between the vectors. Business rule matching uses a Drools-based rule engine to load enterprise-defined business rules, such as rules for different aliases of the same product or rules for historical changes in department names. By aligning and linking entities extracted from different data sources, problems such as inconsistent entity naming and semantic ambiguity in different data sources are solved, achieving entity unification across data sources. This ensures the consistency and accuracy of the constructed knowledge graph, enabling the large language model to obtain unified and standardized business entity information.

[0031] 204. The alignment information is completed based on ontology reasoning rules and graph embedding algorithms, and the knowledge graph is constructed based on the completed alignment information; In this embodiment, the ontology reasoning rules are defined based on the OWL ontology language and include subclass relation reasoning, attribute transitive reasoning, equivalence relation reasoning, etc., which can discover the implicit logical relationships between entities. The graph embedding algorithm adopts the TransE model, which maps entities and relations to a low-dimensional vector space and predicts missing links between entities through vector operations. Aligned entities are used as nodes, relations between entities are used as edges, and entity attributes are used as attribute values. All information is stored in the form of RDF triples to construct a complete enterprise business knowledge graph.

[0032] Furthermore, in this embodiment of the invention, the candidate business entity also includes an undefined entity. After identifying and extracting the candidate business entity and task type upon receiving a query request, the process further includes: 301. When the candidate business entity is an undefined entity, the frequency of occurrence of the undefined entity and the number of independent users triggered within a preset statistical period are counted to determine whether the undefined entity is a high-frequency undefined entity. In this embodiment, the specific determination rule for high-frequency undefined entities is as follows: if the candidate business entity appears in user queries a total of 5 or more times within a statistical period of 7 consecutive natural days, and the number of independent users who trigger the query for that entity is 2 or more, then the candidate business entity is determined to be an undefined entity. The query time, query user, and query content of all undefined entities are automatically recorded and statistically analyzed periodically. The undefined entities are business indicators that users are generally concerned about but the system has not yet supported. By periodically performing statistical analysis on undefined entities, an objective basis is provided for the dynamic expansion of the system, avoiding the lag and subjectivity of manually maintaining the indicator system, and enabling the system to quickly respond to new user needs.

[0033] 302. When a high-frequency undefined entity is identified, obtain defined indicator information of the same type as the undefined entity; In this embodiment, based on the semantic features of undefined entities, the Sentence-BERT model is used to calculate their semantic similarity with all defined indicators in the knowledge graph. The five most similar defined indicators of the same type are selected, and information such as the business definition format, calculation formula structure, dimensional association method, and SQL mapping template of these indicators are obtained as reference defined indicator information. The defined indicator information provides a standardized reference template for the large language model to generate new indicators, ensuring the consistency and compatibility of the generated new indicators with the existing indicator system, and reducing the uncontrollability of the content generated by the large language model.

[0034] 303. Input the name of the undefined entity and the defined indicator information of the same type into the pre-trained dynamic indicator generation engine to generate inference information, the inference information including the inference entity definition, inference calculation logic and SQL mapping draft; In this embodiment, the dynamic indicator generation engine is based on a general-purpose large language model and fine-tuned using LoRA low-rank adaptation technology. The training dataset of the dynamic indicator generation engine includes multiple indicators manually defined by the enterprise in history and their SQL mappings, indicator definitions in the enterprise's business documents, and publicly available industry indicator standards. The training process adopts a supervised learning approach, with the input being indicator names and reference indicator information, and the output being standardized indicator definitions, calculation formulas, and SQL mappings. The fine-tuned large language model can generate inference information that conforms to the enterprise's business specifications based on the input information. For subsequent queries of undefined indicators, the system will display the generated inference information to the user. After the user confirms, the system will temporarily generate and execute the corresponding SQL statement to obtain the query result, and simultaneously store the indicator in the candidate indicator pool. This realizes the automatic generation of new business indicators, significantly reduces the workload of manually defining indicators, improves the system's response speed to business changes, and enables users to query the new indicator data they need in a timely manner.

[0035] 304. Obtain user feedback information based on the inference information. When the user feedback information is a confirmation of the inference, generate candidate indicators based on the inference information and store them in a pre-built candidate indicator pool. In this embodiment, the generated inference information is presented to the user in a clear format, including the business definition of the indicator, the calculation formula, the SQL mapping draft, etc., and three options are provided: confirm, modify, and reject. When the user clicks the confirm button, the system organizes the indicator information into standardized candidate indicator objects and stores them in a dedicated candidate indicator pool, waiting for subsequent review by business experts, thus realizing the dynamic self-evolution of the system indicator system.

[0036] Furthermore, in this embodiment of the invention, when the candidate business entity is a defined entity, constructing entity links between the candidate business entity and the knowledge graph to extract the full business context from the knowledge graph includes: 401. Perform semantic similarity calculation between the candidate business entity and all entity nodes in the knowledge graph to generate a candidate matching node set; In this embodiment, the Sentence-BERT model is used to convert candidate business entities into semantic vectors. Simultaneously, all entity nodes in the knowledge graph are pre-converted into semantic vectors and stored in a vector database. Using the approximate nearest neighbor search function of the vector database, the 10 entity nodes with the highest similarity to the candidate business entity vectors are quickly retrieved, forming a candidate matching node set. This achieves accurate semantic matching of entities, effectively handling semantic variations such as synonyms and near-synonyms, and improving the recall rate of entity links.

[0037] 402. Perform business rationality verification on the candidate matching node set, and filter the candidate matching node set based on the rationality verification result to obtain a filtered matching node set; In this embodiment, the business rationality verification includes: Role-based access control checks whether the business data corresponding to the candidate business entity is within the current user's access permissions, filtering out entities that the user is not authorized to access. Business scenario matching: Based on the user's department, position, and historical query records, determine whether the candidate business entity is related to the user's business scenario; And context consistency verification, which combines the current query context and historical dialogue information to determine whether the candidate business entity is consistent with the current dialogue context; The candidate matching node set is filtered based on the rationality verification results, eliminating semantically similar but business-irrelevant matching results, improving the accuracy of entity linking, and avoiding analysis result deviations and permission leakage problems caused by incorrect matching.

[0038] 403. Obtain a preset confidence threshold, and based on the confidence threshold and the set of filtering matching nodes, construct entity links between the candidate business entities and the knowledge graph; In this embodiment, the preset confidence threshold is 90%. The filtered candidate matching node set is sorted from high to low similarity, and the node with the highest similarity is selected. If its similarity is greater than or equal to 90%, an entity link is directly established. If the similarity is between 60% and 90%, all candidate nodes are displayed to the user, who then manually selects the correct matching result. If the similarity is less than 60%, the entity is determined to be an undefined entity. Entity linking refers to accurately mapping and binding unstructured and non-standardized business entity mentions extracted from the user's query text to pre-stored standardized entity nodes within the knowledge graph through semantic similarity matching, business rationality filtering, and confidence threshold determination. This completes the semantic alignment and association mapping between the user's colloquial vocabulary and the system's standard business entities, constructing a unique corresponding entity association relationship.

[0039] 404. Traverse the knowledge graph to obtain the calculation methods of indicators, dimension enumeration values, business constraint rules, related business events and historical analysis conclusions related to the entity link, and form the full business context; In this embodiment, a breadth-first traversal is performed along the relation edges in the knowledge graph, centered on the matched entity node, with a traversal depth of 3 layers. This process acquires all business information related to the entity, including the calculation method of the metrics, optional dimensions and their enumeration values, business constraints, related business events, and previous analysis records. This information is then organized into a structured full business context, providing comprehensive business background information for the analysis and processing of the large language model. This ensures that the large language model can accurately understand business requirements and generate analysis results that conform to business specifications, effectively reducing the generation of model illusions.

[0040] Furthermore, in this embodiment of the invention, the step of generating standardized SQL statements based on the full business context to obtain query result data includes: 501. Based on the full business context, match the indicator calculation logic, dimension mapping relationship and user-specified filtering rules corresponding to the entity link to obtain the entity matching result; In this embodiment, the calculation methods of the metrics related to the query, the mapping relationship between dimensions and database fields, and the filtering conditions such as time, region, and product specified by the user are extracted from the full business context. This information is organized into a structured query parameter object, including metric ID, dimension list, filtering condition list, time range, etc., to form entity matching results.

[0041] 502. Generate standardized SQL statements based on the entity matching results, and sequentially perform syntax validity checks, business consistency checks, and permission compliance checks on the standardized SQL statements; In this embodiment, a standard SELECT query statement is generated according to the structured query parameters and a predefined SQL template. The ANTLRSQL parser is used to parse the syntax tree of the generated SQL statement, checking for syntax errors and performing a syntax validity check. The calculation logic of the generated SQL statement is compared with the calculation criteria of the metrics stored in the knowledge graph to ensure consistency and perform a business criterion consistency check. Based on the RBAC permission model, it is checked whether the user has permission to access all tables and fields involved in the SQL statement, performing a permission compliance check. Through this triple verification mechanism, the correctness, compliance, and business accuracy of the generated SQL statement are ensured, avoiding problems such as syntax errors, criterion discrepancies, and permission leaks.

[0042] 503. Based on the standardized SQL statement that has passed three validations, the original query result data is obtained. The original query result data is then subjected to format standardization, null value filling and outlier cleaning in sequence to generate the query result data. In this embodiment, the original query results are obtained from the underlying database through the validated SQL statement. Then, format standardization is performed to convert results of different data types into a unified format, such as unifying the date format to YYYY-MM-DD and retaining two decimal places for numeric formats. Next, null values ​​are filled using different filling methods according to business rules, such as filling numeric fields with the mean or median and filling character fields with "unknown". Finally, outlier cleaning is performed using a combination of the 3σ principle and box plot method to identify and remove abnormal data that exceeds a reasonable range, thus avoiding erroneous conclusions due to data quality issues.

[0043] Furthermore, in this embodiment of the invention, the step of performing causal attribution and causal inference based on the full business context to obtain attribution analysis conclusions includes: 601. Based on the query request, confirm the target business indicators, and perform structured attribution analysis on the target business indicators to generate structured attribution results; In this embodiment, the target business indicators that users need to analyze are extracted from the entity link results. Then, the target business indicators are subjected to structured attribution analysis by combining dimensional drill-down and indicator factor decomposition methods. This can quickly locate the main influencing factors and provide a solid data foundation for subsequent causal analysis. The dimensional drill-down method decomposes the target business indicators according to different dimensions and calculates the contribution of each member under each dimension to the overall change of the indicator. The indicator factor decomposition method decomposes the composite indicator into the product or sum of multiple basic indicators and uses the Shapley value decomposition algorithm to calculate the contribution of the change of each basic indicator to the change of the composite indicator.

[0044] 602. Retrieve internal and external time-series data related to the target business indicator from the full business context, identify business events, external environmental factors and related indicators associated with the structured attribution results from the internal and external time-series data, and generate time-series related events; In this embodiment, internal business data and external market data, macroeconomic data, weather data, and other time-series data related to the target business indicators are obtained from the knowledge graph. The Pearson correlation coefficient is used to calculate the correlation between these time-series data and the changes in the target business indicators. Time-series data with an absolute correlation coefficient greater than 0.7 are selected. Combined with business knowledge, the corresponding business events, external environmental factors, and related indicators are identified, and time-series related events are generated to link the changes in indicators with specific business events and external environments. This breaks through the limitations of simple data statistics, provides more contextual evidence for causal inference, and makes attribution analysis more business-meaningful.

[0045] 603. Based on the pre-stored business causal logic in the knowledge graph, and combined with the time-series related events, generate multiple verifiable causal hypotheses, and calculate a credibility score for each causal hypothesis to determine whether the credibility score of the causal hypothesis meets the preset credibility threshold. In this embodiment, the causal hypothesis refers to a speculative statement about a factor causing a change in a target business indicator. Based on the business causal relationship rules stored in the knowledge graph, such as promotional activities increasing sales and logistics delays reducing user satisfaction, and combined with the identified time-series related events, multiple possible causal hypotheses are generated. Then, the evidence weighting method is used to calculate the credibility score of each causal hypothesis, specifically based on the number of supporting evidences, the strength of evidence, and the consistency of evidence. The calculated credibility score has a maximum of 100 points, and the preset credibility threshold is 70 points. Causal hypotheses with a score ≥70 points are considered credible. By generating causal hypotheses, reasoning from correlation to causation is realized, which can generate causal explanations that conform to business logic, avoid the error of mistaking accidental correlation for causal relationship, and improve the scientificity and reliability of attribution analysis.

[0046] 604. Integrate the structured attribution results, the time-series related events, and the causal assumptions that the credibility scores meet the preset credibility threshold to generate the attribution analysis conclusion; In this embodiment, the attribution analysis conclusion refers to a comprehensive and systematic explanation of the reasons for changes in target business indicators. It integrates quantified structured attribution results, relevant business events and external factors, and causal hypotheses verified by credibility. The large language model generates logically clear and well-supported natural language attribution analysis conclusions according to the logical structure of core conclusions, primary causes, secondary causes, and impact analysis. This provides users with comprehensive and in-depth diagnostic analysis results, clearly explaining the reasons for changes in business indicators and providing direct and effective basis for business decisions.

[0047] Furthermore, in this embodiment of the invention, after constructing the knowledge graph based on the multi-source data, the method further includes: 701. According to the preset scanning cycle, the time series anomaly detection model, key driving factor analysis model, association rule mining model and time series prediction model are called respectively to scan the pre-built underlying original business database and generate multiple candidate insight events. In this embodiment, the preset scanning cycle is differentiated according to the importance of business indicators. Core business indicators such as sales revenue and user volume are scanned once per hour, while non-core business indicators are scanned once per day. The time series anomaly detection model adopts an integrated anomaly detection model of Prophet and Isolation Forest. This model adopts a serial integration architecture. Prophet first completes the time series baseline fitting, and then the fitting residual is input into Isolation Forest to complete the anomaly identification. The time series anomaly detection model is pre-trained offline based on the core business time series data of the enterprise over the past three years. Its input is the continuous time series values ​​of business indicators and statistical timestamps, and the output is indicator trend features, seasonal features, anomaly scores, and anomaly locations. The key driver analysis model is the Shapley value key driver analysis model, which does not require pre-training. Its input is the overall fluctuation data of the indicators and the sub-dimensional data of each dimension, and the output is the contribution of the indicator fluctuations of each business dimension and factor, as well as the ranking results of the core driver dimensions. The association rule mining model is the FP-Growth association rule mining model, which does not require pre-training. Its input is a batch of multi-dimensional detailed business datasets, and its output is the association rules, association weights, and hidden business association patterns between business indicators, dimensions, and events.

[0048] The time series prediction model is the ARIMA time series prediction model, which completes offline parameter training and fitting based on the enterprise's historical business time series data. Its input is the historical continuous time series data of the indicator, and its output is the predicted value of the indicator in the future period and the trend of the indicator. By performing regular scans, continuous and automatic monitoring of business data is achieved, which can proactively discover hidden business opportunities and risks in the data, changing the traditional passive response interaction mode and providing valuable information to users in advance.

[0049] 702. Based on four dimensions—business impact, statistical significance, novelty, and feasibility—weights are set to score each candidate insight event, resulting in a comprehensive score corresponding to each candidate insight event. In this embodiment, the weighting of the four dimensions is as follows: business impact 40%, statistical significance 30%, novelty 20%, and executability 10%. Business impact is scored based on the importance of the indicator and the magnitude of abnormal changes; for example, a core indicator with a change exceeding 20% ​​receives 40 points. Statistical significance is scored based on the anomaly score output by the anomaly detection model; the higher the anomaly score, the higher the overall score. Novelty is scored based on whether the insight has appeared in the past 30 days; a first appearance receives 20 points, and a repeated appearance receives 0 points. Executability is scored based on whether the insight can guide specific business actions; for example, directly guiding adjustments to promotional activities receives 10 points. The scores of the four dimensions are added together to obtain the comprehensive score.

[0050] 703. Select candidate insight events with a comprehensive score not lower than a preset threshold as high-value insight events, call the pre-trained insight narrative engine, and convert the selected high-value insight events into natural language summaries; In this embodiment, the preset comprehensive score threshold is 80 points. The insight narrative engine is based on a general-purpose large language model and fine-tuned using LoRA low-rank adaptation technology. The training dataset of the insight narrative engine includes historical business analysis reports, insight reports, industry analysis articles, etc., and the training process adopts a supervised learning method. The input is technical statistical analysis results, and the output is business-oriented natural language summaries. The fine-tuned insight narrative engine can transform technical statistical data into concise and clear natural language summaries that conform to the reading habits of business personnel, improving the readability and usability of insight results, enabling non-professional users to quickly understand the important information in the data, and lowering the threshold for information acquisition.

[0051] 704. Build an analysis dashboard for the high-value insight event, integrate the analysis dashboard and the natural language summary to form indicator change information, and perform personalized push operations on the indicator change information; In this embodiment, the analysis dashboard refers to a visualization page that includes multiple interactive charts and data display components, used to display detailed data and analysis results related to insights. Based on a low-code visualization component library, an analysis dashboard is generated for each high-value insight event, configuring relevant trend charts, bar charts, pie charts, and other charts, as well as interactive drill-down functionality. The indicator change information integrates natural language summaries and analysis dashboard links, enabling users to quickly obtain key information and conduct in-depth analysis. Finally, based on the user's role, business responsibilities, and historical areas of interest, the indicator change information is pushed to the corresponding user through channels such as the system homepage, email, and enterprise instant messaging tools, helping users quickly gain a deeper understanding of the business situation, make timely decisions, and improve the system's proactive service capabilities and user experience.

[0052] The query analysis method based on a large language model in the embodiments of the present invention has been described above. The query analysis device based on a large language model in the embodiments of the present invention will be described below. Please refer to [link / reference]. Figure 2 One embodiment of the query analysis device based on a large language model in this invention includes: Construction module 801 is used to acquire multi-source data and construct a knowledge graph based on the multi-source data; The response module 802 is used to identify and extract candidate business entities and task types when a query request is received. The candidate business entities include defined entities, and the task types include descriptive analysis tasks and diagnostic analysis tasks. The linking module 803 is used to construct an entity link between the candidate business entity and the knowledge graph when the candidate business entity is a defined entity, so as to extract the full business context from the knowledge graph. The acquisition module 804 is used to generate standardized SQL statements based on the full business context to obtain query result data when the task type is a descriptive analysis task. The inference module 805 is used to perform causal attribution and causal inference based on the full business context when the task type is a diagnostic analysis task, and to obtain the attribution analysis conclusion. The interaction module 806 is used to convert the query result data or the attribution analysis conclusion into visualized data and open a pre-built interactive analysis portal.

[0053] Based on the same ideas as the methods in the above embodiments, the apparatus provided in this application can implement the methods in the above embodiments.

[0054] above Figure 2 The query analysis device based on a large language model in this embodiment of the invention will be described in detail from the perspective of modular functional entities. The query analysis device based on a large language model in this embodiment of the invention will be described in detail from the perspective of hardware processing.

[0055] Figure 3This is a schematic diagram of the structure of a query analysis device based on a large language model provided in an embodiment of the present invention. The query analysis device 900 based on a large language model can vary considerably due to different configurations or performance. It may include one or more central processing units (CPUs) 910 and memory 920, and one or more storage media 930 (e.g., one or more mass storage devices) for storing application programs 933 or data 932. The memory 920 and storage media 930 can be temporary or persistent storage. The program stored in the storage media 930 may include one or more modules (not shown in the diagram), each module may include a series of instruction operations on the query analysis device 900 based on a large language model. Furthermore, the processor 910 may be configured to communicate with the storage media 930 and execute the series of instruction operations in the storage media 930 on the query analysis device 900 based on the large language model to implement the steps of the query analysis method based on a large language model provided in the above-described method embodiments.

[0056] The query analysis device 900 based on a large language model may also include one or more power supplies 940, one or more wired or wireless network interfaces 950, one or more input / output interfaces 960, and / or one or more operating systems 931, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 3 The illustrated structure of a query analysis device based on a large language model does not constitute a limitation on query analysis devices based on large language models. It may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.

[0057] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of a query analysis method based on a large language model.

[0058] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system, device, or unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0059] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0060] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A query analysis method based on a large language model, characterized in that, include: Acquire multi-source data and construct a knowledge graph based on the multi-source data; When a query request is received, candidate business entities and task types are identified and extracted. The candidate business entities include defined entities, and the task types include descriptive analysis tasks and diagnostic analysis tasks. When the candidate business entity is a defined entity, an entity link is constructed between the candidate business entity and the knowledge graph to extract the full business context from the knowledge graph. When the task type is a descriptive analysis task, a standardized SQL statement is generated based on the full business context to obtain query result data; When the task type is a diagnostic analysis task, causal attribution and causal inference are performed based on the full business context to obtain attribution analysis conclusions. The query results or attribution analysis conclusions are converted into visualized data, and a pre-built interactive analysis portal is opened.

2. The query analysis method according to claim 1, characterized in that, The acquisition of multi-source data and the construction of a knowledge graph based on the multi-source data include: Acquire multi-source data, including structured data, semi-structured data, and unstructured data; Tables, fields, and primary and foreign key relationships are extracted from the structured data; entities and hierarchical attributes are extracted from the semi-structured data; and business entities and related relationships are extracted from the unstructured data through a named entity recognition and relationship extraction model. A three-level matching mechanism combining literal similarity, semantic similarity, and business rules is adopted to align and link entities extracted from different data sources to obtain alignment information; The alignment information is completed based on ontology reasoning rules and graph embedding algorithms, and the knowledge graph is constructed based on the completed alignment information.

3. The query analysis method according to claim 1, characterized in that, The candidate business entities also include undefined entities. After identifying and extracting the candidate business entities and task types upon receiving a query request, the process further includes: When the candidate business entity is an undefined entity, the frequency of occurrence of the undefined entity and the number of independent users triggered within a preset statistical period are counted to determine whether the undefined entity is a high-frequency undefined entity. When a high-frequency undefined entity is identified, defined indicator information of the same type as the undefined entity is obtained. The name of the undefined entity and the defined indicator information of the same type are input into the pre-trained dynamic indicator generation engine to generate inference information, which includes the inference entity definition, inference calculation logic and SQL mapping draft; Based on the inference information, user feedback information is obtained. When the user feedback information confirms the inference, candidate indicators are generated based on the inference information and stored in a pre-built candidate indicator pool.

4. The query analysis method according to claim 1, characterized in that, When the candidate business entity is a defined entity, the process involves constructing entity links between the candidate business entity and the knowledge graph to extract the full business context from the knowledge graph, including: The candidate business entities are semantically similar to all entity nodes in the knowledge graph to generate a set of candidate matching nodes; The candidate matching node set is subjected to business rationality verification, and the candidate matching node set is filtered based on the rationality verification results to obtain a filtered matching node set. Obtain a preset confidence threshold, and based on the confidence threshold and the set of filtered matching nodes, construct entity links between the candidate business entities and the knowledge graph; The full business context is formed by traversing the knowledge graph to obtain the calculation methods of indicators, dimension enumeration values, business constraint rules, related business events and historical analysis conclusions related to the entity links.

5. The query analysis method according to claim 1, characterized in that, The process of generating standardized SQL statements based on the full business context to obtain query result data includes: Based on the full business context, the entity matching result is obtained by matching the indicator calculation logic, dimension mapping relationship and user-specified filtering conditions and rules corresponding to the entity link. Based on the entity matching results, a standardized SQL statement is generated, and the standardized SQL statement is then subjected to syntax validity checks, business consistency checks, and permission compliance checks in sequence. The original query result data is obtained based on a standardized SQL statement that has undergone three validations. The original query result data is then processed sequentially with format standardization, null value filling, and outlier cleaning to generate the query result data.

6. The query analysis method according to claim 1, characterized in that, The causal attribution and causal inference based on the full business context, to obtain attribution analysis conclusions, include: Based on the query request, the target business metrics are confirmed, and structured attribution analysis is performed on the target business metrics to generate structured attribution results. Retrieve internal and external time-series data related to the target business metrics from the full business context, identify business events, external environmental factors, and related metrics associated with the structured attribution results from the internal and external time-series data, and generate time-series related events; Based on the pre-stored business causal logic in the knowledge graph, multiple verifiable causal hypotheses are generated by combining the time-series related events, and a credibility score is calculated for each causal hypothesis to determine whether the credibility score of the causal hypothesis meets the preset credibility threshold. The attribution analysis conclusion is generated by integrating the structured attribution results, the time-series related events, and the causal assumptions that the credibility scores meet the preset credibility threshold.

7. The query analysis method according to claim 1, characterized in that, After constructing the knowledge graph based on the multi-source data, the method further includes: According to the preset scanning cycle, the time series anomaly detection model, key driving factor analysis model, association rule mining model and time series prediction model are called respectively to scan the pre-built underlying original business library and generate multiple candidate insight events. Weights are assigned to each candidate insight event based on four dimensions: business impact, statistical significance, novelty, and feasibility, resulting in a comprehensive score for each candidate insight event. Candidate insight events with a comprehensive score not lower than a preset threshold are selected as high-value insight events. A pre-trained insight narrative engine is then invoked to convert the selected high-value insight events into natural language summaries. An analytics dashboard is built for the high-value insight events. The analytics dashboard and the natural language summary are integrated to form indicator change information, and personalized push operations are performed on the indicator change information.

8. A query analysis device based on a large language model, characterized in that, include: The construction module is used to acquire multi-source data and construct a knowledge graph based on the multi-source data; The response module is used to identify and extract candidate business entities and task types when a query request is received. The candidate business entities include defined entities, and the task types include descriptive analysis tasks and diagnostic analysis tasks. The linking module is used to construct entity links between the candidate business entity and the knowledge graph when the candidate business entity is a defined entity, so as to extract the full business context from the knowledge graph. The acquisition module is used to generate standardized SQL statements based on the full business context to obtain query result data when the task type is a descriptive analysis task; The inference module is used to perform causal attribution and causal inference based on the full business context when the task type is a diagnostic analysis task, and to obtain the attribution analysis conclusion. The interactive module is used to convert the query results data or the attribution analysis conclusions into visualized data and open a pre-built interactive analysis portal.

9. A query analysis device based on a large language model, characterized in that, The query analysis device based on the large language model includes: a memory and at least one processor, wherein the memory stores instructions; At least one of the processors invokes the instructions in the memory to cause the large language model-based query analysis device to perform the steps of the large language model-based query analysis method as described in any one of claims 1-7.

10. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions are executed by the processor, they implement the various steps of the query analysis method based on a large language model as described in any one of claims 1-7.