The invention discloses a mixed enhanced Text-to-
SQL (Structured
Query Language) method based on LLM (Logistics
Language Model), relates to the technical field of large language models, and particularly relates to the mixed enhanced Text-to-
SQL method and device based on LLM, a dictionary-mapping mechanism adopted by the method can effectively solve the
ambiguity problem of LLM to terminologies, and can reduce fuzziness of
semantic matching; a three-level dynamic matching
scoring algorithm can accurately distinguish a complete matching scene from a partial matching scene, and a dynamic reward mechanism improves the recognition rate of long-
tail words; according to the method,
verification is carried out through a keyword channel and a semantic channel, and the setting of dual-channel
verification not only can improve the entity recognition speed by 50% +, but also can effectively avoid logic errors caused by purely depending on LLM (Logical
Language Model); according to the method, included short substrings are removed through coverage analysis, dynamic redundancy control is achieved, repeated
substring processing is avoided, 30% + invalid calculation can be reduced, and
resource consumption is effectively reduced.