A method for implementing AI search in the gaming field

By training a small language model and combining it with optimization of golden documents and interfering documents, the high cost and response latency issues of AI search in the gaming field are solved, achieving low-cost, less illusionary, and fast-response AI search results.

CN122086952APending Publication Date: 2026-05-264399 NETWORK
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
4399 NETWORK
Filing Date
2026-02-05
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Traditional AI search methods in the gaming field suffer from high costs, numerous illusions, and high response latency, especially due to the need for high-configuration graphics cards and complex system prompts when using large language models such as DeepSeek.

Method used

By training a small language model, using the optimized language model for risk control and intent recognition, and combining training with golden documents and distracting documents, short system prompts are designed. Reinforcement learning is used to optimize the model, achieving low cost, fewer illusions, and rapid response.

Benefits of technology

It achieves low-cost AI search, reduces illusions, improves response speed, and can achieve the same effect as a large model with an 800G graphics card using a 40G graphics card. Short system prompts speed up response.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122086952A_ABST
    Figure CN122086952A_ABST
Patent Text Reader

Abstract

This invention discloses a method for implementing AI search in the gaming field, comprising: training a language model, supervising fine-tuning, and optimizing rewards to obtain an optimized language model; an online service module, based on the optimized language model, performing risk control and intent recognition on user-input questions; and, based on the intent recognition results, employing relevant strategic intervention methods to input the question into the optimized language model, obtaining an answer, and replying to the user. It has the following advantages: 1. Low cost: Using a smaller model with high-quality data for training achieves the same effect as a larger model. 2. Fewer illusions: This invention uses a high-quality document when generating answers and simulates adding interfering documents during training, which strengthens the language model's resistance to interference and reduces the illusion of answers. 3. Low response latency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer information processing technology, and more specifically to a method for implementing AI search in the gaming field. Background Technology

[0002] The traditional AI search process is as follows: 1. Risk Control: Match user input with a sensitive word database and refuse to answer inputs containing sensitive words. 2. Query Generation: Extract search terms suitable for search engine retrieval based on the context and user input. 3. Recall: Retrieve relevant articles from data sources such as search engines and vector databases based on the search terms; the number is approximately several hundred. 4. Reordering: Sort and filter the retrieved articles, retaining those with high relevance. 5. Summary and Output: Summarize the results using a large language model based on the user's latest question, the context, and the retrieved articles, and output the results to the user.

[0003] Traditional AI search methods have the following shortcomings when implementing AI search in the gaming field:

[0004] High cost: In the summary output steps, to ensure the effect, a relatively complex large language model is generally selected, such as DeepSeek. Deploying DeepSeek requires an 800G graphics card, which is a high-end configuration.

[0005] Illusion: In the retrieval step, the actual search does not always recall articles relevant to the question. This can interfere with the large language model when summarizing the output, causing the large language model's answer to produce illusions.

[0006] High response latency: User questions are diverse, and in order to better answer various types of questions, the system prompts are relatively long, resulting in longer response times. Simple system prompts that summarize responses are not effective. Summary of the Invention

[0007] To address the shortcomings of existing technologies, this invention provides a method for implementing AI search in the gaming field, which has the advantages of low cost, fewer illusions, and low response latency, and can effectively solve the above-mentioned problems.

[0008] The technical solution adopted in this invention is as follows:

[0009] This invention provides a method for implementing AI search in the gaming field, comprising the following steps:

[0010] Step S1: Train the language model, perform supervised fine-tuning and reward optimization to obtain the optimized language model;

[0011] In step S2, the online service module performs risk control and intent recognition on the user's input question based on the optimized language model; according to the intent recognition result, it adopts relevant strategy intervention methods to input the question into the optimized language model, obtain an answer, and reply to the user.

[0012] Furthermore, step S1 includes:

[0013] Step S1.1, Constructing the Golden Document: Collect structured and semi-structured texts in the game field, construct a domain-specific corpus, and form the Golden Document;

[0014] Step S1.2, generating questions: Based on each of the aforementioned golden documents, using Prompt programming and chain thinking, guide the language model to generate multiple types of questions in the game domain;

[0015] Step S1.3, Design multiple system prompt words: Based on the semantic category of each question, design multiple system prompt words corresponding to each question;

[0016] Step S1.4, Generate an answer: Based on the gold document, the question, and the system prompt words, use a language model to generate an answer for each question corresponding to each of the system prompt words;

[0017] Step S1.5, Identify interfering documents:

[0018] For each of the aforementioned problems, several documents are randomly selected from the document library as a candidate set of interference documents;

[0019] Using a semantic reordering model, the semantic relevance between each interfering document in the interfering document candidate set and the question is scored, and interfering documents with scores below a preset threshold are retained, thereby obtaining the filtered interfering document set.

[0020] Step S1.6, Design online system prompt words: Perform Prompt distillation on multiple system prompt words corresponding to each question, and merge multiple system prompt words into a unified prompt word to adapt to the online service scenario, which is called online system prompt word;

[0021] Step S1.7: Synthesize training data to construct the training dataset;

[0022] By concatenating each question, the source document of each question, the corresponding answer to each question, the set of distracting documents for each question, and the online system prompt words for each question, a training dataset is obtained; thus, multiple questions are used to construct a training dataset.

[0023] Step S1.8, Model Training and Supervised Fine-Tuning:

[0024] The language model is pre-trained using the training dataset to obtain the pre-trained language model;

[0025] Based on open-source responses with small to medium parameters as labels, the pre-trained language model is subjected to supervised fine-tuning. Through instruction-aligned training, the pre-trained language model's ability to understand semantics and generate responses in the game domain is improved, resulting in a supervised fine-tuned language model.

[0026] Step S1.9, Generate reward training data:

[0027] Using the supervised fine-tuned language model, multiple answers are generated for each question, and each answer is scored as a reward. The question, the answer, and the reward form a reward training data set.

[0028] Step S1.10, Reward Model:

[0029] The reward model is trained using the aforementioned reward training data to obtain the trained reward model;

[0030] Step S1.11: Using the reinforcement learning algorithm PPO based on human feedback, the trained reward model is used to optimize the supervised fine-tuned language model, resulting in the optimized language model.

[0031] Furthermore, step S2 includes:

[0032] Step S2.1, User Input: Receive user input regarding the question;

[0033] Step S2.2, Risk Control: Perform risk control on the user's input question. If there is a risk, refuse to provide an answer to the user's question; otherwise, proceed to step S2.3.

[0034] Step S2.3, Intent Recognition: Based on the user's latest input question and the preceding text, perform intent recognition on the user to obtain the intent recognition result;

[0035] Step S2.4, Retrieval: Based on the intent recognition results, determine whether a retrieval is needed. If no retrieval is needed, proceed to step S2.6; if a retrieval is needed, retrieve the knowledge base based on the search terms to obtain potentially relevant documents.

[0036] Step S2.5, Rearrangement and Filtering: Rearrange the retrieved documents according to their relevance, filter out low-relevance documents, and retain high-relevance documents sorted by relevance.

[0037] Step S2.6, Strategy Intervention:

[0038] If no retrieval is required, the question can be directly input into the optimized language model to obtain the answer;

[0039] If a retrieval is required, the question and the retrieved documents are input into the optimized language model to obtain an answer;

[0040] Step S2.7: Reply to the user with the answer.

[0041] Furthermore, risk control measures are implemented for user-input questions, specifically as follows:

[0042] If the received question originates from the model, or if the received question contains sensitive words, then a conclusion is drawn that there is a risk.

[0043] Furthermore, the intent recognition includes:

[0044] Query term generation: Based on the user's latest input question and the preceding text, a language model is used to generate search terms suitable for retrieval;

[0045] Intent recognition: Using Prompt programming and chain thinking techniques to determine user intent, including casual conversation intent, game search intent, strategy search intent, activity search intent, and other intents;

[0046] Game recognition: The user's input question is segmented into words, and the game corresponding to the user's question is identified by querying a manually constructed game knowledge graph based on the segmentation results.

[0047] The method for implementing AI search in the gaming field provided by this invention has the following advantages:

[0048] 1. Low cost: Achieving the same results as large models using a smaller model trained with high-quality data. For example, a large model like DeepSeek requires an 800GB graphics card for deployment, while the language model trained using this invention only requires a 40GB graphics card.

[0049] 2. Fewer illusions: This invention uses golden documents when generating answers and simulates adding interfering documents during training, which can enhance the language model's anti-interference ability and reduce the illusions in answers.

[0050] 3. Low response latency: The online system prompts of this invention are relatively short, so the response speed is relatively fast. In addition, the answers in the training data are high-quality answers generated by multiple carefully designed system prompts and a large model. The answers after training can also achieve the same effect as those with complex system prompts. Attached Figure Description

[0051] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. 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.

[0052] Figure 1 The flowchart illustrates a method for implementing AI search in the gaming field, as provided by this invention. Detailed Implementation

[0053] To make the technical problems solved, the technical solutions, and the beneficial effects of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and are not intended to limit the invention.

[0054] See Figure 1 This invention provides a method for implementing AI search in the gaming field. It is a method that uses a small language model and data to achieve AI search in the gaming field, including steps S1 to S2:

[0055] Step S1: Train the language model, perform supervised fine-tuning and reward optimization to obtain the optimized language model;

[0056] In step S2, the online service module performs risk control and intent recognition on the user's input question based on the optimized language model; according to the intent recognition result, it adopts relevant strategy intervention methods to input the question into the optimized language model, obtain an answer, and reply to the user.

[0057] The following is a detailed description of steps S1 to S2:

[0058] Step S1 involves training, supervised fine-tuning, and reward optimization of the language model to obtain the optimized language model, including steps S1.1 to S1.11:

[0059] Step S1.1, Constructing the Golden Document: Collect structured and semi-structured texts such as game detail pages, community guides, and user manuals from the gaming field, construct a domain-specific corpus, and form the aforementioned golden document;

[0060] Step S1.2, generating questions: Based on each of the aforementioned golden documents, using Prompt programming and Chain-of-Thought (CoT) methods, guide the language model to generate various types of questions in the game domain, such as game recommendation questions, game search questions, and questions about obtaining game benefits.

[0061] Step S1.3, design multiple system prompts: Based on the semantic category of each question, design multiple system prompts corresponding to each question; furthermore, automated index optimization (GPT-4 evaluation score) can be used to select the best prompt template to significantly improve the richness and accuracy of the answers.

[0062] Step S1.4, Generate an answer: Based on the gold document, the question, and the system prompt words, use a language model to generate a high-quality answer for each question corresponding to each of the system prompt words;

[0063] Step S1.5, Identify interfering documents:

[0064] For each of the aforementioned problems, several documents are randomly selected from the document library as a candidate set of interference documents;

[0065] Using a semantic reordering model, the semantic relevance between each interfering document in the interfering document candidate set and the question is scored, and interfering documents with scores below a preset threshold are retained, thereby obtaining the filtered interfering document set; setting interfering documents can effectively improve the anti-interference ability and robustness of the language model.

[0066] Specifically, to improve the accuracy of identifying interfering documents, a semantic reordering model is used. This model is based on a two-tower architecture and can score the semantic relevance between questions and documents with high precision.

[0067] Step S1.6, Design online system prompt words: Perform Prompt distillation on multiple system prompt words corresponding to each question, and merge multiple system prompt words into a more compact and more efficient unified prompt word to adapt to online service scenarios. This is called online system prompt word or online single system prompt word.

[0068] Step S1.7: Synthesize training data to construct the training dataset;

[0069] By concatenating each question, the source document of each question, the corresponding answer to each question, the set of interfering documents for each question, and the online system prompt words for each question, a training data point is obtained; thus, multiple questions are used to construct a training dataset; the training dataset constructed by this invention is a high-quality instruction dataset.

[0070] Step S1.8, Model Training and Supervised Fine-Tuning:

[0071] The language model is pre-trained using the training dataset to obtain the pre-trained language model;

[0072] Based on open-source responses with a small number of parameters as labels, the pre-trained language model is subjected to supervised fine-tuning. Through instruction alignment training, the pre-trained language model's ability to understand semantics and generate responses in the game domain is improved, resulting in a supervised fine-tuned language model, which lays a solid foundation for the subsequent reinforcement learning stage.

[0073] Step S1.9, Generate reward training data:

[0074] Using the supervised fine-tuned language model, multiple answers are generated for each question, and each answer is scored as a reward, for example, using GPT-4 or human scoring; the question, the answer, and the reward form a reward training dataset;

[0075] Step S1.10, Reinforcement Feedback:

[0076] The reward model is trained using the aforementioned reward training data to obtain the trained reward model;

[0077] For example, multiple rounds of answer generation and preference comparison pairs are constructed, and GPT-4 or human scoring is used to train a reward model (RM) to provide a preference function for subsequent reinforcement learning.

[0078] Step S1.11, Reinforcement Learning Optimization (RLHF):

[0079] The Proximal Policy Optimization (PPO) algorithm, which is a reinforcement learning algorithm based on human feedback, is used to optimize the supervised fine-tuned language model using the trained reward model, thereby further improving the quality, stability, and user satisfaction of responses, resulting in an optimized language model.

[0080] Step S2, the online service module implementation logic includes steps S2.1 to S2.6;

[0081] Step S2.1, User Input: Receive user input regarding the question;

[0082] Step S2.2, Risk Control: Perform risk control on the user's input question. If there is a risk, refuse to provide an answer to the user's question; otherwise, proceed to step S2.3.

[0083] Specifically, if the received question comes from the model, or if the received question contains sensitive words, and even one of these risks is detected, a conclusion is drawn that there is a risk, and the user's question is refused to be answered.

[0084] Step S2.3, Intent Recognition: Based on the user's latest input question and the preceding text, perform intent recognition on the user to obtain the intent recognition result;

[0085] The intent recognition includes:

[0086] Query understanding - query term generation: Based on the user's latest input question and the preceding text, a language model is used to generate search terms suitable for retrieval;

[0087] Query Understanding - Intent Recognition: Using Prompt programming and Chain-of-Thought (CoT) techniques to determine user intent, including casual conversation intent, game search intent, strategy search intent, activity search intent, and other intents;

[0088] Query Understanding - Game Recognition: The system segments the user's input question into words, queries a pre-built game knowledge graph based on the segmentation results, and identifies the game corresponding to the user's question.

[0089] Step S2.4, Retrieval: Based on the intent recognition results, determine whether a retrieval is needed. For example, if "casual chat" is the target, no retrieval is required. If no retrieval is needed, proceed to step S2.6; if a retrieval is needed, search the game knowledge base, post knowledge base, and other knowledge bases based on the search terms to obtain potentially relevant documents.

[0090] Step S2.5, Reordering and Filtering: Reorder the retrieved documents according to relevance, filter out low-relevance documents, and retain high-relevance documents sorted by relevance; for example, filter out documents with a score <0.3, and finally retain the top 10 documents. If a search is required but no results are found, the response is rejected.

[0091] Step S2.6, Strategy Intervention:

[0092] If no retrieval is required, the question can be directly input into the optimized language model to obtain the answer;

[0093] If a retrieval is required, the question and the retrieved documents are input into the optimized language model to obtain an answer;

[0094] Step S2.7: Reply to the user with the answer.

[0095] This invention provides a method for implementing AI search in the gaming field, which has the following advantages:

[0096] 1. Low cost: Achieving the same results as large models using a smaller model trained with high-quality data. For example, a large model like DeepSeek requires an 800GB graphics card for deployment, while the language model trained using this invention only requires a 40GB graphics card.

[0097] 2. Fewer illusions: This invention uses golden documents when generating answers and simulates adding interfering documents during training, which can enhance the language model's anti-interference ability and reduce the illusions in answers.

[0098] 3. Low response latency: The online system prompts of this invention are relatively short, so the response speed is relatively fast. In addition, the answers in the training data are high-quality answers generated by multiple carefully designed system prompts and a large model. The answers after training can also achieve the same effect as those with complex system prompts.

[0099] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for implementing AI search in the gaming field, characterized in that, Includes the following steps: Step S1: Train the language model, perform supervised fine-tuning and reward optimization to obtain the optimized language model; In step S2, the online service module performs risk control and intent recognition on the user's input question based on the optimized language model; according to the intent recognition result, it adopts relevant strategy intervention methods to input the question into the optimized language model, obtain an answer, and reply to the user.

2. The method for implementing AI search in the gaming field according to claim 1, characterized in that, Step S1 includes: Step S1.1, Constructing the Golden Document: Collect structured and semi-structured texts in the game field, construct a domain-specific corpus, and form the Golden Document; Step S1.2, generating questions: Based on each of the aforementioned golden documents, using Prompt programming and chain thinking, guide the language model to generate multiple types of questions in the game domain; Step S1.3, Design multiple system prompt words: Based on the semantic category of each question, design multiple system prompt words corresponding to each question; Step S1.4, Generate an answer: Based on the gold document, the question, and the system prompt words, use a language model to generate an answer for each question corresponding to each of the system prompt words; Step S1.5, Identify interfering documents: For each of the aforementioned problems, several documents are randomly selected from the document library as a candidate set of interference documents; Using a semantic reordering model, the semantic relevance between each interfering document in the interfering document candidate set and the question is scored, and interfering documents with scores below a preset threshold are retained, thereby obtaining the filtered interfering document set. Step S1.6, Design online system prompt words: Perform Prompt distillation on multiple system prompt words corresponding to each question, and merge multiple system prompt words into a unified prompt word to adapt to the online service scenario, which is called online system prompt word; Step S1.7: Synthesize training data to construct the training dataset; By concatenating each question, the source document of each question, the corresponding answer to each question, the set of distracting documents for each question, and the online system prompt words for each question, a training dataset is obtained; thus, multiple questions are used to construct a training dataset. Step S1.8, Model Training and Supervised Fine-Tuning: The language model is pre-trained using the training dataset to obtain the pre-trained language model; Based on open-source responses with small to medium parameters as labels, the pre-trained language model is subjected to supervised fine-tuning. Through instruction-aligned training, the pre-trained language model's ability to understand semantics and generate responses in the game domain is improved, resulting in a supervised fine-tuned language model. Step S1.9, Generate reward training data: Using the supervised fine-tuned language model, multiple answers are generated for each question, and each answer is scored as a reward. The question, the answer, and the reward form a reward training data set. Step S1.10, Reward Model: The reward model is trained using the aforementioned reward training data to obtain the trained reward model; Step S1.11: Using the reinforcement learning algorithm PPO based on human feedback, the trained reward model is used to optimize the supervised fine-tuned language model, resulting in the optimized language model.

3. The method for implementing AI search in the gaming field according to claim 1, characterized in that, Step S2 includes: Step S2.1, User Input: Receive user input regarding the question; Step S2.2, Risk Control: Perform risk control on the user's input question. If there is a risk, refuse to provide an answer to the user's question; otherwise, proceed to step S2.

3. Step S2.3, Intent Recognition: Based on the user's latest input question and the preceding text, perform intent recognition on the user to obtain the intent recognition result; Step S2.4, Retrieval: Based on the intent recognition results, determine whether a retrieval is needed. If no retrieval is needed, proceed to step S2.6; if a retrieval is needed, retrieve the knowledge base based on the search terms to obtain potentially relevant documents. Step S2.5, Rearrangement and Filtering: Rearrange the retrieved documents according to their relevance, filter out low-relevance documents, and retain high-relevance documents sorted by relevance. Step S2.6, Strategy Intervention: If no retrieval is required, the question can be directly input into the optimized language model to obtain the answer; If a retrieval is required, the question and the retrieved documents are input into the optimized language model to obtain an answer; Step S2.7: Reply to the user with the answer.

4. The method for implementing AI search in the gaming field according to claim 3, characterized in that, Risk control measures are implemented for user-input questions, specifically as follows: If the received question originates from the model, or if the received question contains sensitive words, then a conclusion is drawn that there is a risk.

5. The method for implementing AI search in the gaming field according to claim 3, characterized in that, The intent recognition includes: Query term generation: Based on the user's latest input question and the preceding text, a language model is used to generate search terms suitable for retrieval; Intent recognition: Using Prompt programming and chain thinking techniques to determine user intent, including casual conversation intent, game search intent, strategy search intent, activity search intent, and other intents; Game recognition: The user's input question is segmented into words, and the segmentation results are used to query a manually constructed game knowledge graph to identify the game corresponding to the user's question.