Method, system, and program for constituting rag

A no-code system for configuring RAGs simplifies the setup process, allowing users to easily construct and deploy RAGs for efficient search functionality.

JP2025169153APending Publication Date: 2025-11-12LINE PLUS
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2025030829
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-04-30
Filing Date
2025-02-28
Publication Date
2025-11-12

AI Technical Summary

Technical Problem

Existing Retrieval-Augmented Generation (RAG) systems require complex coding and infrastructure setup, making them difficult to configure and deploy efficiently.

Method used

A no-code method and system for configuring RAGs, allowing users to easily combine and set elements through a user interface, using predefined components and a knowledge pipeline to generate responses.

Benefits of technology

Enables users to quickly configure and utilize RAGs for searches without coding, enhancing efficiency and usability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025169153000001_ABST
    Figure 2025169153000001_ABST
Patent Text Reader

Abstract

To provide a method and a system for constituting RAG.SOLUTION: A RAG constitution method according to an embodiment includes the steps of: inputting a file path for a user to constitute RAG, or providing the user with a user interface on which predefined elements for constituting the RAG can be selected; constituting the RAG for the user, by using an element selected by the user, from among the predefined elements, via a file acquired through the file path input via the user interface or the user interface; generating a reply to the user's query input via the user interface by using the constituted RAG and an artificial intelligence model; and providing the generated reply to the user via the user interface.SELECTED DRAWING: Figure 3
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The following description relates to methods and systems for configuring RAGs. [Background technology]

[0002] A large language model (LLM) is a type of artificial intelligence trained on large text datasets to generate human-like responses to natural language input. It is a language model consisting of an artificial neural network with many parameters (typically billions or more). Such LLMs use self-supervised or semi-supervised learning to learn from large amounts of unlabeled text.

[0003] Retrieval-Augmented Generation (RAG) is a technique used to supplement LLMs with ambiguities and unlearned knowledge. It is a process of optimizing the output of an LLM by consulting a trusted knowledge base outside of the training data source before generating a response. RAG extends the already powerful capabilities of an LLM based on specific domain or internal organizational knowledge, eliminating the need to retrain the model. This is a cost-effective and efficient method for improving the output of an LLM and maintaining its relevance, accuracy, and usefulness across a variety of contexts.

[0004] Previously, RAGs were constructed by creating source code using Python libraries such as LangChain and Llama index, but RAGs required the hurdle of learning scattered libraries, and required the ability to create code, which required time and effort for distribution.Furthermore, the preparation and linking of infrastructure elements such as vector databases and servers was required, and there was also the problem of it being unclear what retriever technology should be applied. [Prior art documents] [Patent documents]

[0005] [Patent Document 1] Korean Patent No. 10-2648139 Summary of the Invention [Problem to be solved by the invention]

[0006] This is a RAG (Retrieval-Augmented Generation) configuration method and system that provides users with the ability to easily configure RAGs by combining and setting elements of standardized processes for RAG configuration using no-code, allowing them to immediately use RAGs for searches. [Means for solving the problem]

[0007] A method for constructing a Retrieval-Augmented Generation (RAG) for a computer device including at least one processor is provided, the method comprising: a step of providing a user with a user interface, by the at least one processor, in which the user can input a file path for constructing the RAG or select predefined elements for constructing the RAG; a step of constructing a RAG for the user by the at least one processor using a file obtained through the file path input via the user interface or an element selected by the user from among the predefined elements via the user interface; a step of generating a response to the user's query input via the user interface using the constructed RAG and an artificial intelligence model by the at least one processor; and a step of providing the generated response to the user via the user interface by the at least one processor.

[0008] According to one aspect, the step of configuring the RAG may include a step of configuring a knowledge pipeline for the RAG by linking elements contained in the acquired file or the selected elements to actions in a pipeline, and the step of generating the response may include a step of sequentially operating workers corresponding to elements linked to the actions in accordance with the order of actions in the knowledge pipeline.

[0009] According to another aspect, the step of constructing the RAG may include constructing a first pipeline with a combination of first elements for indexing the user's data, and constructing a second pipeline with a combination of second elements for searching the user's data in response to the user's query.

[0010] According to another aspect, the first element may include two or more of an element for obtaining the user's data, an element for parsing the user's data, an element for extracting at least one of keywords, summaries, and metadata from the user's data, an element for splitting the user's data into a plurality of chunks, an element for embedding the user's data to generate vectors, and an element for storing the embedded vectors in a vector database.

[0011] According to another aspect, the second element may include two or more of an element for embedding the user's query to generate a vector, an element for storing the generated vector in a vector database, an element for searching the vector database using the generated vector to obtain search results, and an element for preprocessing the search results.

[0012] According to another aspect, the element for preprocessing the retrieved search results may include an element for adjusting a ranking of the retrieved search results or generating a summary of the search results.

[0013] According to another aspect, the step of configuring the RAG may be characterized by configuring the RAG to include a plurality of different retrievers.

[0014] According to another aspect, the plurality of retrievers may include two or more of: a first retriever that searches for data corresponding to the embedded user query from a first vector database configured by embedding the user data into first chunk units of a predetermined first chunk size; a second retriever that searches for data corresponding to the embedded user query from a second vector database configured by embedding the user data into second chunk units of a second chunk size larger than the first chunk size; and a third retriever that searches the vector database by generating a structured query using an artificial intelligence model.

[0015] According to another aspect, the step of constructing the vector database may include the steps of: analyzing the user's data to extract at least one of keywords, summaries, and metadata; dividing the user's data and the extracted information into chunks; embedding the chunk-unit data to generate vectors; and storing the generated vectors in the vector database.

[0016] Furthermore, according to another aspect, the second vector database may be characterized by being configured by embedding metadata extracted from the data divided into the second chunk units using an artificial intelligence model, and the data divided into the second chunk units.

[0017] A program stored on a computer-readable recording medium is provided for combining with a computer device to cause the computer device to execute the RAG configuration method.

[0018] A program is provided that can be combined with a computer device to cause the computer device to execute the RAG configuration method.

[0019] A computer-readable recording medium is provided, on which a program for causing a computer device to execute the RAG configuration method is recorded.

[0020] A computer device is provided, comprising: at least one processor configured to execute computer-readable instructions; the at least one processor provides a user interface in which the user can input a file path for configuring a RAG or select predefined elements for configuring the RAG; configures a RAG for the user using a file obtained through the file path input via the user interface or an element selected by the user from among the predefined elements via the user interface; generates a response to a query input by the user via the user interface using the configured RAG and an artificial intelligence model; and provides the generated response to the user via the user interface. [Effects of the Invention]

[0021] By allowing users to combine and configure elements of a standardized process for constructing a Retrieval-Augmented Generation (RAG) using no-code, users can easily configure a RAG and be provided with a function that allows them to immediately use it for searches. [Brief explanation of the drawings]

[0022] [Figure 1] FIG. 1 illustrates an example of a network environment in accordance with an embodiment of the present invention. [Figure 2] FIG. 1 is a block diagram illustrating an example of a computing device according to an embodiment of the present invention. [Figure 3] 1 is a schematic example of a Retrieval-Augmented Generation (RAG) configuration system according to an embodiment of the present invention. [Figure 4] FIG. 2 is a diagram illustrating an example of a pipeline configuration according to an embodiment of the present invention. [Figure 5] FIG. 2 illustrates an example configuration of a pipeline for data indexing in one embodiment of the present invention. [Figure 6] 1 is a diagram illustrating an example of a pipeline configuration for a retriever in accordance with an embodiment of the present invention. [Figure 7] FIG. 10 illustrates an example of a user interface for RAG configuration in one embodiment of the present invention. [Figure 8] FIG. 10 illustrates an example of a user interface for RAG configuration in one embodiment of the present invention. [Figure 9] FIG. 10 illustrates an example of a user interface for RAG configuration in one embodiment of the present invention. [Figure 10] 1 is a flowchart illustrating an example of a method for configuring a RAG in accordance with an embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0023] Hereinafter, the embodiments will be described in detail with reference to the accompanying drawings.

[0024] A Retrieval-Augmented Generation (RAG) configuration system according to an embodiment of the present invention may be configured with at least one computer device. In this case, a computer program according to an embodiment of the present invention may be installed and executed in the computer device, and the computer device may execute a RAG configuration method according to an embodiment of the present invention under the control of the executed computer program. The computer program may be stored in a computer-readable recording medium so as to be combined with the computer device and cause the computer to execute the RAG configuration method.

[0025] FIG. 1 is a diagram showing an example of a network environment in one embodiment of the present invention. The network environment in FIG. 1 shows an example including multiple electronic devices 110, 120, 130, and 140, multiple servers 150 and 160, and a network 170. FIG. 1 is merely an example for explaining the invention, and the number of electronic devices and the number of servers are not limited to those shown in FIG. 1. Furthermore, the network environment in FIG. 1 is merely an example of an environment applicable to this embodiment, and environments applicable to this embodiment are not limited to the network environment in FIG. 1.

[0026] The electronic devices 110, 120, 130, and 140 may be fixed or mobile terminals configured by computer devices. Examples of the electronic devices 110, 120, 130, and 140 include smartphones, mobile phones, navigation systems, personal computers (PCs), notebook PCs, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), and tablets. While FIG. 1 illustrates a smartphone as an example of the electronic device 110, in embodiments of the present invention, the electronic device 110 may refer to any of a variety of physical computer devices capable of communicating with other electronic devices 120, 130, and 140 and / or servers 150 and 160 via a network 170 using a substantially wireless or wired communication method.

[0027] The communication method is not limited, and may include not only a communication method using a communication network (for example, a mobile communication network, a wired Internet, a wireless Internet, or a broadcast network) that can be included in network 170, but also short-range wireless communication between devices. For example, network 170 may include any one or more of a personal area network (PAN), a local area network (LAN), a campus area network (CAN), a metropolitan area network (MAN), a wide area network (WAN), a broadband network (BBN), the Internet, etc. Furthermore, network 170 may include any one or more of a network topology including, but not limited to, a bus network, a star network, a ring network, a mesh network, a star-bus network, a tree or hierarchical network, etc.

[0028] Each of the servers 150, 160 may be configured by one or more computer devices that communicate with multiple electronic devices 110, 120, 130, 140 via a network 170 to provide instructions, code, files, content, services, etc. For example, the server 150 may be a system that provides services to multiple electronic devices 110, 120, 130, 140 connected via the network 170.

[0029] 2 is a block diagram showing an example of a computer device according to an embodiment of the present invention. Each of the plurality of electronic devices 110, 120, 130, and 140 and each of the servers 150 and 160 may be configured by a computer device 200 shown in FIG. 2.

[0030] As shown in FIG. 2 , such a computer device 200 may include a memory 210, a processor 220, a communication interface 230, and an input / output interface 240. The memory 210 is a computer-readable recording medium and may include random access memory (RAM), read-only memory (ROM), and a persistent mass storage device such as a disk drive. Here, a persistent mass storage device such as a ROM or a disk drive may be included in the computer device 200 as a separate persistent storage device distinct from the memory 210. The memory 210 may also store an operating system and at least one program code. Such software components may be loaded into the memory 210 from a computer-readable recording medium separate from the memory 210. Such separate computer-readable recording medium may include a computer-readable recording medium such as a floppy drive, a disk, a tape, a DVD / CD-ROM drive, or a memory card. In another embodiment, the software components may be loaded into the memory 210 through a communication interface 230, which is not a computer-readable recording medium. For example, the software components may be loaded into the memory 210 of the computing device 200 based on a computer program installed by a file received over the network 170 .

[0031] Processor 220 may be configured to process computer program instructions by performing basic arithmetic, logic, and input / output operations. The instructions may be provided to processor 220 by memory 210 or by communication interface 230. For example, processor 220 may be configured to execute instructions received according to program code stored in a storage device such as memory 210.

[0032] The communication interface 230 may provide a function for the computer device 200 to communicate with other devices (e.g., the above-mentioned storage device) via the network 170. For example, requests, instructions, data, files, etc. generated by the processor 220 of the computer device 200 in accordance with program code stored in a storage device such as the memory 210 may be transmitted to other devices via the network 170 under the control of the communication interface 230. Conversely, signals, instructions, data, files, etc. from other devices may be received by the computer device 200 via the communication interface 230 of the computer device 200 via the network 170. The signals, instructions, data, etc. received via the communication interface 230 may be transmitted to the processor 220 or the memory 210, and the files, etc. may be recorded on a storage medium (e.g., the above-mentioned permanent storage device) that the computer device 200 may further include.

[0033] The input / output interface 240 may be a means for interfacing with the input / output device 250. For example, the input device may include a device such as a microphone, keyboard, or mouse, and the output device may include a device such as a display or speaker. As another example, the input / output interface 240 may be a means for interfacing with a device that integrates input and output functions into one, such as a touch screen. The input / output device 250 may be configured as a single device together with the computer device 200.

[0034] Also, in other embodiments, computing device 200 may include fewer or more components than those shown in Figure 2. However, most prior art components need not be explicitly shown. For example, computing device 200 may be configured to include at least some of the input / output devices 250 described above, and may further include other components such as a transceiver, a database, etc.

[0035] 3 is a schematic diagram illustrating an example of a RAG configuration system according to an embodiment of the present invention. The RAG configuration system according to this embodiment may be realized in a knowledge platform 300 including at least one computer device 200.

[0036] The knowledge platform 300 may include a generator 310, a retriever 320, a pipeline 330, a message queue 340, and multiple workers 350. The knowledge platform 300 may also be linked to a vector database 360 ​​and an artificial intelligence model 370. The vector database 360 ​​and the artificial intelligence model 370 may utilize at least one of well-known solutions in conjunction with each other. For example, the vector database 360 ​​may utilize at least one of well-known solutions such as OpenSearch or Milvus, and the artificial intelligence model 370 may utilize at least one of well-known solutions such as OpenAI or multilingual-e5.

[0037] Such a knowledge platform 300 may essentially provide a service to a user 380 that enables the user 380 to configure a desired RAG. In one embodiment, the RAG may be easily configured by the user 380 specifying a file path to be configured (for example, by inputting a URL indicating the file path). In another embodiment, the user 380 may configure the RAG by selecting predefined elements (for example, workers described with reference to FIGS. 5 and 6) and setting up a pipeline 330 to configure an advanced RAG. The generator 310 and the retriever 320 may be elements included in the configured RAG.

[0038] In addition, the knowledge platform 300 may generate a response to a query transmitted by the user 380 using the RAG and the artificial intelligence model 370 configured by the user 380 and provide the response to the user 380.

[0039] User 380 may access knowledge platform 300 using a terminal, which is the physical electronic device of user 380. As an example, a computer program such as an application that works with knowledge platform 300 may be installed and executed on the terminal of user 380, and user 380's terminal may access knowledge platform 300 and receive services provided by knowledge platform 300 under the control of the executed computer program. User 380's queries may be input through such a terminal and transmitted to knowledge platform 300.

[0040] In this case, knowledge platform 300 may generate and provide a response to user 380's query using data related to user 380. Here, user 380's data may be data generated and provided by user 380, data collected on a service for user 380 while user 380 uses a particular service, data generated and provided by a service administrator in connection with a service used by user 380, and / or data generated and provided in connection with a service operated by user 380. For example, user 380's data may include user 380's schedule data, contact list, shopping information, etc. In this case, knowledge platform 300 may generate and provide a response to user 380's query using user 380's schedule data, contact list, and / or shopping information. For another example, data may include information regarding instant messages sent and received in connection with user 380's account on an instant messaging service used by user 380 (hereinafter, "chat data"). In this case, the data may include information about the account that sent the instant message, the account that received the instant message, the time the instant message was sent, the time the instant message was received, and / or the content of the instant message. In this case, the knowledge platform 300 may generate and provide a response to the query of the user 380 using the chat data of the user 380. As another example, the data may include customer consultation-related information collected in connection with the customer service (CS) of the service used by the user 380. In this case, the knowledge platform 300 may generate and provide a chatbot and / or assistant for the service using the customer consultation-related information, and the chatbot and / or assistant of the service may provide a response to the query of the user 380 using the customer consultation-related information. As yet another example, the data may include information about products sold by the service operated by the user 380.In this case, knowledge platform 300 may utilize information about the product to generate and provide various responses to user 380 queries related to the product, such as marketing plans and service operation plans.

[0041] The knowledge platform 300 may first index data. For example, the knowledge platform 300 may receive chat data files in text or SQLite format from an instant messaging service. Then, the knowledge platform 300 may analyze the received chat data files (for example, by parsing data in text, CSV, Markdown, and / or image formats) to extract metadata (for example, the time the instant message was sent, the time the instant message was received, the speaker (instant messaging service account), keywords related to the content of the instant message, and / or a summary of the content of the instant message). The knowledge platform 300 may also divide the chat data into chunks (for example, character units and / or semantic units). The knowledge platform 300 may also embed the data in chunks to generate vectors and store the generated vectors in the vector database 360. The chunks of chat data may include information extracted from the data (for example, keywords, summaries, metadata, etc.). The embedding may be performed using well-known solutions such as OpenAI and / or multilingual-e5, while the vector database 360 ​​may utilize well-known solutions such as, but not limited to, OpenSearch and / or Milvus.

[0042] After the vector generated by embedding data is stored in the vector database 360, the knowledge platform 300 may receive a query from the user 380. In this case, the knowledge platform 300 may search the vector database 360 ​​for information related to the query of the user 380. In this case, the knowledge platform 300 may simultaneously utilize multiple search engines (e.g., multiple retrievers) to enhance the search. Table 1 below shows three example search engines.

[0043] [Table 1] Small chunk embedding and metadata embedding may be indexing techniques for indexing user 380 data in different chunk sizes to generate and utilize different vector storage.

[0044] For example, for small chunk embedding, the knowledge platform 300 may embed data in chunk units of a predetermined first chunk size to generate a first vector storage. At this time, a small chunk embedding retriever may search for data associated with a query from the user 380 from the first vector storage. At this time, in small chunk embedding, data may be automatically chunked into chunks of the predetermined first chunk size, but depending on the embodiment, chunking may also be performed in units of propositions using LLM.

[0045] For metadata embedding, the knowledge platform 300 may first extract content that requires inference from data through LLM and store it as metadata. Then, the knowledge platform 300 may embed information including the original text and the metadata to generate a second vector storage. In this case, the second chunk size for metadata embedding may be preset to be larger than the first chunk size for the small chunk embedding. In this case, the metadata embedding retriever may search for data associated with the user 380's query from the second vector storage. For example, the knowledge platform 300 may extract metadata such as "2023-09-18 AAA meeting" from an original text such as "2023-09-15 (Fri) / Hong Gil-dong / AAA meeting next Monday." The knowledge platform 300 may then extract an embedding containing the original text "2023-09-15 (Fri) / Hong Gil-dong / AAA meeting next Monday" and the metadata "2023-09-18 AAA meeting" and store it in the second vector storage. This metadata, such as the date, can improve the accuracy of schedule searches by the metadata embedding retriever. The extracted metadata can also be added to prompts for response generation, improving the performance of the answer generation model.

[0046] As the name suggests, the self-query retriever may be a retriever capable of querying itself. Specifically, when a natural language query is given, the self-query retriever may create a structured query using the LLM chain that constitutes the query, and then apply the structured query to the basis vector database 360. This allows the self-query retriever to not only use the user-input query for semantic similarity comparison with the content of stored documents, but also extract a filter from the user query against the metadata of the stored documents and execute the filter. For example, when a natural language query such as "What was my schedule last week?" is given, the self-query retriever may generate and utilize a metadata filter, which is a structured query such as "2023 / 12 / 12<=date<=2023 / 12 / 18."

[0047] In the example of Table 1, "top_k" may mean the number of search results to import from each retriever. To optimize the performance of a retriever, it is necessary to appropriately determine the number of search results to import from each configured retriever (i.e., "top_k"). The appropriate value of "top_k" may vary depending on the domain or data, even for the same retriever.

[0048] For this reason, it is also possible to tune the "top_k" values ​​through qualitative and / or quantitative evaluation. For example, to utilize qualitative evaluation, the "top_k" values ​​may be adjusted based on the performance evaluation of each retriever for a specific category of question set (such as dates, people, or information). As another example, to utilize quantitative evaluation, the "top_k" values ​​may be tuned based on the performance evaluation of each retriever using a well-known solution (e.g., Ragas (RAG Assessment)) for evaluating LLM-generated text to provide insight into the RAG pipeline.

[0049] Furthermore, although the maximum number of chunks that each retriever can search is "top_k," the number of search results searched by each retriever may be changed to a number less than "top_k" depending on the query. As an example, assuming that a self-query retriever generates and utilizes a filter related to "date," the number of search results for a user query that does not include schedule information may be zero. Furthermore, even if each retriever extracts a maximum of "top_k" search results, search results with low correlation to the query may be excluded by post-processing such as the following:

[0050] - Similarity-based: Among the "top_k" search results, those whose similarity to the query is below a pre-set threshold are excluded.

[0051] - LLM-based: Similarity-based search results can be biased towards certain keywords, resulting in search results that are different from the query in the actual context. To compensate for this, LLM is called to check whether there is a relationship between the query and the search results (each of the "top_k" search results), and search results that are determined to be unrelated are excluded.

[0052] - Recency-based: Each retriever extracts more than 'top_k' search results, and the k most recent data among the extracted search results are used as the search results.

[0053] Such knowledge platform 300 can use data from user 380 to act as an assistant that supports user 380 in making decisions based on the user's 380 experience, knowledge, and analyzed personality. Knowledge platform 300 can also analyze the user's 380 information and patterns and act as an assistant that recommends personalized schedules and information (such as a favorite shopping list, for example).

[0054] Furthermore, in addition to providing a response to a query from user 380, knowledge platform 300 can also execute a function in response to the query. As an example, knowledge platform 300 may be linked to a specific function, tool, etc. Consider a case where knowledge platform 300 is linked to a specific collaboration tool (for example, Slack). Assume that user 380 enters a query such as "Summarize the May schedule and send it to Slack" or "Send next week's schedule in Markdown format to the Slack team_xxx channel." In this case, knowledge platform 300 may not only generate a response and provide it to user 380, but may also summarize the "May schedule" searched for based on the indexed data and send it to the account of linked collaborative user 380, or convert the "next week's schedule" searched for based on the indexed data into Markdown format and send it to the linked collaboration tool "team_xxx channel." As another example, if the knowledge platform 300 is linked to a calendar tool, the knowledge platform 300 may register a schedule retrieved based on the data in the calendar of the user 380 in response to a query by the user 380 .

[0055] 4 is an exemplary diagram showing a pipeline configuration according to an embodiment of the present invention. In the embodiment of FIG. 4, pipeline 330 may link actions in pipeline 330 with workers (such as File Loader, Chunk Splitter, Embedding, and VectorDB) according to the RAG configuration of user 380, and pipeline 330 may use message queue 340 to operate workers in accordance with the order of actions to control the processing of the RAG operations configured by user 380. The embodiment of FIG. 4 illustrates an example in which control is exercised to execute, as a first action in pipeline 330, an operation to load a file associated with a context through a worker "File Loader" linked to the first action.

[0056] FIG. 5 is a diagram showing an example of the configuration of a pipeline for data indexing in one embodiment of the present invention, and FIG. 6 is a diagram showing an example of the configuration of a pipeline for a retriever in an embodiment of the present invention.

[0057] The embodiment of Figure 5 is an example configuration of a pipeline for data indexing, showing Source 510, Parser 520, Extractor 530, Chunk Splitter 540, Embedding 550, and Vector Database 560 workers sequentially coordinating actions in the pipeline 330. Depending on the RAG configuration of the user 380, one or more workers may be removed or new workers may be added.

[0058] The source 510 may refer to a source of data for the user 380. Data exists in various forms, such as a file, a streaming service, a database, or a link, and the pipeline 330 may obtain the data for the user 380 from the source 410, which exists in various forms, through an action linked to the source 510. As described above, the data may be data generated and provided by the user 380, data collected on a service for the user 380 while the user 380 uses a particular service, data generated and provided by a service administrator in connection with a service used by the user 380, or data generated and provided in connection with a service operated by the user 380 himself.

[0059] Parser 520 may be a worker tool for parsing data from user 380. The data may include data in text, Markdown, CSV, and / or image formats, and pipeline 330, with actions associated with parser 520, may utilize parser 520 to parse data in various formats.

[0060] The extractor 530 may be a worker that serves as a tool for extracting keywords, summaries, metadata, etc. from the parsed data of the user 380. The pipeline 330 may use the extractor 530 to extract various information from the data in an action linked to the extractor 530.

[0061] The chunk splitter unit 540 may be a worker that serves as a tool for splitting the data of the user 380 into multiple chunks. The pipeline 330 may use the chunk splitter unit 540 to mechanically or semantically split the data of the user 380 into multiple chunks in an action linked to the chunk splitter unit 540.

[0062] Embedding 550 may be a worker that embeds chunks of user 380 data to generate vectors. As described above, embedding may be performed using at least one of well-known solutions such as OpenAI and multilingual-e5. Pipeline 330 may embed chunks of user 380 data in actions linked to embedding 550 to generate vectors for each chunk.

[0063] The vector database 560 may be a worker for storing the vectors generated by the embedding 550, and may store the vectors in the vector database 360 ​​described above. As described above, the vector database 360 ​​may utilize at least one of well-known solutions such as OpenSearch and Milvus, but is not limited to these. The pipeline 330 may store the vectors generated by the embedding 550 in the vector database 360 ​​in an action linked to the vector database 560.

[0064] The user 380 can coordinate actions for data indexing with such various workers, and process the process of indexing the user's 380 data through the workers according to the order of the actions.

[0065] The embodiment of Figure 6 is an example configuration of a pipeline for a retriever, showing the Embedding 610, Vector Database 620, Retriever 630, and PreProcessor 640 workers sequentially coordinating actions in the pipeline 330. Depending on the RAG configuration of the user 380, at least one worker may be removed or a new worker may be added.

[0066] Embedding 610 may be a worker that embeds a query of user 380 to generate a vector. Pipeline 330 may embed a query of user 380 in an action linked to embedding 650 to generate a vector for the query.

[0067] Vector database 620 may be a worker for storing vectors generated for queries in vector database 360.

[0068] The retriever 630 may be a worker for searching the vector database 360 ​​using vectors for a user's 380 query to obtain search results.

[0069] The preprocessing unit 640 may be a worker for adjusting the ranking of search results retrieved through the retriever 630 or generating a summary of the search results.

[0070] User 380 can coordinate actions in the pipeline for these various workers and retrievers, and process the process of retrieving user 380's data corresponding to user 380's query through the workers according to the order of actions.

[0071] The knowledge platform 300 can provide a user interface for a user 380 to select predefined workers to configure the pipeline 330 .

[0072] 7 to 9 are diagrams showing examples of user interfaces for RAG configuration in one embodiment of the present invention.

[0073] FIG. 7 shows an example of a user interface in which a user 380 logs in by pressing the "Login" button after entering a user name (for example, the user name "Kim" entered in the "User" field in FIG. 7). The user interface in FIG. 7 shows an area for displaying the knowledge pipeline settings (for example, the "Spec" field area in FIG. 7), an area for the user 380 to enter a query (for example, the "Query" field area in FIG. 7), and a button for starting a search for the user 380's query (for example, the "Retriever" button in FIG. 7). The user interface in FIG. 7 also shows an area for displaying the results of the search for the user 380's query (for example, the "Result" field area in FIG. 7).

[0074] 8 shows an example of a user interface for user 380 to generate a knowledge pipeline. The user interface in FIG. 8 shows an area for inputting the name of the knowledge pipeline (for example, the area in the "Name" field in FIG. 8), an area for user 380 to input a file path for RAG configuration (for example, the area in the "Source (url)" field in FIG. 8), an area for inputting a description of the knowledge pipeline (for example, the area in the "Description" field in FIG. 8), and a button for starting generation of the knowledge pipeline (for example, the "Generate" button in FIG. 8). When user 380 selects the "Generate" button after inputting information in the "Generator" tab in FIG. 8, a knowledge pipeline based on the input information may be generated.

[0075] Figure 9 shows an example of a user interface containing information about a knowledge pipeline created by a user 380. After the user 380 selects the knowledge pipeline created by the user 380 from the "Knowledge Select" item in Figure 9, the user 380 waits until the "Status" becomes "SUCCESS." If necessary, the user 380 can re-query the knowledge pipeline via the "Refresh" button.

[0076] When "Status" becomes "SUCCESS", user 380 may start a search for user 380's query through an area for user 380 to input a query (for example, the "Query" item area in FIG. 9) and a button for starting a search for user 380's query (for example, the "Retriever" button in FIG. 9). Search results for the query may be displayed in an area for displaying search results (for example, the "Result" item area in FIG. 9).

[0077] If desired, the user 380 can regenerate the knowledge pipeline by selecting the "Update and Regenerate" button after modifying the knowledge pipeline settings.

[0078] Table 2 below shows an example of a knowledge pipeline configuration.

[0079] [Table 2] TIFF2025169153000004.tif229167TIFF2025169153000005.tif228168TIFF2025169153000006.tif111168FIG. 10 is a flowchart illustrating an example of a RAG configuration method according to an embodiment of the present invention. The RAG configuration method according to this embodiment may be executed by at least one computer device 200. In this case, processor 220 of computer device 200 may be configured to execute control instructions from operating system code and at least one computer program code contained in memory 210. Here, processor 220 may control computer device 200 to perform steps 1010 to 1040 included in the method of FIG. 10 in accordance with the control instructions provided by code recorded on computer device 200.

[0080] In step 1010, the computer device 200 may provide the user with a user interface that allows the user to input a file path for configuring the RAG or to select a predefined element for configuring the RAG. An example of providing a user interface for inputting a URL as a file path for configuring the RAG has been described in FIG. 5 and FIG. 6. Also, examples of selecting a predefined element to configure a pipeline have been described in FIG. 8.

[0081] In step 1020, the computer device 200 may construct a RAG for the user using a file obtained through a file path entered via a user interface or elements selected by the user from among elements predefined via the user interface. As an example, the computer device 200 may construct a knowledge pipeline for the RAG by linking elements included in the obtained file or elements selected by the user to actions in a pipeline. As an example, the computer device 200 may construct a first pipeline with a combination of first elements for indexing the user's data and a second pipeline with a combination of second elements for searching the user's data in response to a user query.

[0082] In one embodiment, the first element may include two or more of an element for acquiring user data, an element for parsing the user data, an element for extracting at least one of keywords, summaries, and metadata from the user data, an element for dividing the user data into chunks, an element for embedding the user data to generate vectors, and an element for storing the embedded vectors in a vector database. The second element may include two or more of an element for embedding a user query to generate vectors, an element for storing the generated vectors in the vector database, an element for searching the vector database using the generated vectors to obtain search results, and an element for preprocessing the searched search results. Here, the element for preprocessing the searched search results may include an element for adjusting the ranking of the searched search results or generating a summary of the search results.

[0083] According to an embodiment, the computer device 200 may configure a RAG including a plurality of different retrievers in step 1030. Here, the plurality of retrievers may include two or more of: a first retriever that searches for data corresponding to the embedded user query from a first vector database configured by dividing user data into first chunk units having a predetermined first chunk size and embedding the data; a second retriever that searches for data corresponding to the embedded user query from a second vector database configured by dividing user data into second chunk units having a second chunk size larger than the first chunk size and embedding the data; and a third retriever that generates a structured query for the query using an artificial intelligence model and searches the vector database. Here, the second vector database may be configured by embedding metadata extracted from the data divided into second chunk units using an artificial intelligence model and the data divided into second chunk units.

[0084] In step 1030, the computer device 200 may generate a response to a user query input via the user interface using the configured RAG and artificial intelligence model, by sequentially operating workers corresponding to elements linked to the actions in accordance with the order of the actions in the knowledge pipeline.

[0085] In step 1040, the computing device 200 may provide the generated response to the user via the user interface. It has been described above that the response to the user's query is displayed via the "Result" item in Figures 7 and 9.

[0086] Thus, according to an embodiment of the present invention, users can easily configure RAGs by combining and configuring elements of standardized processes for RAG configuration without coding, and functions that can be immediately used for searches can be provided.

[0087] The above-described systems or devices may be configured using hardware components or a combination of hardware and software components. For example, the devices and components described in the embodiments may be implemented by one or more general-purpose or special-purpose computers, such as a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA), a programmable logic unit (PLU), a microprocessor, or various devices capable of executing and responding to instructions. The processing device may execute an operating system (OS) and one or more software applications running on the OS. The processing device may also access, record, manipulate, process, and generate data in response to the execution of the software. For ease of understanding, a single processing device may be described. However, those skilled in the art will understand that a processing device may include multiple processing elements and / or multiple types of processing elements. For example, a processing device may include multiple processors or one processor and one controller. Other processing configurations, such as parallel processors, are also possible.

[0088] Software may include computer programs, codes, instructions, or a combination of one or more of these, which may configure a processing device to operate as desired or may independently or collectively instruct the processing device. The software and / or data may be embodied in any type of machine, component, physical device, virtual device, computer storage medium, or device to be interpreted by the processing device or to provide instructions or data to the processing device. The software may be distributed and stored and executed in a distributed manner on computer systems connected by a network. The software and data may be stored on one or more computer-readable storage media.

[0089] Methods according to embodiments may be implemented in the form of program instructions executable by various computer means and recorded on a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, and the like, alone or in combination. The medium may continuously record a computer-executable program or may temporarily record the program for execution or download. The medium may also be various recording or storage means in the form of a single piece of hardware or multiple pieces of hardware, and may be directly connected to a computer system or distributed over a network. Examples of media include magnetic media such as hard disks, floppy disks, and magnetic tapes; optical media such as CD-ROMs and DVDs; magneto-optical media such as floptical disks; and media configured to record program instructions, such as ROM, RAM, and flash memory. Other examples of media include recording media or storage media managed by app stores that distribute applications, or by websites or servers that provide or distribute various software. Examples of program instructions include not only machine language code, such as that generated by a compiler, but also high-level language code executed by a computer using an interpreter or the like.

[0090] Although the embodiments have been described above based on limited examples and drawings, those skilled in the art will appreciate that various modifications and variations may be made from the above description. For example, the described techniques may be performed in an order different from that described, and / or the described system, structure, device, circuit, or other element may be coupled or combined in a manner different from that described, or may be substituted or replaced by other elements or equivalents, and still achieve suitable results.

[0091] Therefore, different embodiments are within the scope of the appended claims, provided that they are equivalent to the claims.

[0092] This application claims priority based on Patent Application No. 10-2024-057658 filed with the Korean Intellectual Property Office on April 30, 2024, the entire contents of which are incorporated herein by reference. [Explanation of symbols]

[0093] 110 Electronic equipment 120 Electronic equipment 130 Electronic equipment 140 Electronic equipment 150 servers 160 servers 170 Network 200 Computer Equipment 210 memory 220 processors 230 Communication Interface 240 Input / Output Interface 250 Input / Output Devices 300 Knowledge Platform 310 Generator 320 Retriever 330 Pipeline 340 Message Queue 350 workers 360 Vector Database 370 Artificial Intelligence Models 380 users 510 Source 520 Parser 530 Extraction part 540 Chunk Splitter 550 embeds 560 Vector Database 610 Embedded 620 Vector Database 630 Retriever 640 Pretreatment section

Claims

1. 1. A method for RAG configuration in a computer device including at least one processor, comprising: providing, by the at least one processor, a user interface to the user that allows the user to input a file path for configuring the RAG or to select predefined elements for configuring the RAG; constructing, by the at least one processor, a RAG for the user using files obtained through a file path entered via the user interface or elements selected by the user from among the predefined elements via the user interface; generating, by the at least one processor, a response to the user query entered via the user interface utilizing the configured RAG and an artificial intelligence model; providing, by the at least one processor, the generated response to the user via the user interface; A RAG configuration method comprising:

2. The step of configuring the RAG includes: constructing a knowledge pipeline for the RAG by linking elements contained in the retrieved file or the selected elements to actions in a pipeline; The step of generating a response comprises:

2. The RAG configuration method according to claim 1, further comprising the step of operating workers corresponding to elements linked to said actions in order according to the order of actions in said knowledge pipeline.

3. The step of configuring the RAG includes: constructing a first pipeline with a combination of first elements for indexing the user's data; constructing a second pipeline by combining second elements to search for the user's data in response to the user's query; The RAG configuration method of claim 1 , comprising:

4. 4. The RAG configuration method of claim 3, wherein the first element includes two or more of an element for obtaining the user's data, an element for parsing the user's data, an element for extracting at least one of keywords, summaries, or metadata from the user's data, an element for dividing the user's data into a plurality of chunks, an element for embedding the user's data to generate vectors, and an element for storing the embedded vectors in a vector database.

5. 4. The RAG configuration method of claim 3, wherein the second element includes two or more of an element for embedding the user's query to generate a vector, an element for storing the generated vector in a vector database, an element for searching the vector database using the generated vector to obtain search results, and an element for preprocessing the search results.

6. The RAG configuration method of claim 5, wherein the element for preprocessing the searched search results includes an element for adjusting a ranking of the searched search results or generating a summary of the search results.

7. The step of configuring the RAG includes:

2. The method of claim 1, further comprising: configuring a RAG that includes a plurality of different retrievers.

8. The plurality of retrievers include: a first retriever that searches for data corresponding to the embedded user query from a first vector database configured by dividing the user data into first chunk units of a predetermined first chunk size and embedding the data; a second retriever that searches for data corresponding to the embedded user query from a second vector database configured by dividing the user data into second chunk units having a second chunk size larger than the first chunk size and embedding the data; 10. The RAG configuration method of claim 7, further comprising: a third retriever that searches the vector database by generating structured queries utilizing an artificial intelligence model.

9. The RAG construction method of claim 8, wherein the second vector database is constructed by embedding metadata extracted from the data divided into the second chunk units using an artificial intelligence model and the data divided into the second chunk units.

10. A program for causing a computer device to execute the RAG configuration method according to any one of claims 1 to 9 in combination with the computer device.

11. A computer-readable recording medium having recorded thereon a program for causing a computer device to execute the RAG configuration method according to any one of claims 1 to 9.

12. at least one processor configured to execute computer-readable instructions; by the at least one processor providing a user interface that allows the user to input file paths for configuring the RAG or to select predefined elements for configuring the RAG; constructing a RAG for the user using a file obtained through a file path input via the user interface or an element selected by the user from among the predefined elements via the user interface; generating a response to the user's query input via the user interface utilizing the configured RAG and artificial intelligence model; and providing the generated response to the user via the user interface.

13. constructing, by the at least one processor, a knowledge pipeline for the RAG by linking elements contained in the retrieved file or the selected elements to actions in a pipeline to construct the RAG; 13. The computer system of claim 12, wherein the at least one processor sequentially operates workers corresponding to elements associated with actions in accordance with an order of actions in the knowledge pipeline to generate the response.

14. by the at least one processor to configure the RAG; forming a first pipeline with a combination of first elements for indexing the user's data; The computer device according to claim 12, wherein a second pipeline is configured by a combination of second elements for searching the user's data in response to the user's query.

15. 15. The computer apparatus of claim 14, wherein the first component comprises two or more of: a component for obtaining the user's data; a component for parsing the user's data; a component for extracting at least one of keywords, summaries, or metadata from the user's data; a component for dividing the user's data into chunks; a component for embedding the user's data to generate vectors; and a component for storing the embedded vectors in a vector database.

16. 15. The computer device of claim 14, wherein the second element includes two or more of an element for embedding the user's query to generate a vector, an element for storing the generated vector in a vector database, an element for searching the vector database using the generated vector to obtain search results, and an element for preprocessing the search results.

Citation Information

Patent Citations

  • Server and method for providing AI chatbot tutor for complete learning-based personalized learning support

    KR102648139B1