LLM text processing method

By performing word segmentation and vocabulary analysis on the input problem information, defining the inquiry vocabulary, and using initial and fine inspection methods to screen answer information, the problem of paragraph delivery affecting accuracy in LLM search is solved, and the accuracy and efficiency of the search is improved.

CN119884355AActive Publication Date: 2025-04-25SHANGHAI JILIXUN INFORMATION TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510370860.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-27
Publication Date
2025-04-25
Estimated Expiration
2045-03-27

AI Technical Summary

Technical Problem

During the process of comparing the problem text and knowledge base search, the existing LLM text processing methods will send the entire relevant paragraph to the LLM, affecting the accuracy of the search.

Method used

By obtaining input question information, performing word segmentation and vocabulary analysis, defining inquiry vocabulary, and filtering out high priority answer information through initial and fine inspection methods, reducing the search range and improving search efficiency.

Benefits of technology

The final answer text that meets the input question information is further screened through the initial and precise inspection methods, improving the accuracy of LLM retrieval and reducing the impact of irrelevant texts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119884355A_ABST
    Figure CN119884355A_ABST
Patent Text Reader

Abstract

The invention relates to an LLM text processing method, and relates to the technical field of text processing, and the method comprises the following steps: obtaining input question information; inputting the input question information into a word segmentation database to output question vocabularies; inputting the question vocabularies into a preset vocabulary database to output synonym sets, mutually exclusive vocabularies and thumbnail vocabularies, and defining the question vocabularies, the synonym sets, the mutually exclusive vocabularies and the thumbnail vocabularies as inquiry vocabularies; outputting final question information according to the inquiry vocabulary; according to the final question information, searching reference answer information and a corresponding path through an initial check method; inputting the reference answer information and the path into a priority database to match a priority; determining initial check answer information from the matched priorities; according to the initial inspection answer information, fine inspection answer information is found out through a fine inspection method; and uploading and displaying the fine inspection answer information as a final answer text. The method has the effect of improving the accuracy of LLM retrieval.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of text processing, and in particular to an LLM text processing method. Background Art

[0002] LLM refers to a large language model. LLM technology is widely used in automatic reply, text classification, sentiment analysis, machine translation, intelligent question and answer, information extraction and summary generation.

[0003] LLM includes retrieval enhancement generation technology. The enhancement generation technology generally collects information on the Internet and stores it to form a knowledge base. The question text input into LLM is then searched and compared with the knowledge base to obtain alternative texts. The alternative texts are sorted based on the comparison between the question text and the alternative texts, so that the fragments most relevant to the question text are placed at the beginning of the alternative text. The sorted alternative texts are sent to LLM for answering.

[0004] In the process of searching and comparing the question text with the knowledge base, the knowledge base will transmit the entire paragraph related to the question text, thus affecting the accuracy of LLM search. Summary of the invention

[0005] In order to improve the accuracy of LLM retrieval, the present invention provides an LLM text processing method.

[0006] In a first aspect, the present invention provides an LLM text processing method, which adopts the following technical solution: An LLM text processing method, comprising: Obtain input question information in a preset recognition area; Inputting the input question information into a preset word segmentation database to output question vocabulary; Inputting the question words into a preset word database to output synonyms, mutually exclusive words and abbreviations, and defining the question words, synonyms, mutually exclusive words and abbreviations as inquiry words; Output final question information according to the inquiry vocabulary; According to the final question information, the reference answer information and the corresponding path are found through a preset initial inspection method; Inputting the benchmark answer information and the path into a preset priority database to match the priority; Determine the benchmark answer information with the highest priority from the matched priorities, and define the benchmark answer information with the highest priority as the initial inspection answer information; According to the preliminary examination answer information, the detailed examination answer information is found out through the preset detailed examination method; The detailed examination answer information will be used as the final answer text and uploaded for display.

[0007] By adopting the above technical scheme, the final question information is obtained by analyzing the vocabulary and the vocabulary database in the input question information, and the benchmark answer information and the corresponding path are obtained through the initial inspection method, and then the benchmark answer information and the path are prioritized through the priority database to obtain the initial inspection answer information, and the refined inspection method is used to find the refined inspection answer information, and finally the refined inspection answer information is uploaded and displayed as the final answer text. The final answer text that meets the input question information can be further screened out through the initial inspection method and the refined inspection method to improve the accuracy of LLM retrieval.

[0008] Optional initial inspection methods include: The answer information that contains all the query words in the preset text set is defined as the first level; The answer information corresponding to the first level is used as the reference answer information.

[0009] Optionally, the initial inspection method also includes: The last level in the path is defined as the last path, the words found in the last path by the query words are known words, and the words not found in the last path by the query words are unknown words; The answer information including at least two known words on the last path and at least one unknown word in the preset text set is defined as the first level.

[0010] Optionally, the initial inspection method also includes: The words found in the preset text set are called known words, and the words not found in the preset text set are called unknown words. The answer information including at least one known word in the text in the path and at most two unknown words in the preset text set is defined as the second level; The answer information corresponding to the second level is used as the reference answer information.

[0011] Optionally, the initial inspection method also includes: Count the known words on the last path in the first level to select the answer information corresponding to the most known words and define it as the first level, and define the answer information corresponding to the remaining known words as the third level; The answer information corresponding to the third level is used as the reference answer information.

[0012] Optionally, the initial inspection method also includes: The answer information including two known words on the last path and not including unknown words in the preset text set is defined as the third level.

[0013] By adopting the above technical solution, the answer information related to the input question information is divided into primary, secondary and tertiary levels by inquiring about the existence of words in the text set, thereby reducing the search scope of LLM and improving the efficiency of LLM search. The answer information with the highest priority will be output subsequently, so that the answer related to the input question information can be directly displayed.

[0014] Optionally, the initial inspection method also includes: Obtaining lexical distance values ​​of adjacent query words in a preset text set; Determining whether the vocabulary distance value falls between preset reference position distance values; If the vocabulary distance value does not fall within the preset reference position distance value, determining whether the query vocabulary falls within the preset table feature; If the query words do not fall into the preset table features, they will be eliminated; If the vocabulary distance value falls within the preset reference position distance value or the query vocabulary falls within the preset table feature, the text between the query vocabulary whose vocabulary distance value falls within the reference position distance value in the preset text set is marked; When the query word exceeds 1, the query word is defined as a query word group; If repeated query word groups appear in the text set, the text between adjacent repeated query word groups in the text set is marked.

[0015] By adopting the above technical solution, the lexical distance values ​​of adjacent query words in the text set are understood, and the texts in the text set are screened according to the falling situation of the lexical distance value and the reference position distance value, so that the length of the text segment finally transmitted to the LLM can be dynamically adjusted according to the lexical distance value, which can be large or small, thereby avoiding the defects of key knowledge points being discarded due to fixed-length text or the text being too long to interfere with the accuracy of LLM answers, thereby further screening out texts related to the input question information and improving the accuracy of LLM retrieval.

[0016] Optionally, the initial inspection method also includes: Modify the final question information based on the query vocabulary with the preset missing quantity.

[0017] By adopting the above technical solution, the search is performed according to the number corresponding to different query words, so that the screening can continue within the scope of the semantics corresponding to the input question information, so as to improve the accuracy of LLM search.

[0018] Optional, detailed examination methods include: The text marked in the text set is defined as marked text; The target score is calculated based on the path and the marked text input into the preset score database; Arrange each target score in positive order, and select the smallest target score as the selected score according to the arranged target scores; Calculate the product between the selected score and the preset benchmark coefficient, and define the product value as the benchmark score; The path and marked text corresponding to the target score that is less than the benchmark score are selected from the target score as the refined inspection answer information.

[0019] By adopting the above technical solution, the target score is calculated for the path and marked text using a preset scoring database, and the path and marked text corresponding to the target score that is less than the benchmark score is used as refined answer information. The scores corresponding to the path and marked text are further screened to improve the accuracy of LLM retrieval.

[0020] Optional, calculation method of the scoring database: Score 综合 =(Score 向量 / log 16 [1 / 6(n-1) 3 +(n-1) 2 +5 / 6(n-1)+1])×1 / [(2-index×0.1)×(10e log2(m+1) +1)], Score 综合 Score the target, index is the ranking or score corresponding to the input question information in the preset title database, Score 向量 It is the score obtained after comparing the vectors of the input question information with the preset slice text database, n is the number of text characters of different lengths intercepted from the input question information, and m is the ranking corresponding to the marked text after sorting by the preset rearrangement model.

[0021] In summary, the present application includes at least one of the following beneficial technical effects: 1. The final question information is obtained by analyzing the vocabulary in the input question information and the vocabulary database, and the benchmark answer information and the corresponding path are obtained through the initial inspection method. The benchmark answer information and the path are prioritized by the priority database to obtain the initial inspection answer information, and the refined inspection method is used to find the refined inspection answer information. Finally, the refined inspection answer information is uploaded and displayed as the final answer text. The final answer text that meets the input question information can be further screened out through the initial inspection method and the refined inspection method to improve the accuracy of LLM retrieval; 2. By understanding the lexical distance values ​​of adjacent query words in the text set, and filtering the texts in the text set according to the falling situation of the lexical distance value and the reference position distance value, it is possible to further filter out the texts related to the input question information and improve the accuracy of LLM retrieval; 3. Calculate the target score for the path and marked text using the preset scoring database, and use the path and marked text corresponding to the target score that is less than the benchmark score as the refined answer information. Further screen the scores corresponding to the path and marked text to improve the accuracy of LLM retrieval. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 is a method flow chart of an LLM text processing method according to an embodiment of the present invention; Figure 2 This is the method flow of the initial inspection method of the embodiment of the present invention Figure 1 ; Figure 3 This is the method flow of the initial inspection method of the embodiment of the present invention Figure 2 ; Figure 4 This is the method flow of the initial inspection method of the embodiment of the present invention Figure 3 ; Figure 5 This is the method flow of the initial inspection method of the embodiment of the present invention Figure 4 ; Figure 6 This is the method flow of the initial inspection method of the embodiment of the present invention Figure 5 ; Figure 7 It is a method flow chart of the precision inspection method of an embodiment of the present invention. DETAILED DESCRIPTION

[0023] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0024] An LLM text processing method is provided, which understands the vocabulary in the input question information, and screens the text materials retrieved by LLM through a preliminary inspection method and a fine inspection method to obtain the final answer information and upload and output it, so that while uploading the materials related to the input question information in LLM, the text length of the uploaded answer information and irrelevant text materials can be reduced, thereby improving the accuracy of LLM retrieval.

[0025] Reference Figure 1 The present application embodiment discloses an LLM text processing method, comprising the following steps: Step S100: obtaining input question information in a preset recognition area.

[0026] Input question information refers to the text that the user inputs to LLM to ask questions, and the text in the input module preset by the system is called as the question text. The input module refers to the module in LLM used to receive the text input by the user, that is, the text input box. The input module is set in advance by those skilled in the art and will not be described in detail here.

[0027] Step S101: inputting question information into a preset word segmentation database to output question words.

[0028] The word segmentation database refers to a database that stores various words and is used to split text to form various words. The word segmentation database is set in advance by those skilled in the art and will not be described in detail here.

[0029] The question vocabulary refers to the vocabulary in the input question information, and the vocabulary obtained by inputting the input question information into the word segmentation database for splitting and segmenting is used as the question vocabulary.

[0030] Step S102: Inputting question words into a preset word database to output synonyms, mutually exclusive words and abbreviations, and defining the question words, synonyms, mutually exclusive words and abbreviations as inquiry words.

[0031] The vocabulary database includes a synonym database, a mutually exclusive vocabulary database, and an abbreviation database. The synonym database stores different words corresponding to the same semantics. The mutually exclusive vocabulary database stores a vocabulary set that cannot simultaneously satisfy the text semantics in the vocabulary set that appears in the text. The abbreviation database stores abbreviations represented by professional vocabulary in the corresponding field of the text. The vocabulary database is set in advance by those skilled in the art and will not be described in detail here. Synonymous vocabulary refers to vocabulary corresponding to the same semantics as the problem vocabulary, mutually exclusive vocabulary refers to vocabulary that appears in the text with the problem vocabulary and cannot satisfy the text semantics, and abbreviation vocabulary refers to vocabulary that is abbreviated to the professional vocabulary in the text field corresponding to the problem vocabulary. The problem vocabulary is input into the vocabulary database for query and comparison to output synonyms, mutually exclusive vocabulary, and abbreviation vocabulary.

[0032] The query words refer to the words that the system asks the LLM. The query words are defined by question words, synonym words, mutually exclusive words, and abbreviation words.

[0033] Step S103: Outputting final question information according to the query vocabulary.

[0034] The final question information refers to the text information corresponding to the final inquiry to the LLM. The input text information is reintegrated through the inquiry vocabulary to obtain the final question information.

[0035] Step S104: Find out the benchmark answer information and the corresponding path through a preset initial inspection method according to the final question information.

[0036] The initial inspection method is a method for initially searching and querying the final question information. The specific operation steps refer to steps S200 to S800. The benchmark answer information refers to the benchmark text information related to the final question information. The path refers to the query path corresponding to the data stored related to the final question information. The path can be the address description of the text file in the computer and the location of the resource on the network server. The final question information is queried through the initial inspection method to obtain the benchmark answer information and the corresponding path.

[0037] Step S105: input the reference answer information and the path into a preset priority database to match the priority.

[0038] The priority database refers to a database used to classify the benchmark answer information and paths. The priority database is set in advance by a person skilled in the art and will not be described in detail here. In this embodiment, the priority database classifies the benchmark answer information and paths into three levels, and the benchmark answer information and paths are graded by the initial inspection method, and each level is input into the priority database to obtain a priority.

[0039] Step S106: Determine the benchmark answer information with the highest priority from the matched priorities, and define the benchmark answer information with the highest priority as the initial inspection answer information.

[0040] The initial inspection answer information refers to the benchmark answer information obtained after screening by the preliminary method and the priority database. The benchmark answer information with the highest priority is determined from the matched priorities, and the benchmark answer information with the highest priority is defined as the initial inspection answer information.

[0041] Step S107: searching for refined inspection answer information through a preset refined inspection method according to the preliminary inspection answer information.

[0042] The refined inspection method refers to a method for finely searching the preliminary inspection answer information. For specific operation steps, refer to step S900 to step S904. The refined inspection answer information refers to the answer information obtained after the preliminary inspection answer information is screened by the refined inspection method. The preliminary inspection answer information obtained by screening the preliminary inspection answer information by the refined inspection method is used as the refined inspection answer information.

[0043] Step S108: The detailed inspection answer information is used as the final answer text and uploaded for display.

[0044] By taking the refined answer information as the final answer text and uploading it to LLM for display to the user, the final answer text that meets the input question information is screened out through the initial inspection method and the refined inspection method to improve the accuracy of LLM retrieval.

[0045] Reference Figure 2 The initial inspection method includes the following steps: Step S200: defining the answer information containing all the query words in the preset text set as the first level.

[0046] The text set refers to the collection of text materials stored in each path. The text set is set by technicians in this field in advance and will not be described in detail here. The first level refers to the answer information in the text set that is marked as the first in terms of relevance to the input question information. The answer information includes the path and the text materials corresponding to the query of the path.

[0047] When the preset text set contains the answer information of all query words, it means that one query word can be found on the complete path and all other query words can be found in the text, or all query words can be found in the text, so the text set is defined as the first level.

[0048] Step S201: taking the answer information corresponding to the first level as the reference answer information.

[0049] By using the answer information in the first-level text set as the reference answer information to filter out texts related to the input question information, the accuracy of LLM retrieval is improved.

[0050] Reference Figure 3 The initial inspection method also includes the following steps: Step S300: define the last level in the path as the last path, define the words found in the last path as known words, and define the words not found in the last path as unknown words.

[0051] The last path refers to the shortest path that can be used to search for text data in the text set. The last level in the path is defined as the last path. Known words refer to query words that can be searched in the last path of the text set, and unknown words refer to query words that cannot be searched in the last path of the text set. The query words found in the last path of the text set are regarded as known words, and the query words that cannot be searched in the last path of the text set are regarded as unknown words.

[0052] Step S301: defining the answer information including at least two known words on the last path and at least one unknown word in the preset text set as the first level.

[0053] When the last path contains at least two known words and the preset text set contains at least one unknown word, it means that two or more query words are found in the last level of the path and at least one other query word is found in the text, so the text set is defined as the first level.

[0054] Reference Figure 4 The initial inspection method also includes the following steps: Step S400: The words found in the preset text set by the query words are regarded as known words in the text, and the words not found in the preset text set by the query words are regarded as unknown words in the text.

[0055] Known text words refer to query words that can be found in the text set, and unknown text words refer to query words that cannot be found in the text set. The query words found in the text set are regarded as known text words, and the query words that cannot be found in the text set are regarded as unknown text words.

[0056] Step S401: defining the answer information including at least one known word in the path and at most two unknown words in the preset text set as the second level.

[0057] When the path contains at least one known word in the text and the preset text set contains at most two unknown words, it means that the query words found in the text are missing one or two words compared with all the query words, or one query word is found on the complete path, and the query words found in the text are missing one or two words compared with the remaining query words, so the text set is defined as the second level.

[0058] Step S402: The answer information corresponding to the second level is used as the reference answer information.

[0059] By using the answer information in the second-level text set as the reference answer information, the text related to the input question information is continuously screened, thereby improving the accuracy of the LLM search.

[0060] Reference Figure 5 The initial inspection method also includes the following steps: Step S500: Count the known words on the last path in the first level to filter out the answer information corresponding to the most known words and define it as the first level, and define the answer information corresponding to the remaining known words as the third level.

[0061] When multiple known words appear in the last path of the first level, the number of known words on the last path of the first level is sorted, and the answer information corresponding to the largest number of known words in the text set is screened out and defined as the first level, and the remaining answer information is defined as the third level.

[0062] Step S501: taking the answer information corresponding to the third level as the reference answer information.

[0063] By using the answer information in the third-level text set as the reference answer information, the text related to the input question information is continuously screened, thereby improving the accuracy of the LLM search.

[0064] The initial inspection method also includes the following steps: Step S600: defining the answer information including two known words on the last path and not including unknown words in the preset text set as the third level.

[0065] When the answer information contains two known words on the last path and does not contain unknown words in the preset text set, it is defined as the third level, which means that only two keywords are found in the last level of the path, but no other keywords are found in the text, so the answer information in the text set is defined as the third level.

[0066] Reference Figure 6 The initial inspection method also includes the following steps: Step S700: Obtaining vocabulary distance values ​​of adjacent query words in a preset text set.

[0067] The lexical distance value refers to the distance between each adjacent query word in the text set. The number of characters between adjacent query words is retrieved from the text set, and the value corresponding to the number of characters is used as the lexical distance value. In this embodiment, the lexical distance value is only valid in the text, and the words on the path do not participate in the distance value. If there are adjacent query words in the table, the lexical distance value can be specially processed, so the query words in the table will not be restricted.

[0068] Step S701: Determine whether the vocabulary distance value falls within the preset reference position distance value.

[0069] The reference position distance value refers to the maximum distance value allowed between each adjacent query word and the text corresponding to the text related to the input question information. The reference position distance value is set in advance by a person skilled in the art and will not be described in detail here. In this embodiment, the reference position distance value is 2000. By determining whether the word distance value falls between the reference position distance values, it is determined whether the text where the word distance value is located is related to the input question information.

[0070] Step S7011: If the vocabulary distance value does not fall within the preset reference position distance value, determine whether the query vocabulary falls within the preset table feature.

[0071] Table features refer to features such as the arrangement and shape of the table corresponding to the text. Table features are set in advance by those skilled in the art and will not be described in detail here. When the word distance value does not fall between the reference position distance values, it means that the probability that the text where the word distance value is located is not related to the input question information is high, so it is determined whether the query word falls into the table feature, thereby determining whether the text corresponding to the table is related to the input question information.

[0072] Step S70111: If the query word does not fall into the preset table features, it is eliminated.

[0073] When the query vocabulary does not fall into the table feature, it means that the text corresponding to the table in the text set is not related to the input question information, so the text corresponding to the vocabulary distance value that does not fall into the reference position distance value is eliminated.

[0074] Step S7012: if the vocabulary distance value falls within the preset reference position distance value or the query vocabulary falls within the preset table feature, then mark the text in the preset text set whose vocabulary distance value falls within the query vocabulary of the reference position distance value.

[0075] When the vocabulary distance value falls between the reference position distance values, or the query vocabulary falls into the table feature, it means that the text corresponding to the vocabulary distance value falling between the reference position distance value and the table are related to the input question information, so the text between the query vocabulary whose vocabulary distance value in the text set falls within the reference position distance value is marked.

[0076] Step S702: When the query words exceed 1, define the query words as a query word group.

[0077] The query word group refers to a word group in which multiple query words are combined for search. When the query word exceeds 1, it means that there are multiple query words in the text for search, so the query word is defined as a query word group.

[0078] Step S7021: If repeated query word groups appear in the text set, the text between adjacent repeated query word groups in the text set is marked.

[0079] When there are no repeated query word groups in the text set, it means that there is only one content related to the input question information in the text set, so the text between the query words whose word distance values ​​in the text set fall within the reference position distance value is marked. When there are repeated query word groups in the text set, it means that there are multiple contents related to the input question information in the text set, so the text between adjacent repeated query word groups in the text set is marked.

[0080] The initial inspection method also includes the following steps: Step S800: Modify the final question information according to the query vocabulary with a preset missing quantity.

[0081] The missing number refers to the number of query words in the input question that are reduced for query retrieval. The missing number is set in advance by a person skilled in the art and will not be described in detail here. In this embodiment, the missing number is 1 or 2. Since the query words are searched after the corresponding missing number is reduced, the corresponding path can still be retrieved quite accurately by searching the query words that have reduced the missing number.

[0082] Step S103 is re-executed for query words with reduced missing numbers to obtain new text information as the corrected final question information.

[0083] Reference Figure 7 The precision inspection method includes the following steps: Step S900: define the marked text in the text set as marked text.

[0084] The marked text refers to the text marked in the text set, and the text marked in step S7012 and step S7021 is used as the marked text.

[0085] Step S901: Calculate a target score according to the path and the mark text input into a preset score database.

[0086] The target score refers to the comprehensive score corresponding to the marked text, and the target score is calculated by inputting the path and the marked text into a preset scoring database.

[0087] Calculation method of scoring database: Score 综合 =(Score 向量 / log 16 [1 / 6(n-1) 3 +(n-1) 2 +5 / 6(n-1)+1])×1 / [(2-index×0.1)×(10e log2(m+1) +1)], Score 综合 Score the target, index is the ranking or score corresponding to the input question information in the preset title database, Score 向量 It is the score obtained after comparing the vectors of the input question information with the preset slice text database, n is the number of text characters of different lengths intercepted from the input question information, and m is the ranking corresponding to the marked text after sorting by the preset rearrangement model.

[0088] The title database stores a knowledge base that is created separately for all titles. The title database is a database set by humans and will not be described in detail here. The top 10 titles are obtained by inputting question information into the title database. When the path corresponding to the input question information exists in the top 10 titles, the index is the ranking in the top 10 titles. When the path corresponding to the input question information does not exist in the top 10 titles, the index is 1.

[0089] The sliced ​​text database stores the sliced ​​text set and path, and is a database that is vectorized and saved. The sliced ​​text database is a database set manually and will not be described in detail here.

[0090] The rearrangement model refers to a model used to rank marked text. The rearrangement model is a model set manually and will not be described in detail here.

[0091] Step S902: Arrange the target scores in positive order, and select the smallest target score as the selected score according to the arranged target scores.

[0092] The selected score refers to the target score corresponding to the text related to the input question information, which is arranged in positive order and the smallest target score is selected as the selected score.

[0093] Step S903: Calculate the product of the selected score and the preset reference coefficient, and define the product value as the reference score.

[0094] The reference coefficient refers to a coefficient used to correct the selected score. The reference coefficient is set in advance by a person skilled in the art and will not be described in detail here. In this embodiment, the reference coefficient may be 1.3. The reference score refers to the score corresponding to the text related to the input question information after correction, by calculating the product between the selected score and the preset reference coefficient, and defining the product value as the reference score.

[0095] Step S904: Select the path and marked text corresponding to the target score that is less than the benchmark score from the target score as the refined inspection answer information.

[0096] By selecting the path and marked text corresponding to the target score that is less than the benchmark score from the target score as the refined answer information, the text related to the input question information can be output to improve the accuracy of LLM retrieval.

[0097] Further, the method after determining the query vocabulary includes the following steps: Step S1021: Determine whether the input question information is complete based on the query vocabulary and the preset vocabulary continuous database.

[0098] The completeness of the input question information corresponding to the query vocabulary is matched with the preset vocabulary continuous database, and the completeness is compared with the preset benchmark completeness to determine whether the question text has been input, so as to determine whether the question text needs to be supplemented. The benchmark completeness refers to the maximum completeness that needs to be supplemented for the question text. The benchmark completeness is set in advance by those skilled in the art and will not be described in detail here. The completeness of the question text corresponding to different question vocabularies is stored in the vocabulary continuous database. The vocabulary continuous database is a database set by humans and will not be described in detail here.

[0099] Step S1022: When the input question information is not completed, obtain the question text distance value corresponding to each query word in the input question information.

[0100] The question text distance value refers to the position corresponding to each character in the input question information. When the input question information is not completed, it means that the completeness has not exceeded the benchmark completeness and the question text needs to be supplemented. Therefore, the number of characters between each character and the text at the beginning of the sentence is retrieved from the input question information, and the numerical value corresponding to the number of characters is used as the question text distance value.

[0101] Step S1023: Arrange the query words corresponding to the question text distance values ​​in positive order, and select the query word corresponding to the smallest question text distance value as the priority query word.

[0102] Priority query words refer to query words that are read and written first in the input question information. The query words corresponding to the question text distance values ​​are arranged in positive order, and the query word corresponding to the smallest question text distance value is selected as the priority query word.

[0103] Step S1024: Determine the priority question areas based on the priority query vocabulary and the vocabulary database.

[0104] Priority problem areas refer to technical fields where priority query words are used in texts. Priority problem areas are matched from a vocabulary database through priority query words. The vocabulary database also stores technical fields corresponding to different words used in texts, which will not be elaborated here.

[0105] Step S1025: After determining the priority question domain, the next query word is used as a new priority query word based on the question word distance value, and the priority question domain is updated according to the new priority query word and the word database until the priority query word is the last query word.

[0106] After determining the priority question field, in order to know the general field direction of the input question information, the next query word is used as the new priority query word based on the question text distance value, and a new field is matched from the vocabulary database through the new priority query word, and the new field is combined with the priority question field to form a new priority question field. Repeat the above steps until the priority query word is the last query word.

[0107] Step S1026: Matching domain vocabulary from the vocabulary database according to the updated priority problem domain.

[0108] The domain vocabulary refers to the vocabulary related to the updated priority problem domain, and the domain vocabulary is matched from the vocabulary database through the updated priority problem domain.

[0109] Step S1027: Regroup the input question information according to the domain vocabulary.

[0110] By adding the domain vocabulary to the input question information to form new input question information, the content of the input question information can be supplemented.

[0111] Step S1028: Update the final question information according to the reorganized input question information.

[0112] By re-executing step S101 to step S103 with the reassembled input question information to obtain new final question information, it is less likely that incomplete input question information will affect LLM retrieval of irrelevant texts, thereby improving the accuracy of LLM retrieval.

[0113] Furthermore, the method after determining the query vocabulary further includes the following steps: Step S10221: When the input of the question information is completed and the preset trigger information is output, the pause time of outputting the trigger information is obtained.

[0114] Trigger information refers to the information that needs to be output by asking questions to the LLM. The trigger information is set in advance by a person skilled in the art and will not be described in detail here. Pause time refers to the time between completing the input of question information and outputting trigger information. When the input question information is completed and the preset trigger information is output, it means that the LLM needs to be asked a question. The system marks the time point when the input question information is completed, and marks the time point when the system outputs the trigger information. The time parameter value between the two marked time points is calculated as the pause time.

[0115] Step S10222: Determine whether the input question information is updated during the pause time.

[0116] By determining whether the input question information is updated during the pause time, it is determined whether the user actively adds text or accidentally touches to input other text.

[0117] Step S10223: If not updated, continue to determine the final question information.

[0118] When the input question information is not updated during the pause time, it means that the user has not actively added text or accidentally touched to input other text, so step S103 is continued.

[0119] Step S10224: If updated, determine to add text based on the input question information before and after the update, and update the pause time based on the added text and the trigger information.

[0120] Added text refers to the text added to the input question information during the pause time. When the input question information is updated during the pause time, it means that the user actively adds text or accidentally touches to enter other text. Therefore, the input question information before and after the update is overlapped and compared, and the text that does not overlap is regarded as added text.

[0121] Step S10225: Match additional words from the vocabulary database based on the added text and the query words.

[0122] Adding vocabulary refers to adding vocabulary to the question information after adding text, by combining the added text with the query vocabulary, and matching the combined text from the vocabulary database to add vocabulary.

[0123] Step S10226: Determine the query vocabulary domain based on the query vocabulary, and determine the added vocabulary domain based on the added vocabulary.

[0124] Inquiring vocabulary fields refers to the technical fields in which inquiring vocabulary is used in texts, and adding vocabulary fields refers to the technical fields in which adding vocabulary is used in texts. Inquiring vocabulary fields are matched from the vocabulary database by inquiring vocabulary, and adding vocabulary fields are matched from the vocabulary database by adding vocabulary.

[0125] Step S10227: When the query vocabulary field is consistent with the added vocabulary field, the final question information is updated according to the updated input question information.

[0126] When the query vocabulary field is consistent with the added vocabulary field, it means that the added text will not affect the LLM's retrieval of the input question information, so steps S101 to S103 are re-executed using the updated input question information.

[0127] Step S10228: When the query vocabulary field and the added vocabulary field are inconsistent, continue to determine the final question information.

[0128] When the query vocabulary field is inconsistent with the added vocabulary field, it means that the added text will affect the LLM's retrieval of the input question information, so the steps S101 to S103 are continued to be executed through the input question information before the update.

[0129] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. A LLM text processing method, characterized in that: include: Obtain input question information in a preset recognition area; Inputting the input question information into a preset word segmentation database to output question vocabulary; Inputting the question words into a preset word database to output synonyms, mutually exclusive words and abbreviations, and defining the question words, synonyms, mutually exclusive words and abbreviations as inquiry words; Output final question information according to the inquiry vocabulary; According to the final question information, the reference answer information and the corresponding path are found through a preset initial inspection method; Inputting the benchmark answer information and the path into a preset priority database to match the priority; Determine the benchmark answer information with the highest priority from the matched priorities, and define the benchmark answer information with the highest priority as the initial inspection answer information; According to the preliminary examination answer information, the detailed examination answer information is found out through the preset detailed examination method; The detailed examination answer information will be used as the final answer text and uploaded for display.

2. The LLM text processing method according to claim 1, characterized in that: Initial inspection methods include: The answer information that contains all the query words in the preset text set is defined as the first level; The answer information corresponding to the first level is used as the reference answer information.

3. The LLM text processing method according to claim 2, characterized in that: Initial inspection methods also include: The last level in the path is defined as the last path, the words found in the last path by the query words are known words, and the words not found in the last path by the query words are unknown words; The answer information including at least two known words on the last path and at least one unknown word in the preset text set is defined as the first level.

4. The LLM text processing method according to claim 1, characterized in that: Initial inspection methods also include: The words found in the preset text set are called known words, and the words not found in the preset text set are called unknown words. The answer information including at least one known word in the text in the path and at most two unknown words in the preset text set is defined as the second level; The answer information corresponding to the second level is used as the reference answer information.

5. The LLM text processing method according to claim 3, characterized in that: Initial inspection methods also include: Count the known words on the last path in the first level to select the answer information corresponding to the most known words and define it as the first level, and define the answer information corresponding to the remaining known words as the third level; The answer information corresponding to the third level is used as the reference answer information.

6. The LLM text processing method according to claim 5, characterized in that: Initial inspection methods also include: The answer information including two known words on the last path and not including unknown words in the preset text set is defined as the third level.

7. The LLM text processing method according to claim 1, characterized in that: Initial inspection methods also include: Obtaining lexical distance values ​​of adjacent query words in a preset text set; Determining whether the vocabulary distance value falls between preset reference position distance values; If the vocabulary distance value does not fall within the preset reference position distance value, determining whether the query vocabulary falls within the preset table feature; If the query words do not fall into the preset table features, they will be eliminated; If the vocabulary distance value falls within the preset reference position distance value or the query vocabulary falls within the preset table feature, the text between the query vocabulary whose vocabulary distance value falls within the reference position distance value in the preset text set is marked; When the query word exceeds 1, the query word is defined as a query word group; If repeated query word groups appear in the text set, the text between adjacent repeated query word groups in the text set is marked.

8. The LLM text processing method according to claim 1, characterized in that: Initial inspection methods also include: Modify the final question information based on the query vocabulary with the preset missing quantity.

9. The LLM text processing method according to claim 7, characterized in that: Precision testing methods include: The text marked in the text set is defined as marked text; The target score is calculated based on the path and the marked text input into the preset score database; Arrange each target score in positive order, and select the smallest target score as the selected score according to the arranged target scores; Calculate the product between the selected score and the preset benchmark coefficient, and define the product value as the benchmark score; The path and marked text corresponding to the target score that is less than the benchmark score are selected from the target score as the refined inspection answer information.

10. The LLM text processing method according to claim 9, characterized in that: Calculation method of scoring database: Score 综合 =(Score 向量 / log 16 [1 / 6(n-1) 3 +(n-1) 2 +5 / 6(n-1)+1])×1 / [(2-index×0.1)×(10e log2(m+1) +1)], Score 综合 Score the target, index is the ranking or score corresponding to the input question information in the preset title database, Score 向量 It is the score obtained after comparing the vectors of the input question information with the preset slice text database, n is the number of text characters of different lengths intercepted from the input question information, and m is the ranking corresponding to the marked text after sorting by the preset rearrangement model.

Citation Information

Patent Citations

  • Document knowledge question-answering method and system based on LLM

    CN118069811A

  • Intelligent customer service question and answer method based on large language model technology

    CN118364084A

  • Knowledge base construction method and device for child neurodevelopment problems and medium

    CN119025627A

  • Visual data processing method and device based on large language model, equipment and medium

    CN119248921A

  • Session information processing method, apparatus and system, and statement generation method and apparatus

    WO2025000814A1