Intelligent customer service knowledge base automatic updating method based on large language model

By collecting multi-source data, calling large language models to generate semantic patches, and performing online verification, the version anchoring and consistency issues of the intelligent customer service knowledge base were resolved, achieving efficient and reliable knowledge base updates and verification.

CN121501919BActive Publication Date: 2026-07-24昆明双淼科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
昆明双淼科技有限公司
Filing Date
2025-11-18
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

In existing technologies, the determination of changes and version anchoring of intelligent customer service knowledge bases lack unified traceability, and the release and verification lack atomic switching and online closed loop with version marking as the core, resulting in inconsistent knowledge updates and increased risks.

Method used

By collecting multi-source business documents and session data, calling a large language model to extract candidate entries and bind evidence fingerprints, generating semantic patches and writing them to shadow partitions, synchronously updating the inverted index view and vector index view, and combining version tags for online verification and exception rollback, the consistency and reliability of the knowledge base are ensured.

Benefits of technology

It achieves precise updates of the intelligent customer service knowledge base with minimal discrepancies, reduces release risks, improves the reliability and auditability of the knowledge base, and increases the first-time resolution rate through real-time quality closed-loop.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121501919B_ABST
    Figure CN121501919B_ABST
Patent Text Reader

Abstract

The application discloses an intelligent customer service knowledge base automatic updating method based on a large language model, relates to the technical field of knowledge base management, and comprises the following steps: collecting multi-source business documents and conversation data, cleaning and merging the multi-source business documents and conversation data, calling a large language model to extract candidate items and bind evidence fingerprints; performing consistency comparison and change type determination on the candidate items and knowledge base items, generating and solidifying a difference abstract; generating a semantic patch according to the difference abstract, writing into a shadow partition, completing consistency verification, atomically switching into effect, and synchronously updating an inverted index view and a vector index view of the intelligent customer service knowledge base and recording a version mark; performing online verification on conversation data statistical results according to the version mark, rolling back to a state before the version mark when an exception occurs, confirming the semantic patch and continuously acting on the intelligent customer service knowledge base when normal, and reducing release risks and improving knowledge reliability and auditability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of knowledge base management technology, and in particular to an automatic update method for an intelligent customer service knowledge base based on a large language model. Background Technology

[0002] In the field of intelligent customer service, the efficient management and updating of massive amounts of consultation and service knowledge has become a key aspect of enterprise digital operations. With the popularization of big data and cloud services, business announcements, work orders, and web documents are superimposed on multi-channel conversations, resulting in knowledge content exhibiting high-frequency changes, cross-domain integration, and the coexistence of multilingual scenarios. This places higher demands on the organization, expression, and timeliness of knowledge. In recent years, large language models, with their semantic understanding and generation capabilities, have provided new impetus for the unified extraction of business facts, standardized question and answer expression, and improved semantic retrieval and recommendation. Combined with mechanisms such as version governance, traceable evidence, and compliant desensitization, the credibility and controllability of the entire knowledge chain can be strengthened. Against this backdrop, building a sustainably evolving intelligent customer service knowledge base based on the general approach of "multi-source data aggregation, unified semantic representation, incremental release visibility, and online quality measurement," combined with the collaboration of inverted indexes and vector retrieval, is becoming an important direction for improving service experience and operational efficiency.

[0003] Conventional methods still face challenges such as the variability in change determination and version anchoring due to policy differences, making it difficult to form a unified and traceable chain with evidence mapping. The release and verification links often lack atomic switching and online verification closed loops with version marking as the core. Summary of the Invention

[0004] In view of the aforementioned existing problems, the present invention is proposed.

[0005] Therefore, this invention provides an automatic update method for intelligent customer service knowledge base based on a large language model to solve the problems of lack of unified traceability in change judgment and version anchoring, and lack of atomic switching and online closed loop with version tagging as the core in release and verification.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, the present invention provides a method for automatically updating an intelligent customer service knowledge base based on a large language model, comprising, Collect multi-source business documents and session data, clean and merge the multi-source business documents and session data, call the large language model to extract candidate items and bind evidence fingerprints; The candidate entries are compared with the knowledge base entries for consistency and change type determination, and a difference summary is generated and solidified. Semantic patches are generated based on the difference summary, written to the shadow partition to complete consistency verification, and then atomically switched to take effect. The inverted index view and vector index view of the intelligent customer service knowledge base are updated synchronously, and version tags are recorded. The session data statistics are verified online based on the version tag. If an anomaly occurs, the system rolls back to the state before the version tag is set. If the anomaly occurs, the semantic patch is confirmed and continues to be applied to the intelligent customer service knowledge base.

[0007] As a preferred embodiment of the intelligent customer service knowledge base automatic update method based on a large language model described in this invention, the specific steps of collecting multi-source business documents and session data, and cleaning and merging the multi-source business documents and session data are as follows: Work order records, business announcements, and web scraping documents are collected as multi-source business documents, and customer service dialogue logs and call transcripts are collected as conversation data. All multi-source business documents and conversation data are uniformly stored in the database as entries. Perform deterministic replacement on the original text of each entry, generate offset mapping before and after replacement at the same time, merge entries with completely identical content, and record the merge mapping relationship.

[0008] As a preferred embodiment of the intelligent customer service knowledge base automatic update method based on a large language model described in this invention, the specific steps of calling the large language model to extract candidate entries and bind evidence fingerprints are as follows: The original text after cleaning and merging is divided into paragraphs and sentences. Each sentence is labeled with its paragraph number, sentence number, and the start and end positions of the sentence in the original text before cleaning and merging, thus forming a document location. By calling the large language model through fixed prompt templates, and taking paragraphs as the smallest processing unit, fact candidate items and question-answer candidate items are extracted from multi-source business documents and conversation data; Each candidate item is bound to an evidence fingerprint, and all evidence time points for each candidate item are sorted from most recent to oldest. The percentage of evidence is used as the latest coverage and recent coverage.

[0009] As a preferred embodiment of the intelligent customer service knowledge base automatic update method based on a large language model described in this invention, the specific steps of comparing the candidate entries with the knowledge base entries are as follows: Search the knowledge base for knowledge base entries with the same key as the candidate entries, and retain entries whose applicable scope and effective time period overlap with the candidate entries as the entries to be compared; When the candidate entry is a fact candidate entry, the candidate entry value and the entry value to be compared are unified; when the candidate entry is a question-and-answer candidate entry, the candidate entry answer fragment and the entry answer fragment to be compared are unified. When the candidate item is a fact candidate item, the normalized candidate item value and the value of the item to be compared are compared word by word. When the candidate item is a question-answer candidate item, the normalized candidate item answer fragment and the answer fragment of the item to be compared are compared word by word, and the comparison result is output. When the start and end dates of the effective period of a candidate entry are later than the start and end dates of the effective period of the entry to be compared, it is recorded as an update in time. When the latest coverage of a candidate entry is higher than that of the entry to be compared, it is recorded as an update on evidence. When the latest coverage of a candidate entry and the entry to be compared are the same, and the recent coverage of the candidate entry is higher, it is recorded as an update on evidence.

[0010] As a preferred embodiment of the intelligent customer service knowledge base automatic update method based on a large language model described in this invention, the specific steps for determining the change type are as follows: If no entry to be compared is found in the knowledge base entries, the candidate entry is marked as a new entry; When the text equivalence is completely identical, the candidate entries are marked as preserved. When the text equivalence is not completely identical and the candidate entries are recorded as updated in time and updated in evidence, the candidate entries are marked as replacements.

[0011] As a preferred embodiment of the intelligent customer service knowledge base automatic update method based on a large language model described in this invention, the specific steps of generating semantic patches based on difference summaries are as follows: When the change type of the difference summary is "new", construct a new patch; When the change type of the difference summary is replacement, a replacement patch is constructed.

[0012] As a preferred embodiment of the intelligent customer service knowledge base automatic update method based on a large language model described in this invention, the atomic switch takes effect after the consistency check of the shadow partition is completed. The specific steps are as follows: Write semantic patches to the shadow partition, add new patches to create new entries in the shadow partition, replace patches to copy the replaced knowledge base entries in the shadow partition, and register the timestamp of the difference summary generation as the submission time of the shadow partition. Perform uniqueness verification, time conflict verification, evidence backtracking verification, and field integrity verification on each patch in the shadow partition.

[0013] As a preferred embodiment of the automatic update method for the intelligent customer service knowledge base based on a large language model according to the present invention, the specific steps for synchronously updating the inverted index view and vector index view of the intelligent customer service knowledge base are as follows: Write the inverted index view and vector index view for the entries associated with the patch within the shadow partition; The inverted index view segments normalized values ​​and answer fragments into terms, registers and updates inverted index entries in the shadow partition, adds patches to create inverted records for all terms of normalized values ​​and answer fragments, and replaces only adds or deletes terms with the smallest difference, and marks the position of the smallest difference according to the document location. In the shadow partition, the inverted records of the old terms with the smallest difference in the replaced entries are marked as pending invalidation, and inverted records are created for the new terms with the smallest difference. The vector index view uses normalized values ​​and answer fragments as index content. Vector index entries are registered in the shadow partition. New patches are registered directly as new vector index entries. Replacement patches mark the existing vector index entries of the replaced entries as pending invalidation, and at the same time register a new vector index entry with the smallest difference.

[0014] As a preferred embodiment of the intelligent customer service knowledge base automatic update method based on a large language model described in this invention, the specific steps of performing online verification of the session data statistical results according to the version tag are as follows: Based on the version tag, the session data is filtered to find the matching records, and the time tag of the version tag is used as the dividing point to divide it into the pre-switch set and the post-switch set. The number of hit records in the pre-switch set and the post-switch set are counted separately. The smaller set between the pre-switch set and the post-switch set is taken as the comparison size. An equal number of samples are drawn from the pre-switch set in reverse chronological order to form the baseline comparison set, and an equal number of samples are drawn from the post-switch set in chronological order to form the observation comparison set. For each version tag, calculate the percentage of resolved versions on both sides of the baseline comparison set and the observation comparison set. If the percentage of resolved versions in the observation comparison set is higher than that in the baseline comparison set, it is considered normal. If the percentage of resolved versions in the observation comparison set is not higher than that in the baseline comparison set, it is considered abnormal.

[0015] As a preferred embodiment of the automatic update method for the intelligent customer service knowledge base based on a large language model as described in this invention, the steps of rolling back to the state before the version marking when an anomaly occurs, and confirming the semantic patch and continuously applying it to the intelligent customer service knowledge base when normal occurs, are as follows: When the version tag is determined to be abnormal, locate the changed object according to the version tag. If the change type is added, delete the new entry in the main partition. If the change type is replaced, restore the normalized value and answer fragment before the switch. Simultaneously undo the changed index increment, update the external read entry, and make the external read entry point back to the main partition view after the rollback. When the version tag is determined to be normal, the main partition is retained without rollback, and the semantic patch of the version tag is confirmed to continue to be applied to the intelligent customer service knowledge base, and the verification records are synchronously solidified.

[0016] The beneficial effects of this invention are as follows: through semantic patching, shadow partitioning, and atomic switching links, it achieves precise application of minimal differences and synchronous updates of the inverted index view and vector index view, reducing release risks and improving knowledge reliability. Through online verification of session data anchored by version tags and anomaly rollback, it achieves real-time quality closed-loop for effective content, improving the first-time resolution rate and auditability. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart illustrating an automatic update method for an intelligent customer service knowledge base based on a large language model.

[0019] Figure 2 Flowchart for candidate item extraction.

[0020] Figure 3 This is a flowchart for determining the type of change.

[0021] Figure 4 This is a flowchart of the online verification process. Detailed Implementation

[0022] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0023] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0024] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0025] Reference Figures 1-4 This is one embodiment of the present invention, which provides a method for automatically updating an intelligent customer service knowledge base based on a large language model, including the following steps: S1. Collect multi-source business documents and session data, clean and merge the multi-source business documents and session data, call the large language model to extract candidate items and bind evidence fingerprints.

[0026] Work order records, business announcements, and web scraping documents are collected as multi-source business documents. Customer service dialogue logs and call transcription texts are collected as conversation data. Multi-source business documents and conversation data are uniformly stored in the database as entries. Fixed fields for each entry include source identifier, timestamp, original content, and original location. Timestamps use the same calendar unit and time zone, and text uses a unified character encoding.

[0027] The source identifier of the customer service dialogue log is composed of the customer service platform name, enterprise name and session number in the order of customer service platform name, enterprise name and session number. The timestamp is the server generation time of each message. When accessing the system, it is uniformly converted to the same time zone and the original millisecond time is retained. The original content is the original string of the message text. The original position is marked by the session number and message number. If it comes from a log file, the file path and line number range are appended.

[0028] The source identifier of the call transcript is composed of the voice call platform name, the masked caller or called number and the call number in that order. The timestamp is the call start time. Sentence-level transcription also retains the start and end times of each sentence. The original content is the transcript obtained by automatic speech recognition. The original location is marked by the call number and the audio storage address.

[0029] The source identifier of the work order record is composed of the work order platform name and the project space name in that order. The timestamp is the work order creation time. If it is an update event, the update event time is used. The original content is the original text of the work order title, body and comments. The original position is indicated by the work order number and revision number.

[0030] The source identifier for business announcements is the domain name of the website where the announcement was published or the name of the official portal. The timestamp is the publication time marked on the page. If these are missing, the first crawl time is used and marked as the first discovery. The original content is the original text of the announcement body. The original location is the structured location information that includes the page URL and content.

[0031] The source identifier for web scraping documents consists of the site domain name and the scraping task name in sequence. The timestamp is the publication date within the document. When parsing is not possible, the scraping time is used. The original content is the plain text extracted from the document body. The original location is the URL and structural positioning path recorded in HTML, and the URL, page number, and text offset within the page recorded in PDF.

[0032] For each entry, a deterministic replacement is performed on the original text, replacing phone numbers, email addresses, and ID card numbers with general placeholders. At the same time, an offset mapping before and after the replacement is generated. Entries with completely identical content are merged, retaining the earliest and latest timestamps and all source identifiers, and recording the merge mapping relationship.

[0033] The cleaned and merged original text is first divided into paragraphs, and then into sentence boundaries. Each sentence is labeled with its paragraph number, sentence number, and the start and end positions of the sentence in the original text before cleaning, thus forming a document location.

[0034] By calling a large language model using a fixed prompt template, and taking paragraphs as the smallest processing unit, candidate entries are extracted from multi-source business documents and conversation data, including fact candidate entries and question-and-answer candidate entries.

[0035] A fixed prompt template refers to a pre-written and version-managed prompt text that specifies the input format, target fields to be extracted, output JSON or key-value structure, and validation rules.

[0036] Large language models refer to general-purpose models (such as GPT, Claude, Llama, Qwen, GLM, and Mistral) that are trained on large-scale corpora and can understand natural language and generate text. They convert the original text into structured fields of candidate items and generate standardized expressions of question sets and answer fragments for question-answering candidate items.

[0037] Fact candidate entries include key, value, scope of application, effective period, source identifier, document location, and document fingerprint.

[0038] The question and answer candidate items include a set of questions, answer fragments, scope of application, effective period, source identifier, document location, and document fingerprint.

[0039] A key is a standardized name used to identify knowledge base entries, composed of the order of business entities and attributes.

[0040] The scope of application refers to the set of business boundaries to which an entry applies (such as region, channel, version, customer level, and product model).

[0041] The effective period refers to the time window during which the content of an entry is valid, including the start date and the end date. If there is no explicit end date, it will be empty, indicating that it is valid indefinitely.

[0042] Document fingerprinting refers to taking the cleaned original text as the only input, uniformly encoding it as UTF-8, deleting control characters, standardizing line breaks, folding consecutive whitespace into a single space, standardizing full-width and half-width characters and common punctuation, assembling paragraphs or sentences into a standard text in the original order, running a fixed encryption hash algorithm (such as SHA-256) on the standard text, and taking the first few bits of the hash value as the document fingerprint.

[0043] Each candidate entry is bound to an evidence fingerprint, which consists of a source identifier, document location, and document fingerprint.

[0044] For each candidate item, all evidence time points are sorted from most recent to oldest, with the first one recorded as the base date. The percentage of evidence with the same date as the base date is used as the latest coverage, and the percentage of evidence within the last three days is used as the recent coverage.

[0045] All evidence time points refer to the dates obtained by normalizing all evidence fingerprints of a candidate entry at the daily granularity within the same time zone, removing duplicates, and sorting them from most recent to oldest.

[0046] S2. Compare the candidate entries with the knowledge base entries for consistency and determine the type of change, and generate and solidify the difference summary.

[0047] Read the key, scope of application, effective period and source identifier of each candidate entry one by one. Search the knowledge base for knowledge base entries with the same key. Only keep the entries whose scope of application and effective period overlap with the candidate entries as the comparison entries. If there are more than one, keep the comparison entries whose effective period covers the effective period of the candidate entries. If they are still tied, select the comparison entry whose start date is closest to the candidate entry.

[0048] When the candidate entry is a fact candidate entry, the character encoding, capitalization, punctuation, and unit of measurement are uniformly applied to the value of the candidate entry and the value of the entry to be compared. When the candidate entry is a question-and-answer candidate entry, the character encoding, capitalization, punctuation, and unit of measurement are uniformly applied to the answer fragment of the candidate entry and the answer fragment of the entry to be compared.

[0049] The text equivalence is determined. When the candidate item is a fact candidate item, the normalized candidate item value is compared with the value of the item to be compared. When the candidate item is a question-and-answer candidate item, the normalized candidate item answer fragment is compared with the answer fragment of the item to be compared. The text status is output, including completely consistent, completely inconsistent, and partially consistent.

[0050] Complete consistency means that the two groups of terms are exactly the same type and that each term appears the same number of times.

[0051] Complete inconsistency means that there are no common terms between the two sets of terms.

[0052] Partial consistency means that there are both common terms and non-common terms, and at least one side contains terms that do not appear in the other.

[0053] If the start date of the effective period of a candidate entry is later than the start date of the effective period of the entry to be compared, or if the end date of the effective period of a candidate entry is later than the end date of the effective period of the entry to be compared, it is recorded as an update in time. If it is not possible to distinguish within the effective period, the latest coverage and recent coverage of the entry to be compared are calculated based on all evidence time points. If the latest coverage of a candidate entry is higher than that of the entry to be compared, it is recorded as an update in evidence. If the latest coverage of a candidate entry and the entry to be compared are the same and the recent coverage of a candidate entry is higher, it is recorded as an update in evidence.

[0054] The change type is determined in a fixed order. When no entry to be compared is found in the knowledge base, the candidate entry is marked as newly added. When the text equivalence is completely consistent, the candidate entry is marked as kept. When the text equivalence is partially consistent or completely inconsistent and the candidate entry is recorded as updated in time or evidence, the candidate entry is marked as replaced. If no result is found, the candidate entry and the entry to be compared are compared in lexicographical order. The entry with the earlier lexicographical order is marked as replaced, and the other entry is marked as kept.

[0055] Based on the type of change, a difference summary is generated and solidified. The difference summary includes the key, scope of application, effective time period, normalized value or answer fragment of the candidate item, normalized value or answer fragment of the item to be compared, text equivalence, type of change, evidence fingerprint of the candidate item, evidence fingerprint of the item to be compared, latest coverage and recent coverage, lexicographical order of the source identifier, and time stamp when the difference summary was generated.

[0056] S3. Generate semantic patches based on the difference summary, write them to the shadow partition to complete the consistency check, and then atomically switch over to take effect. Simultaneously update the inverted index view and vector index view of the intelligent customer service knowledge base and record the version tag.

[0057] When the change type of the difference summary is "new", a new patch is constructed. The key, scope of application and effective time period are used as the target location to create the target location of the new patch. There is no original value to align with the new. The minimum difference is equal to the complete entry content. The new patch includes the key, scope of application, effective time period, normalized value or answer fragment and document location. The evidence fingerprint, source identifier and document fingerprint of the candidate entry are bound as is in the new patch.

[0058] When the change type of the difference summary is replacement, a replacement patch is constructed. The part that is inconsistent with the candidate entry is located in the entry to be compared. For fact candidate entries, the value is the smallest difference unit, and the original value and the new value are recorded. For question and answer candidate entries, the answer fragment is the smallest difference unit, and the original fragment and the new fragment are recorded. The replacement patch only contains the smallest difference that has been changed, and at the same time records the evidence fingerprint or document fingerprint of the entry to be compared.

[0059] Semantic patches are written to the shadow partition. New patches create new entries in the shadow partition. Replacement patches copy the replaced knowledge base entries in the shadow partition. Only the values ​​or answer fragments involved in the smallest differences are replaced. Evidence fingerprints and source identifiers of candidate entries are written as is. Evidence fingerprints or document fingerprints of the entries to be compared are also written. The timestamp when the difference summary is generated is registered as the submission time of the shadow partition.

[0060] Perform consistency checks on each patch in the shadow partition, including uniqueness checks, time conflict checks, evidence backtracking checks, and field integrity checks.

[0061] Uniqueness verification means that no parallel duplicate patches should appear for the same target location.

[0062] Time conflict verification means that if the end date of the effective period is empty, it is considered to be continuously effective. If the new patch and the shadow partition or the primary partition form an indivisible overlap under the same key and applicable scope, it will be terminated and the semantic patch will be marked as needing to be supplemented.

[0063] Evidence backtracking verification means that the source identifier, document location, and document fingerprint in the evidence fingerprint must fall into the original text content that has been stored in the database.

[0064] Field integrity verification means that new patches must include a key, applicable scope, effective time period, and normalized value or answer fragment, and replacement patches must contain at least one minimum difference.

[0065] Write an index view for the entries associated with the patch within the shadow partition. The index view includes an inverted index view and a vector index view.

[0066] An inverted index view refers to segmenting normalized values ​​or answer fragments into terms, registering or updating the corresponding inverted index entries in the shadow partition, adding patches to create inverted records for all terms of normalized values ​​or answer fragments one by one, and replacing patches only add or delete terms corresponding to the smallest difference, and mark the position of the smallest difference according to the document location. In the shadow partition, the inverted records of the old terms corresponding to the smallest difference in the replaced entries are marked as pending invalidation, and inverted records are created for the new terms corresponding to the smallest difference.

[0067] A vector index view refers to a view that uses normalized values ​​or answer fragments as index content, registers vector index entries in the shadow partition, adds new patches by directly registering new vector index entries, and replaces patches by marking the existing vector index entries of the replaced entries as pending invalidation, while simultaneously registering a new vector index entry corresponding to the minimum difference.

[0068] After the shadow partition completes consistency verification and index pre-writing, the external read entry point will be switched from the primary partition to the corresponding version of the shadow partition. This switch is a one-time operation. Reads after the switch completion point will all fall on the pre-written inverted index view and vector index view of the shadow partition. The original primary partition will be marked as the previous version.

[0069] The external read entry point refers to a stable logical pointer (such as a fixed read alias or view name). All retrieval and question-and-answer read requests point to the external read entry point. It does not store data itself, but only points to the currently active index view.

[0070] The primary partition refers to a set of knowledge base entries and index views that are currently in effect.

[0071] For each semantic patch that actually enters the atomic switch, a version tag is generated. The version tag is formed by sequentially connecting the timestamp, key, scope of application, effective time period and document fingerprint when the difference summary is generated, and the change type is also noted. When the same batch contains multiple semantic patches, a corresponding version tag is generated for each patch, and the same timestamp is recorded as the batch identifier.

[0072] After the atomic switch is completed, the inverted index view and vector index view in the shadow partition become the latest external view. The old terms and old vector entries of the replaced entries are marked as invalid and cleaned up in the background. Since the pre-writing was completed before the switch, external search and question answering can hit the new content at the same time when the switch is completed.

[0073] S4. Verify the session data statistics results online based on the version tag. If there is an anomaly, roll back to the state before the version tag. If there is a normal state, confirm the semantic patch and continue to apply it to the intelligent customer service knowledge base.

[0074] Based on the key, scope of application, effective time period, and document fingerprint in the version tag, the matching records are filtered in the session data and divided into a pre-switch set and a post-switch set, using the time mark of the version tag as the dividing point.

[0075] A hit record refers to a single session round that, for the same version tag, simultaneously meets the time condition, key condition, range and time window condition, and traceability condition in the session data, and is uniquely located by the session number and message number.

[0076] The time condition refers to the current round occurring after the time marker of the version marker.

[0077] The key condition refers to the search or question-and-answer return content obtained in the current round, and the associated key is consistent with the key in the version tag.

[0078] The scope and time window conditions refer to the overlap between the applicable scope of the returned knowledge base entries and the applicable scope of the version tag, and the overlap between the effective time period and the effective time period of the version tag.

[0079] The traceability condition means that the content returned in the current round can be located through the inverted index view or vector index view pointed to by the external reading entry, and a traceable correspondence can be established with the evidence fingerprint or document fingerprint of the knowledge base entry.

[0080] Generate a label for each hit record. If the same key is hit only once after switching within the same session, it is labeled as resolved. If it is hit twice or more, it is labeled as unresolved. If the returned content contains at least one evidence fingerprint that can be traced back to the original text content that has been stored in the database, it is labeled as cited evidence. Otherwise, it is uncited evidence. The labeling results are written into the verification sample set with the version tag as the key.

[0081] The number of hit records in the pre-switch set and the post-switch set are counted separately. The smaller set between the pre-switch set and the post-switch set is used as the comparison size. An equal number of samples are drawn from the pre-switch set in reverse chronological order to form the baseline comparison set. An equal number of samples are drawn from the post-switch set in chronological order to form the observation comparison set. If there are no samples on either side, the proportion of resolved records on the current side is treated as zero.

[0082] For each version tag, calculate the resolved percentage on both sides of the baseline comparison set and the observation comparison set, that is, the proportion of the number of resolved sessions to the total number of samples on the current side. If the resolved percentage of the observation comparison set is higher than the resolved percentage of the baseline comparison set, the version tag is judged as normal. If the resolved percentage of the observation comparison set is not higher than the resolved percentage of the baseline comparison set, the version tag is judged as abnormal.

[0083] When a version tag is determined to be abnormal, a rollback is performed sequentially. The changed object is located based on the key, scope of application, effective time period, and document fingerprint in the version tag. If the change type is addition, the corresponding new entry is deleted in the main partition. If the change type is replacement, the normalized value or answer fragment before the switch is restored by the document fingerprint associated with the version tag. The index increment corresponding to the change is undone synchronously. In the inverted index view, the new term is marked as invalid and the old term is restored to validity. In the vector index view, the new vector entry is marked as invalid and the old vector entry is restored to validity. The external read entry is updated so that the external read entry points back to the main partition view after the rollback.

[0084] When the version tag is determined to be normal, the main partition is retained without rollback, and the semantic patch corresponding to the version tag is confirmed to continue to be applied to the intelligent customer service knowledge base. The verification records are synchronously solidified, recording the version tag, the session number set of samples on both sides of the pre-switch set and the post-switch set, the count of resolved and unresolved cases, the proportion of resolved cases on both sides of the pre-switch set and the post-switch set, and the list of sampled samples that can be traced back by evidence fingerprint.

[0085] In summary, this invention achieves precise application of minimal differences and synchronous updates to the inverted index view and vector index view through semantic patching, shadow partitioning, and atomic switching links. This reduces release risks and improves knowledge reliability. Furthermore, by using online verification of session data anchored by version tags and anomaly rollback, it achieves a real-time quality closed loop for the effective content, thereby improving the first-time resolution rate and auditability.

[0086] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for automatically updating an intelligent customer service knowledge base based on a large language model, characterized in that: include, Collect multi-source business documents and session data, store the multi-source business documents and session data into entries in a unified database, clean and merge the multi-source business documents and session data, call a large language model to extract candidate entries from the multi-source business documents and session data, and bind evidence fingerprints to each candidate entry; The candidate entries are compared with the knowledge base entries for consistency and change type determination, and a difference summary is generated and solidified. Semantic patches are generated based on the difference summary, and written to the shadow partition. New patches create new entries in the shadow partition, and replacement patches copy the replaced knowledge base entries in the shadow partition. The timestamp of the difference summary generation is registered as the submission time of the shadow partition. Perform uniqueness verification, time conflict verification, evidence backtracking verification, and field integrity verification on each patch in the shadow partition; Write the inverted index view and vector index view for the entries associated with the patch within the shadow partition; The inverted index view segments the normalized values ​​and answer fragments of candidate entries into terms. It registers and updates inverted index entries in the shadow partition. The new patch creates an inverted record for each term of the normalized values ​​and answer fragments. The replacement patch only adds or deletes terms with the smallest difference and marks the position of the smallest difference according to the document location. In the shadow partition, the inverted record of the old term with the smallest difference in the replaced entry is marked as pending invalidation, and an inverted record is created for the new term with the smallest difference. The vector index view uses the normalized values ​​of candidate entries and answer fragments as index content. Vector index entries are registered in the shadow partition. New patches are directly registered as new vector index entries. Replacement patches mark the existing vector index entries of the replaced entries as pending invalidation, and at the same time register a new vector index entry with the smallest difference, and record the version mark. The session data statistics are verified online based on the version tag. If an anomaly occurs, the system rolls back to the state before the version tag is set. If the anomaly occurs, the semantic patch is confirmed and continues to be applied to the intelligent customer service knowledge base.

2. The automatic update method for intelligent customer service knowledge base based on a large language model as described in claim 1, characterized in that: The process of collecting multi-source business documents and session data, and then cleaning and merging this data, involves the following steps: Work order records, business announcements, and web scraping documents are collected as multi-source business documents, and customer service dialogue logs and call transcripts are collected as conversation data. All multi-source business documents and conversation data are uniformly stored in the database as entries. Perform deterministic replacement on the original text of each entry, generate offset mapping before and after replacement at the same time, merge entries with completely identical content, and record the merge mapping relationship.

3. The automatic update method for intelligent customer service knowledge base based on a large language model as described in claim 2, characterized in that: The specific steps for extracting candidate entries and binding evidence fingerprints using a large language model are as follows: The original text after cleaning and merging is divided into paragraphs and sentences. Each sentence is labeled with its paragraph number, sentence number, and the start and end positions of the sentence in the original text before cleaning and merging, thus forming a document location. By calling the large language model through fixed prompt templates, and taking paragraphs as the smallest processing unit, fact candidate items and question-answer candidate items are extracted from multi-source business documents and conversation data; Fact candidate entries include key, value, scope of application, effective period, source identifier, document location, and document fingerprint; The question-and-answer candidate items include a set of questions, answer fragments, scope of application, effective period, source identifier, document location, and document fingerprint; Each candidate entry is bound to an evidence fingerprint, and all evidence time points for each candidate entry are sorted from most recent to oldest, with the first one recorded as the base date. The percentage of evidence with the same date as the base date is used as the latest coverage, and the percentage of evidence within the last three days is used as the recent coverage.

4. The automatic update method for intelligent customer service knowledge base based on a large language model as described in claim 3, characterized in that: The specific steps for comparing the candidate entries with the knowledge base entries are as follows: Search the knowledge base for knowledge base entries with the same key as the candidate entries, and retain entries whose applicable scope and effective time period overlap with the candidate entries as the entries to be compared; When the candidate entry is a fact candidate entry, the candidate entry value and the entry value to be compared are unified; when the candidate entry is a question-and-answer candidate entry, the candidate entry answer fragment and the entry answer fragment to be compared are unified. When the candidate item is a fact candidate item, the normalized candidate item value and the value of the item to be compared are compared word by word. When the candidate item is a question-answer candidate item, the normalized candidate item answer fragment and the answer fragment of the item to be compared are compared word by word, and the comparison result is output. When the start and end dates of the effective period of a candidate entry are later than the start and end dates of the effective period of the entry to be compared, it is recorded as an update in time. When the latest coverage of a candidate entry is higher than that of the entry to be compared, it is recorded as an update on evidence. When the latest coverage of a candidate entry and the entry to be compared are the same, and the recent coverage of the candidate entry is higher, it is recorded as an update on evidence.

5. The automatic update method for intelligent customer service knowledge base based on a large language model as described in claim 4, characterized in that: The specific steps for determining the type of change are as follows: If no entry to be compared is found in the knowledge base entries, the candidate entry is marked as a new entry; When the text equivalence is completely identical, the candidate entries are marked as preserved. When the text equivalence is not completely consistent and the candidate entries are recorded as updates in time and evidence, the candidate entries are marked as replacements. Textual equivalence is determined based on the term comparison results.

6. The automatic update method for intelligent customer service knowledge base based on a large language model as described in claim 5, characterized in that: The specific steps for generating semantic patches based on the difference summary are as follows: When the change type of the difference summary is "new", construct a new patch; When the change type of the difference summary is replacement, a replacement patch is constructed.

7. The automatic update method for intelligent customer service knowledge base based on a large language model as described in claim 6, characterized in that: The online verification of session data statistics results based on version tags involves the following steps: Based on the version tag, the session data is filtered to find the matching records, and the time tag of the version tag is used as the dividing point to divide it into the pre-switch set and the post-switch set. The number of hit records in the pre-switch set and the post-switch set are counted separately. The smaller set between the pre-switch set and the post-switch set is taken as the comparison size. An equal number of samples are drawn from the pre-switch set in reverse chronological order to form the baseline comparison set, and an equal number of samples are drawn from the post-switch set in chronological order to form the observation comparison set. For each version tag, calculate the percentage of resolved versions on both sides of the baseline comparison set and the observation comparison set. If the percentage of resolved versions in the observation comparison set is higher than that in the baseline comparison set, it is considered normal. If the percentage of resolved versions in the observation comparison set is not higher than that in the baseline comparison set, it is considered abnormal. The resolved percentage is the proportion of resolved sessions to the total number of samples on the current side.

8. The automatic update method for intelligent customer service knowledge base based on a large language model as described in claim 7, characterized in that: The steps are as follows: When an anomaly occurs, the system rolls back to the state before the version marker; when normal, the semantic patch is confirmed and continues to be applied to the intelligent customer service knowledge base. When the version tag is determined to be abnormal, locate the changed object according to the version tag. If the change type is added, delete the new entry in the main partition. If the change type is replaced, restore the normalized value and answer fragment before the switch. Simultaneously undo the changed index increment, update the external read entry, and make the external read entry point back to the main partition view after the rollback. When the version tag is determined to be normal, the main partition is retained without rollback, and the semantic patch of the version tag is confirmed to continue to be applied to the intelligent customer service knowledge base, and the verification records are synchronously solidified.