Open source collaborative personalized question answering method and system based on fusion-aware RAG

By introducing integrated perception RAG technology into the intelligent question and answer system, combining the specific situation and technical background of developers in open source collaboration, personalized question and answer content is generated, and the existing intelligent question and answer tools are difficult to provide personalized answers, improving the relevance and efficiency of question and answers.

CN119537560BActive Publication Date: 2025-05-06NAT UNIV OF DEFENSE TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510105634.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-05-06
Estimated Expiration
2045-01-23

AI Technical Summary

Technical Problem

Existing smart Q&A tools are difficult to provide personalized answers to open source collaboration processes and contribution standards, and lack automatic and real-time perception of the developer's personal background and context.

Method used

Adopt open source collaborative personalized question-and-answer methods and systems based on fusion-aware RAG, and build rich contexts and input large language models to generate personalized answers by obtaining developers' questions, project-level and task-level environment perception, individual experience and technical expertise perception.

Benefits of technology

It improves the relevance and practicality of Q&A, ensures that the answers match the developer's current situation and technical background, reduces interference from irrelevant information, reduces the time and energy of developers to find information, and improves the efficiency and quality of open source project collaboration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119537560B_ABST
    Figure CN119537560B_ABST
Patent Text Reader

Abstract

The present application relates to a method and system for personalized question-answering of open source collaboration based on fusion-aware RAG. The method includes: obtaining developer questions, searching from the open source collaboration RAG basic knowledge base according to the developer questions, outputting the top K most relevant texts, and constructing a collection of relevant texts; performing project-level environmental perception, task-level environmental perception, individual experience perception, and individual technical expertise perception on the developers, respectively, to generate project-level environmental perception sentences, task-level environmental perception sentences, individual experience perception sentences, and individual technical expertise perception sentences; obtaining context according to the collection of relevant texts, project-level environmental perception sentences, task-level environmental perception sentences, individual experience perception sentences, and individual technical expertise perception sentences, constructing prompt words according to the context and the developer's questions, and inputting the prompt words into the large language model to obtain the answer content. The use of this method can provide more targeted and timely answers to the current scenario of the questioner.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent question-answering technology, and in particular to an open source collaborative personalized question-answering method and system based on fusion-aware RAG. Background Art

[0002] With the continuous development of open source software projects, more and more developers are participating in open source collaboration. The collaboration model of open source software may have specific workflows and contribution mechanisms, which requires participants to master certain open source collaboration knowledge in order to effectively carry out activities such as code contribution, problem solving, and project management. Especially for open source novices, they need to understand the project's contribution documents, collaboration processes, and standards to be followed in order to be able to participate in the project smoothly.

[0003] Developers usually need to manually browse the documents or manuals of open source projects, attend seminars, and ask the community for advice to obtain relevant information and guidance. These methods have significant problems of high time cost and low efficiency. In order to save time and improve efficiency, developers usually turn to search engines or intelligent question-and-answer tools. Search engines rely on keyword matching and often cannot provide personalized answers to specific developer needs. In addition, due to the complexity and diversity of the collaborative content and processes of open source projects, search engine queries often find it difficult to quickly and accurately guide developers to find the most relevant content. Intelligent question-and-answer tools (such as "Wenxin Yiyan") can answer developers' questions to a certain extent, but they lack the ability to automatically and real-time perceive the developer's personal background and context, and it is difficult to provide tailored answers, especially in specific areas such as open source collaboration processes and contribution standards. Summary of the invention

[0004] Based on this, it is necessary to provide an open source collaborative personalized question-answering method and system based on fusion-aware RAG to address the above technical issues.

[0005] An open source collaborative personalized question answering method based on fusion-aware RAG, the method comprising:

[0006] Obtain developer questions, search from the pre-built open source collaborative RAG basic knowledge base based on the developer questions, output the top K most relevant texts, and build a relevant text collection;

[0007] Perform real-time project-level environmental awareness and task-level environmental awareness on developers, and generate project-level environmental awareness statements and task-level environmental awareness statements;

[0008] Conducting individual experience perception and individual technical expertise perception on developers respectively, generating individual experience perception statements and individual technical expertise perception statements;

[0009] A context is obtained based on the relevant text collection, project-level environmental awareness sentences, task-level environmental awareness sentences, individual experience awareness sentences and individual technical expertise awareness sentences, prompt words are constructed based on the context and the developer's questions, and the prompt words are input into a large language model to obtain answer content.

[0010] In one of the embodiments, it also includes: the open source collaboration RAG basic knowledge base includes multi-source data in the open source community; the multi-source data includes community document data, technical document data, code file data and community discussion data.

[0011] In one of the embodiments, it also includes: determining whether the developer is on the homepage of an open source project, and if not, skipping project-level environmental awareness; if the developer is on the homepage of an open source project, obtaining the developer's participation in previous activities of the current open source project, and generating a project-level environmental awareness statement based on the open source project information and the previous activity participation.

[0012] In one of the embodiments, it also includes: determining whether the developer is on a discussion page of a development task, and if not, skipping task-level environmental awareness; if the developer is on a discussion page of a development task, generating a project-level environmental awareness statement based on the development task information.

[0013] In one of the embodiments, it also includes: counting the historical activity of developers on the open source platform, and generating individual experience perception statements based on the historical activity; the historical activity includes the number of open source projects participated in by the developer on the open source platform, the number of code contributions submitted, and the number of development task submissions.

[0014] In one of the embodiments, it also includes: collecting statistics on developers' technical expertise information in software development, and generating individual technical expertise perception statements based on the technical expertise information; the technical expertise information includes a set of the top k most frequently used programming languages ​​and a set of the top k most frequently used programming frameworks.

[0015] An open source collaborative personalized question answering system based on fusion-aware RAG, the system comprising:

[0016] The question retrieval module is used to obtain developer questions, retrieve from the pre-built open source collaborative RAG basic knowledge base according to the developer questions, output the top K most relevant texts, and build a relevant text collection;

[0017] The environment perception module is used to perform real-time project-level environment perception and task-level environment perception on developers, and generate project-level environment perception statements and task-level environment perception statements;

[0018] An individual feature perception module is used to perceive the individual experience and individual technical expertise of developers respectively, and generate individual experience perception statements and individual technical expertise perception statements;

[0019] The answer generation module is used to obtain context according to the relevant text set, project-level environmental awareness statements, task-level environmental awareness statements, individual experience awareness statements and individual technical expertise awareness statements, construct prompt words according to the context and the developer's questions, input the prompt words into the large language model, and obtain answer content.

[0020] The above-mentioned open source collaborative personalized question-and-answer method and system based on fusion-aware RAG, first of all, based on the developer's project-level perception and task-level perception, the system can accurately identify the open source project and specific task that the developer is currently in, thereby generating answers that are highly relevant to the developer's current situation. Secondly, through the perception of the developer's individual experience and technical expertise, the system can evaluate his or her technical level, experience background, and familiar programming languages ​​and frameworks to ensure that the answers match their capabilities and needs, avoiding general and inapplicable answers, and combining these multi-dimensional information with the RAG knowledge base retrieval results to provide a richer and more accurate context for the large language model, and can generate more personalized and effective answers. The embodiment of the present invention effectively improves the relevance and practicality of questions and answers, while avoiding the interference of irrelevant information, greatly reducing the time and energy of developers in finding information, and can improve the efficiency and quality of open source project collaboration. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 It is a flowchart of an open source collaborative personalized question-answering method based on fusion-aware RAG in one embodiment;

[0022] Figure 2 It is a structural block diagram of an open source collaborative personalized question-answering system based on fusion-aware RAG in an embodiment, wherein 202 is a question retrieval module, 204 is an environment perception module, 206 is an individual feature perception module, and 208 is an answer generation module. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0024] In one embodiment, Figure 1 As shown, an open source collaborative personalized question answering method based on fusion-aware RAG is provided, including the following steps:

[0025] Step 102, obtaining developer questions, searching from a pre-built open source collaborative RAG basic knowledge base according to the developer questions, outputting the top K most relevant texts, and constructing a relevant text set.

[0026] Through RAG (Retrieval-Augmented Generation) knowledge base retrieval, the system can quickly filter out the most relevant text from a large number of open source collaborative documents, laying the foundation for subsequent professional answers based on large models.

[0027] Step 104 , performing real-time project-level environment perception and task-level environment perception on the developer, respectively, and generating project-level environment perception statements and task-level environment perception statements.

[0028] Through project-level perception, the system can know whether the developer is on the homepage of a certain open source project, and through task-level perception, the system can determine whether the developer is participating in a specific development task. In this way, the system can provide answers related to the developer's current project and task, avoiding giving answers that are irrelevant to the current work.

[0029] It can be understood that the method of the present invention can customize answers according to the developer's specific context (such as the context of the project and task), thereby improving the personalization and pertinence of the answers.

[0030] Step 106 , performing individual experience perception and individual technical expertise perception on the developers respectively, and generating individual experience perception statements and individual technical expertise perception statements.

[0031] By counting developers' historical participation in open source platforms (such as the number of projects they participated in, the amount of code they submitted, the number of tasks, etc.), the system can determine the developer's experience level and customize answers that match their skills and experience. Individual technical expertise perception can analyze the programming languages ​​and frameworks that developers are familiar with and generate personalized answers based on their technology stack. For example, developers familiar with Python will receive answers related to Python rather than solutions related to other programming languages.

[0032] It can prevent developers from receiving irrelevant answers that do not match their current technical level or project requirements, reducing information redundancy and waste of resources.

[0033] Step 108, obtain context based on the relevant text collection, project-level environmental awareness sentences, task-level environmental awareness sentences, individual experience awareness sentences and individual technical expertise awareness sentences, construct prompt words based on the context and the developer's questions, input the prompt words into the large language model, and obtain the answer content.

[0034] A complete context is constructed by combining multi-dimensional information such as relevant text collections, project-level environmental perception, task-level environmental perception, individual experience perception, and individual technical expertise perception. This context can help the large language model understand the developer's specific needs and background, thereby generating more accurate and personalized answers. Combined with the developer's background information and current tasks, the generated prompt words can ensure that the large language model focuses on the core of the problem and provides the most suitable solution based on the developer's experience and technology stack, rather than providing generalized or irrelevant answers.

[0035] In the above-mentioned personalized question-and-answer method for open source collaboration based on fusion-aware RAG, firstly, based on the developer's project-level perception and task-level perception, the system can accurately identify the open source project and specific task in which the developer is currently located, thereby generating answers that are highly relevant to the developer's current situation. Secondly, through the perception of the developer's individual experience and technical expertise, the system can evaluate his or her technical level, experience background, and familiar programming languages ​​and frameworks to ensure that the answers match their capabilities and needs, avoiding general but inapplicable answers. Combining these multi-dimensional information with the RAG knowledge base retrieval results, the system provides a richer and more accurate context for the large language model, which can generate more personalized and effective answers. The embodiment of the present invention effectively improves the relevance and practicality of questions and answers, while avoiding the interference of irrelevant information, greatly reducing the time and energy of developers in finding information, and can improve the efficiency and quality of open source project collaboration.

[0036] In one embodiment, the open source collaborative RAG basic knowledge base includes multi-source data in the open source community; the multi-source data includes community document data, technical document data, code file data, and community discussion data.

[0037] In this embodiment, the system of the present invention provides external services by being integrated into an open source collaborative platform. When an open source contributor raises a question, it is first searched from the pre-built open source collaborative RAG basic knowledge base. Specifically, for the question raised by the open source contributor, the question text is first vectorized, and then searched from the open source collaborative RAG knowledge base, and the top K most relevant results in the returned results constitute a set Sk. The open source collaborative RAG knowledge base is built based on multi-source data in the open source community. After text slicing and vectorization operations, these data are indexed and stored in the database.

[0038] In one embodiment, project-level environmental awareness is performed based on developer questions to generate project-level environmental awareness statements, including: determining whether the developer is on the homepage of an open source project, and if not, skipping project-level environmental awareness; if the developer is on the homepage of an open source project, obtaining the developer's participation in previous activities of the current open source project, and generating project-level environmental awareness statements based on the open source project information and the participation in previous activities.

[0039] Specifically, when a developer asks a question, real-time external environment perception is performed. The external environment perception process mainly includes project-level environment perception and task-level environment perception.

[0040] Project-level context perception is to determine whether the developer is on the homepage of a certain open source project. If not, perception is skipped; if so, the developer's participation in previous activities in this project (represented by X) is further retrieved (represented by Y), and a project-level context perception statement S-proj is generated: "The questioner is browsing open source project X, and his previous participation in this project is Y times."

[0041] In one embodiment, task-level environmental awareness is performed based on developer questions to generate task-level environmental awareness statements, including: determining whether the developer is on a discussion page for a development task, and if not, skipping task-level environmental awareness; if the developer is on a discussion page for a development task, generating project-level environmental awareness statements based on the development task information.

[0042] Specifically, task-level environmental perception is to determine whether the developer is on the discussion page of a certain development task (Z). If not, perception is skipped; if so, a task-level environmental perception statement S-task is generated: "The questioner is browsing development task Z".

[0043] In one embodiment, individual experience perception is performed based on questions asked by developers, and individual experience perception statements are generated, including: counting the historical activity of developers on the open source platform, and generating individual experience perception statements based on the historical activity; the historical activity includes the number of open source projects participated in by the developer on the open source platform, the number of code contributions submitted, and the number of development task submissions.

[0044] Specifically, when developers raise questions, individual characteristics perception is performed at the same time. The individual characteristics perception process mainly includes individual experience perception and individual technical expertise perception.

[0045] Individual experience perception mainly counts the historical activity of developers in the entire open source platform, including the number of open source projects participated in (represented by M), the number of code contributions submitted (represented by N), and the number of development task submissions (represented by L). Based on these data, an individual experience perception statement S-exp is generated: "The questioner has participated in M ​​open source projects, submitted N codes and L development tasks."

[0046] In one embodiment, individual technical expertise is perceived based on questions asked by developers, and individual technical expertise perception statements are generated, including: statistically analyzing the technical expertise information of developers in software development, and generating individual technical expertise perception statements based on the technical expertise information; the technical expertise information includes a set of the top k most frequently used programming languages ​​and a set of the top k most frequently used programming frameworks.

[0047] Specifically, individual technical expertise perception mainly counts the technical expertise of developers in software development, including the top k most frequently used programming languages ​​(represented by Lank_k) and the top k most frequently used programming frameworks (represented by Fram_k). Based on these data, an individual technical expertise perception statement S-skill is generated: "The programming languages ​​​​most familiar to the questioner include Lank_k, and the most familiar programming frameworks include Fram_k."

[0048] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0049] In one embodiment, Figure 2 As shown, an open source collaborative personalized question answering system based on fusion-aware RAG is provided, including:

[0050] A question retrieval module 202 is used to obtain developer questions, retrieve from a pre-built open source collaborative RAG basic knowledge base according to the developer questions, output the top K most relevant texts, and build a relevant text set;

[0051] The environment perception module 204 is used to perform real-time project-level environment perception and task-level environment perception on the developer, and generate project-level environment perception statements and task-level environment perception statements;

[0052] The individual feature perception module 206 is used to perceive the individual experience and individual technical expertise of the developer, and generate an individual experience perception statement and an individual technical expertise perception statement;

[0053] The answer generation module 208 is used to obtain context based on relevant text sets, project-level environmental awareness statements, task-level environmental awareness statements, individual experience awareness statements and individual technical expertise awareness statements, construct prompt words based on the context and developer questions, input the prompt words into the large language model, and obtain answer content.

[0054] In one of the embodiments, the RAG basic knowledge base for open source collaboration includes multi-source data in the open source community; the multi-source data includes community document data, technical document data, code file data and community discussion data.

[0055] In one of the embodiments, it is also used to determine whether the developer is on the homepage of an open source project. If not, project-level environmental awareness is skipped; if the developer is on the homepage of an open source project, the developer's participation in previous activities of the current open source project is obtained, and a project-level environmental awareness statement is generated based on the open source project information and the participation in previous activities.

[0056] In one of the embodiments, it is also used to determine whether the developer is on the discussion page of a development task. If not, the task-level environment awareness is skipped; if the developer is on the discussion page of a development task, a project-level environment awareness statement is generated according to the development task information.

[0057] In one of the embodiments, it is also used to count the historical activity of developers on the open source platform and generate individual experience perception statements based on the historical activity; the historical activity includes the number of open source projects participated in by the developer on the open source platform, the number of code contributions submitted, and the number of development task submissions.

[0058] In one of the embodiments, it is also used to collect statistics on developers' technical expertise information in software development and generate individual technical expertise perception statements based on the technical expertise information; the technical expertise information includes a set of the top k most frequently used programming languages ​​and a set of the top k most frequently used programming frameworks.

[0059] For the specific limitations of the open source collaborative personalized question-and-answer system based on fusion-aware RAG, please refer to the limitations of the open source collaborative personalized question-and-answer method based on fusion-aware RAG above, which will not be repeated here. Each module in the above-mentioned open source collaborative personalized question-and-answer system based on fusion-aware RAG can be implemented in whole or in part through software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0060] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0061] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. An open source collaborative personalized question-answering method based on fusion-aware RAG, characterized in that: The method comprises: Obtain developer questions, search from the pre-built open source collaborative RAG basic knowledge base based on the developer questions, output the top K most relevant texts, and build a relevant text collection; Perform real-time project-level environmental awareness and task-level environmental awareness on developers, and generate project-level environmental awareness statements and task-level environmental awareness statements; Conducting individual experience perception and individual technical expertise perception on developers respectively, generating individual experience perception statements and individual technical expertise perception statements; Obtaining context according to the relevant text set, the project-level environment-awareness sentence, the task-level environment-awareness sentence, the individual experience-awareness sentence, and the individual technical expertise-awareness sentence, constructing prompt words according to the context and the developer's question, and inputting the prompt words into a large language model to obtain answer content; Provide project-level environment awareness for developers and generate project-level environment awareness statements, including: Determine whether the developer is on the homepage of an open source project. If not, skip project-level environment awareness. If the developer is on the homepage of an open source project, the developer's participation in previous activities of the current open source project is obtained, and a project-level environmental awareness statement is generated according to the open source project information and the participation in previous activities; Provide task-level environment awareness to developers and generate task-level environment awareness statements, including: Determine whether the developer is on the discussion page of a development task. If not, skip task-level environment perception. If the developer is on the discussion page of a development task, a task-level context-aware statement is generated based on the development task information; Conduct individual experience perception on developers and generate individual experience perception statements, including: Count the historical activity of developers on the open source platform, and generate individual experience perception statements based on the historical activity; the historical activity includes the number of open source projects participated in by the developer on the open source platform, the number of code contributions submitted, and the number of development task submissions; The developer's individual technical expertise is perceived and individual technical expertise perception statements are generated, including: The technical expertise information of developers in software development is collected, and individual technical expertise perception statements are generated according to the technical expertise information; the technical expertise information includes a set of the top k most frequently used programming languages ​​and a set of the top k most frequently used programming frameworks.

2. The method according to claim 1, characterized in that The open source collaboration RAG basic knowledge base includes multi-source data in the open source community; the multi-source data includes community document data, technical document data, code file data and community discussion data.

3. An open source collaborative personalized question-answering system based on fusion-aware RAG, characterized in that: The system comprises: The question retrieval module is used to obtain developer questions, retrieve from the pre-built open source collaborative RAG basic knowledge base according to the developer questions, output the top K most relevant texts, and build a relevant text collection; The environment perception module is used to perform real-time project-level environment perception and task-level environment perception on developers, and generate project-level environment perception statements and task-level environment perception statements; An individual feature perception module is used to perceive the individual experience and individual technical expertise of developers respectively, and generate individual experience perception statements and individual technical expertise perception statements; an answer generation module, for obtaining context according to the relevant text set, the project-level environment perception statement, the task-level environment perception statement, the individual experience perception statement, and the individual technical expertise perception statement, constructing prompt words according to the context and the developer's question, and inputting the prompt words into a large language model to obtain answer content; The environment perception module is also used to determine whether the developer is on the homepage of an open source project. If not, the project-level environment perception is skipped; If the developer is on the homepage of an open source project, the developer's participation in previous activities of the current open source project is obtained, and a project-level environmental awareness statement is generated according to the open source project information and the participation in previous activities; The environment perception module is also used to determine whether the developer is on the discussion page of a development task. If not, the task-level environment perception is skipped; If the developer is on the discussion page of a development task, a task-level context-aware statement is generated based on the development task information; The individual feature perception module is also used to count the historical activity of developers on the open source platform and generate individual experience perception statements based on the historical activity; the historical activity includes the number of open source projects participated in by the developer on the open source platform, the number of code contributions submitted, and the number of development task submissions; The individual feature perception module is also used to collect statistics on the developers' technical expertise information in software development and generate individual technical expertise perception statements based on the technical expertise information; the technical expertise information includes the top k most frequently used programming language sets and the top k most frequently used programming framework sets.

4. The system according to claim 3, characterized in that The open source collaboration RAG basic knowledge base includes multi-source data in the open source community; the multi-source data includes community document data, technical document data, code file data and community discussion data.

Citation Information

Patent Citations

  • Open source community developer-oriented portrait construction method

    CN112115376A

  • Question and answer method and device and electronic equipment

    CN117194646A