Method and system for permission based access control in retrieval augmented generation using large language model

KR103020293B1Active Publication Date: 2026-09-16POUNT CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
KR1020250139503
Authority / Receiving Office
KR · KR
Patent Type
Patents
Current Assignee / Owner
Filing Date
2025-09-26
Publication Date
2026-09-16
Estimated Expiration
2045-09-26

Smart Images

  • Figure 112025110015234-PAT00001_ABST
    Figure 112025110015234-PAT00001_ABST
Patent Text Reader

Abstract

A permission-based search augmentation generation (RAG) access control method using a large-scale language model (LLM) is disclosed, comprising the steps of: granting permission metadata defining an access control policy for each document in documents stored in a vector database; receiving a user's query from a user device; obtaining user's held permission information; searching the vector database based on the held permission information to extract context related to the query from documents accessible to the user; generating an answer to the query based on the extracted context using a large-scale language model (LLM); and transmitting the answer to the query to the user device.
Need to check novelty before this filing date? Find Prior Art

Description

Technology Field

[0001] The present invention relates to a method and system for access control of access to Search Augmented Generation (RAG) based on authority using a Large Language Model (LLM), and more specifically, to a technology that dynamically controls the range of information accessible according to user authority by combining Large Language Model (LLM) and Search Augmented Generation (RAG) technology. Background Technology

[0002] Large-scale Language Models (LLMs) demonstrate human-like language proficiency by learning from vast amounts of text data; however, they suffer from a "knowledge cut-off," a limitation in which they cannot generate answers regarding up-to-date information not included in the training data, specialized knowledge in specific domains, or internal corporate data. To overcome this limitation, Retrieval-Augmented Generation (RAG) technology is being actively researched. When a user query is entered, a RAG system searches for highly relevant information in real-time from external knowledge bases (e.g., internal corporate documents, specialized databases) and provides it to the LLM. Through this, the LLM can generate more accurate and reliable answers based on the latest retrieved information.

[0003] However, current general RAG systems process all user queries against a unified knowledge base, so they lack information filtering capabilities that consider user access rights. Consequently, the introduction of RAG systems in industries handling sensitive information, such as finance, healthcare, and law, can lead to serious security issues.

[0004] Accordingly, there is a need for RAG access control technology that can provide information efficiently and securely by reflecting user-specific access rights in real time. Prior art literature

[0005] Korean Registered Patent No. 10-2710159 (September 23, 2024) The problem to be solved

[0006] The present invention aims to provide a permission-based search augmentation generation (RAG) access control method and a system using a large-scale language model (LLM). means of solving the problem

[0007] As a technical means for achieving the above-mentioned objective, the first aspect of the present invention may provide an access control method for authorization-based search augmentation generation (RAG) using a large-scale language model (LLM), comprising the steps of: granting authorization metadata defining an access control policy for each document in documents stored in a vector database; receiving a user's query from a user device; obtaining user's retained authorization information; searching the vector database based on the retained authorization information to extract context related to the query from among documents accessible to the user; generating an answer to the query based on the extracted context using a large-scale language model (LLM); and transmitting the answer to the query to the user device.

[0008] Additionally, authorization metadata may include at least one of the user's role, security level, and subscription level.

[0009] In addition, by embedding the user's query to convert it into a query vector and searching the vector database using permission information as a filtering condition, the query vector and cosine similarity are compared among the documents accessible to the user, and a predetermined number of contexts can be extracted based on the ranking of high cosine similarity resulting from the comparison.

[0010] Additionally, the method may further include the step of sending a response to the user device indicating that there is no access right if the user cannot find a document accessible by searching the vector database based on the held permission information.

[0011] Additionally, the method may further include a step of recording a log containing the user's identifier (ID), query, extracted context, and generated answer after the step of transmitting the answer to the user device.

[0012] In addition, when requesting user authorization information from the authentication server, the authentication server verifies the user's identity and can receive authorization information from the authentication server.

[0013] A second aspect of the present invention may provide a computer-readable storage medium having a program recorded thereon for executing the method of the first aspect on a computer. Effects of the invention

[0014] Since only information corresponding to the user's authority is provided to the LLM as context, this invention fundamentally prevents the risk of the LLM learning unauthorized information or including it in answers. This provides the advantageous effect of enabling the safe utilization of RAG systems even in strictly regulated domains such as finance and healthcare.

[0015] In addition, since access is controlled solely by metadata filtering within a single vector database without the need to build separate databases for each privilege level, it has the advantage of preventing data duplication and significantly reducing system management costs.

[0016] In addition, when a user's role or subscription level changes, updating only the information on the authentication server immediately reflects the changes in the RAG system's access control without the need for separate database modifications, which offers the advantage of easy maintenance.

[0017] In addition to controlling access to internal information such as user roles and affiliations, it is possible to assign subscription tiers as metadata based on the value of information and differentiate the depth and scope of accessible information according to the user's payment status, thereby directly contributing to enhancing the system's usability and business value by creating new revenue models for AI services.

[0018] Furthermore, by logging which user attempted to access which information with what authority and obtaining results for every query, it is possible to satisfy security audit and regulatory compliance requirements demanded by the financial sector and others. Brief explanation of the drawing

[0019] FIG. 1 is a diagram illustrating an example of providing a privilege-based search augmentation generation (RAG) access control system according to one embodiment. FIGS. 2 and 3 are flowcharts illustrating a permission-based search augmentation generation (RAG) access control method according to one embodiment. FIG. 4 is a diagram showing an example of controlling access by user role according to one embodiment. FIG. 5 is a diagram showing an example of differentiating services according to a user's subscription grade according to one embodiment. FIG. 6 is a block diagram illustrating the configuration of a query processing server according to one embodiment. Specific details for implementing the invention

[0020] The invention will be described in detail below by way of exemplary embodiments with reference to the attached drawings. The following embodiments are intended only to embody the invention and do not limit or restrict the scope of the invention. Anything that can be easily inferred by a person skilled in the art to which the invention pertains from the detailed description and embodiments shall be interpreted as falling within the scope of the invention.

[0021] Terms such as 'composed' or 'comprising' as used in this specification should not be interpreted as necessarily including all of the various components or steps, and should be interpreted as some of the components or steps may not be included, or additional components or steps may be included.

[0022] The terms used in this specification are described in their current, general form considering the functions mentioned herein; however, they may refer to various other terms depending on the intent of those skilled in the art, case law, the emergence of new technologies, etc. Therefore, the terms used in this specification should not be interpreted solely by their names, but should be interpreted based on the meaning of the terms and the overall content of this specification. Furthermore, singular expressions include a plural meaning unless the context clearly indicates a singular meaning.

[0023] The terms “above” and similar designations used in this specification (particularly in the claims) may indicate both singular and plural forms. Furthermore, unless there is a description explicitly specifying the order of the steps describing the method according to this specification, the described steps may be performed in a suitable order. The present invention is not limited by the order in which the described steps are described.

[0024] Phrases such as "in one embodiment" appearing in various places in this specification do not necessarily refer to the same embodiment.

[0025] Some embodiments of this specification may be represented by functional block configurations and various processing steps. Some or all of these functional blocks may be implemented by various numbers of hardware and / or software configurations that execute specific functions.

[0026] Furthermore, the connecting lines or connecting members between the components depicted in the drawings are merely illustrative of functional connections and / or physical or circuit connections. In the actual device, connections between components may be represented by various alternative or added functional connections, physical connections, or circuit connections.

[0027] The present embodiments relate to a privilege-based search augmentation generation (RAG) access control method and system using a Large Language Model (LLM), and detailed descriptions of matters widely known to those skilled in the art to which the following embodiments belong are omitted. The present invention will be described in detail below with reference to the attached drawings.

[0028] Preferred embodiments of the present invention will be described in detail below with reference to the drawings.

[0029] FIG. 1 is a diagram illustrating an example of providing a privilege-based search augmentation generation (RAG) access control system according to one embodiment.

[0030] Active research is being conducted to provide users with accurate and highly reliable answers by combining Large Language Models (LLM) and Retrieval-Augmented Generation (RAG) technologies; however, the introduction of such technologies in industries handling sensitive information, such as finance, healthcare, and law, can lead to serious security issues. Current general RAG systems process all user queries against a unified knowledge base, resulting in a lack of information filtering capabilities that consider user access rights. For example, if a user named A asks a question about a top-secret financial report for which they do not have viewing rights, the system may search for the content and generate an answer simply because the document exists in the knowledge base, potentially leading to a serious data leakage incident.

[0031] To address these issues, methods such as instance separation—which involves building separate RAG indexes (vector databases) for each permission level—and post-filtering—which checks permissions retrospectively for search results—have been discussed. However, the former suffers from the problem of exponentially increasing data redundancy and management costs, while the latter leads to performance degradation where essential documents are pushed down the rankings and fail to be found due to unauthorized entries during the search phase. Therefore, an advanced RAG access control system is required that can provide information efficiently and securely by reflecting user-specific access permissions in real-time while maintaining a single knowledge base.

[0032] As illustrated in FIG. 1, when a user logs into an authentication service, obtains an authorization token, and enters a query, vector data can be searched using the user's held authorization information (e.g., authorization token) as a filtering condition, thereby returning a document context that is highly relevant to the query among the documents accessible to the user stored in the vector database. A system can be provided that inputs this context-augmented document and the user's query into a large-scale language model (LLM) to generate an answer to the user's query and transmits the answer to the user through a user interface.

[0033] In one embodiment, the system may include a user device, a query processing server (100), an authentication server, a vector database, and a large-scale language model (LLM) server.

[0034] The user device may be, but is not limited to, a smartphone, tablet PC, PC, smart TV, mobile phone, PDA (personal digital assistant), laptop, media player, e-book reader, digital broadcasting terminal, navigation, kiosk, MP3 player, digital camera, home appliance, and other mobile or non-mobile computing devices. Additionally, the user device may be a wearable device such as a watch, glasses, hair band, and ring equipped with communication and data processing functions. However, it is not limited thereto, and the user device may include any type of device capable of transmitting and receiving information to and from other devices or systems to input a query and receive an answer to the query. For example, the user device may provide an interface, such as a web browser or a mobile app, through which the user inputs a natural language query and checks the final answer.

[0035] The query processing server (100), authentication server, and large-scale language model (LLM) server may be computing devices such as servers and microservers, but are not limited thereto, and may include all types of devices capable of transmitting and receiving information to and from other devices or systems to provide answers through access restriction of information based on authority using large-scale language model (LLM) and search augmentation generation (RAG) technologies.

[0036] The query processing server (100) can serve as the core brain of the system and may be configured to include an authorization verification module, a vector search module, a response generation module, and a logging module.

[0037] The authentication server can be linked with OAuth 2.0, LDAP, or an internal IAM (Identity and Access Management) system to verify the identity (Authentication) when a user logs in, and provide the user's authority information (Authorization), such as their role, affiliation, and subscription level, to the query processing server (100).

[0038] A vector database is a space where documents serving as sources of knowledge are broken down into text chunks and stored along with embedding vectors. Each vector carries associated authorization metadata. For example, metadata such as {'access_role': 'finance_team', 'security_level': 2} is tagged to each text chunk vector. For instance, vector databases that support metadata filtering, such as Pinecone and Weaviate, can be used.

[0039] An LLM server can receive a prompt containing context information along with a query and generate a final answer using a Large Language Model (LLM).

[0040] User devices, query processing servers (100), authentication servers, vector databases, and / or large-scale language model (LLM) servers within the system may communicate with other devices through a predetermined network. In this case, the network includes a Local Area Network (LAN), a Wide Area Network (WAN), a Value Added Network (VAN), a mobile radio communication network, a satellite communication network, and combinations thereof, and is a data communication network in a comprehensive sense that enables each network constituent entity to communicate smoothly with one another, and may include wired internet, wireless internet, and mobile wireless communication networks. Wireless communication may include, for example, wireless LAN (Wi-Fi), Bluetooth, Bluetooth Low Energy, Zigbee, WFD (Wi-Fi Direct), UWB (ultra wideband), infrared communication (IrDA, infrared Data Association), NFC (Near Field Communication), but is not limited thereto. In particular, the query processing server (100) and the user device can exchange messages with each other in natural language through a conversational interface. In one embodiment, the conversational interface may be in the form of a text-based chat application, a voice recognition interface, or a widget embedded in an existing digital platform of a financial institution.

[0041] FIGS. 2 and 3 are flowcharts illustrating a permission-based search augmentation generation (RAG) access control method according to one embodiment.

[0042] In step S210, for documents stored in the vector database, authorization metadata defining an access control policy for each document may be assigned. In one embodiment, the authorization metadata may include at least one of a user's role, security level, and subscription tier. For example, the authorization metadata may include a role for role-based access control (RBAC), a security level for attribute-based access control (ABAC), and a subscription tier for service differentiation.

[0043] In step S220, a user's query can be received from a user device. For example, a query entered by a user through a conversational interface on various client terminals, such as a smartphone, web browser, or AI speaker, can be collected.

[0044] As shown in Fig. 3, when a user inputs a query through a user device, a query processing server receives the query.

[0045] In step S230, information regarding the user's held authority can be obtained. In one embodiment, when a query processing server requests information regarding the user's held authority from an authentication server, the authentication server verifies the user's identity and can receive information regarding the held authority from the authentication server. As illustrated in FIG. 3, the authority verification module of the query processing server can request the authentication server to obtain the identity of the user and information regarding the held authority (e.g., {'user_id': 'user_A', 'role': 'finance_team', 'subscription': 'premium'}).

[0046] In step S240, context related to the query can be extracted from documents accessible to the user by searching a vector database based on the user's access rights information. In one embodiment, the user's query is embedded and converted into a query vector, and the cosine similarity between the query vector and the documents accessible to the user is compared by searching a vector database using the user's access rights information as a filtering condition, and a predetermined number of contexts can be extracted according to the ranking of the cosine similarity as a result of the comparison.

[0047] As illustrated in Fig. 3, the vector search module of the query processing server embeds the user's query and converts it into a query vector. Subsequently, it requests a search from the vector database, including the user's access rights information as a filtering condition. For example, in the case of user 'user_A', the search query is configured to find "a vector that has high similarity to the query vector and whose metadata 'access_role' is 'finance_team'." Through this process, data that the user cannot access is excluded from the search results at the source (pre-filtering).

[0048] And the vector database returns the top K text fragments (context information) with the highest cosine similarity to the query vector among the vectors satisfying the filtering conditions.

[0049] In one embodiment, if a document accessible to the user cannot be found by searching a vector database based on the retained permission information, a response indicating that there is no access permission can be sent to the user device. As illustrated in FIG. 3, if there is no valid context information in the search results (if the query is filtered because it asks for information outside the permission), a response such as "Relevant information could not be found or there is no access permission" is generated and sent to the user, and the process is terminated.

[0050] In step S250, a large-scale language model (LLM) can be used to generate an answer to a query based on the extracted context. As illustrated in FIG. 3, when valid context information is extracted, the response generation module of the query processing server combines the original query and the extracted context information to construct a prompt and transmits it to the LLM server. The large-scale language model (LLM) generates an answer based only on the authorized context.

[0051] In step S260, an answer to the query can be transmitted to the user device. The query processing server and the user device can communicate through a predetermined network. In this case, the network includes a Local Area Network (LAN), a Wide Area Network (WAN), a Value Added Network (VAN), a mobile radio communication network, a satellite communication network, and combinations thereof, and is a data communication network in a comprehensive sense that enables each network constituent entity to communicate smoothly with one another, and may include wired internet, wireless internet, and mobile wireless communication networks.

[0052] After step S260, a log including the user's identifier (ID), query, extracted context, and generated answer can be recorded. The logging module of the query processing server can record a series of processes, such as the user's identifier, query content, extracted context, and generated answer, and utilize them for audit trails.

[0053] FIG. 4 is a diagram showing an example of controlling access by user role according to one embodiment.

[0054] In one embodiment, FIG. 4 illustrates a control scenario for internal corporate information. In this case, the vector database may store documents such as [Common] Business Regulations, [Finance Team Only] Q4 Financial Outlook, and [HR Team Only] Performance Evaluation Guide. The following permission metadata is assigned to the text fragments of each document.

[0055] - Work rule snippet: {'access_role': 'all_employees'}

[0056] - Q4 Financial Outlook Fragment: {'access_role': 'finance_team', 'CEO'}

[0057] - Performance evaluation guide fragment: {'access_role': 'hr_team', 'CEO'}

[0058] For example, if User 1 holds the authority {'access_role': 'CEO'} as a member of the executive team and User 2 holds the authority {'access_role': 'engineering_team'} as an engineer in the technical team, both users can query the same Q4 financial outlook. In the case of User 1, the filter={'access_role': 'CEO'} condition is added during the vector search. The system can search the [Finance Team Only] quarterly earnings report and generate an accurate answer, such as "The Q4 revenue target achievement rate is 105%." On the other hand, in the case of User 2, the filter={'access_role': 'engineering_team'} condition is added during the vector search. Since there are no relevant documents matching this condition, no context is extracted. Therefore, the system may respond, "You do not have access to that information."

[0059] FIG. 5 is a diagram showing an example of differentiating services according to a user's subscription grade according to one embodiment.

[0060] In one embodiment, FIG. 5 illustrates a differentiation scenario for an investment information service based on subscription grades. In this case, the vector database stores [free] public news articles, [paid] market analysis reports, and [premium] private analyst notes. Each data piece is assigned the following permission metadata.

[0061] - News article fragment: {'subscription_tier': 'free'}

[0062] - Market Analysis Report Fragment: {'subscription_tier': 'paid'}

[0063] - Analyst Note Fragment: {'subscription_tier': 'premium'}

[0064] For example, if User A is a free member with the 'subscription_tier': 'free'} and User B is a premium member with the 'subscription_tier': 'premium'}, both users can ask the same question: “What is the future stock price outlook for Company A, which possesses advanced AI technology?” In the case of User A, the condition filter={'subscription_tier': 'free'} is applied during the vector search. Based solely on [Free] publicly available news articles, a general answer such as “Recently, Company A has been showing a positive news trend due to the launch of a new product.” On the other hand, in the case of User B, the condition filter={'subscription_tier__in': ['free', 'paid', 'premium']}, which includes all accessible tiers, is applied during the vector search. The system searches through news, market analysis reports, and even [Premium] private analyst notes to provide a much deeper and differentiated answer, such as “Although the news is positive, internal analyst analysis indicates a risk to short-term cash flow, so we are lowering the target stock price by 10%.”

[0065] FIG. 6 is a block diagram illustrating the configuration of a query processing server according to one embodiment.

[0066] As illustrated in FIG. 6, in one embodiment of the present invention, a query processing server (100) may include a control unit (130), a communication unit (150), and a memory (170). However, not all of the illustrated components are essential components. The query processing server (100) may be implemented with more components than those illustrated, or with fewer components. The above components will be examined in turn below.

[0067] The control unit (130) typically controls the overall operation of the query processing server (100). The control unit (130) may be equipped with at least one processor. Depending on its function and role, the control unit (130) may include multiple processors or a single processor in an integrated form. A processor may primarily refer to a central processing unit (CPU), an application processor (AP), a graphics processing unit (GPU), etc. Additionally, the CPU, AP, or GPU may include one or more cores within it, and the CPU, AP, or GPU may operate using an operating voltage and a clock signal. However, while the CPU or AP is composed of a few cores optimized for serial processing, the GPU may be composed of thousands of smaller and more efficient cores designed for parallel processing.

[0068] For example, the control unit (130) can control the output unit (not shown), the communication unit (150), etc., by executing programs stored in the memory (170). The control unit (130) can control the communication unit (150) to transmit and receive information with external devices.

[0069] The communication unit (150) may include one or more components that enable the query processing server (100) to communicate with an external device. The external device may be a computing device such as the query processing server (100), but is not limited thereto.

[0070] The memory (170) stores data that supports various functions of the control unit (130). The memory (170) can store a number of application programs (or applications) running on the control unit (130), data for the operation of the control unit (130), and instructions. At least some of these application programs may be downloaded from an external device or another server via wireless communication. Additionally, the application programs may be stored in the memory (170), installed on the control unit (130), and driven by a processor to perform the operation (or function) of the control unit (130).

[0071] The memory (170) may include at least one type of storage medium among flash memory type, hard disk type, SSD type (Solid State Disk type), SSD type (Silicon Disk Drive type), multimedia card micro type, card type memory (e.g., SD or XD memory, etc.), RAM (random access memory; RAM), SRAM (static random access memory), ROM (read-only memory; ROM), EEPROM (electrically erasable programmable read-only memory), PROM (programmable read-only memory), magnetic memory, magnetic disk, and optical disk. Additionally, the memory (170) may include web storage that performs storage functions over the internet.

[0072] A query processing server (100) according to another embodiment of the present invention, as described above with reference to FIG. 1, can perform the role of the core brain of the system and can be implemented to include an authority verification module, a vector search module, a response generation module, and a logging module. The software modules of the aforementioned agent may correspond to the hardware modules of FIG. 6, for example, the control unit (130) may include an authority verification module, a vector search module, and a response generation module, and the memory (170) may include a logging module.

[0073] The present invention described above can be modeled as computer-readable code on a medium on which a program is recorded. A computer-readable medium includes all types of recording devices in which data that can be read by a computer system is stored. Examples of computer-readable media include HDD (Hard Disk Drive), SSD (Solid State Disk), SSD (Silicon Disk Drive), ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, etc., and also include being modeled in the form of a carrier wave (e.g., transmission over the Internet).

[0074] Meanwhile, the configuration of the query processing server (100) illustrated in FIG. 6 is an example, and each component of the query processing server (100) may be integrated, added, or omitted according to the specifications of the implemented query processing server (100). That is, as needed, two or more components may be combined into a single component, or a single component may be subdivided into two or more components. Furthermore, the functions performed by each component (or module) are for the purpose of explaining the examples, and the specific operations or devices thereof do not limit the scope of the present invention.

[0075] Meanwhile, the embodiments of the present invention described above can be written as a program executable on a computer and can be implemented on a general-purpose digital computer that operates the program using a computer-readable recording medium.

[0076] The above computer-readable recording media includes storage media such as magnetic storage media (e.g., ROM, floppy disk, hard disk, etc.) and optical reading media (e.g., CD-ROM, DVD, etc.).

[0077] Although embodiments of the present invention have been described above with reference to the attached drawings, those skilled in the art will understand that the present invention may be implemented in other specific forms without changing its technical concept or essential features. Therefore, the embodiments described above should be understood as illustrative in all respects and not restrictive. Explanation of the symbols

[0078] 100: Query processing server 130: Control unit 150: Communications Department 170: Memory

Claims

Claim 1 A method for access control of permission-based search augmentation generation (RAG) using a Large Language Model (LLM), comprising: a step of granting permission metadata defining an access control policy for each document in documents stored in a vector database; a step of receiving a user's query from a user device; a step of obtaining the user's held permission information; a step of embedding the user's query and converting it into a query vector; a step of setting the held permission information as a filtering condition for a search request to the vector database; a step of determining vectors satisfying the filtering condition among vectors stored in the vector database as candidate vectors; a step of extracting a predetermined number of text fragments as context related to the query based on the ranking of the candidate vectors with a high cosine similarity with the query vector; a step of generating an answer to the query based on the extracted context using the Large Language Model (LLM); and a step of transmitting the answer to the query to the user device. Claim 2 A method according to claim 1, wherein the authorization metadata includes at least one of the user's role, security level, and subscription level. Claim 3 delete Claim 4 The method of claim 1 further comprises the step of transmitting a response to the user device indicating that there is no access right when the user cannot find a document accessible by searching the vector database based on the held authority information. Claim 5 A method according to claim 1, further comprising the step of recording a log including the user's identifier (ID), the query, the extracted context, and the generated answer after the step of transmitting the answer to the query to the user device. Claim 6 A method according to claim 1, wherein the step of obtaining the user's held authority information comprises: requesting the user's held authority information from an authentication server; and the authentication server verifying the user's identity and receiving the held authority information from the authentication server. Claim 7 A computer-readable storage medium having a program recorded thereon for executing the method of any one of paragraphs 1, 2 and 4 through 6 on a computer.

Citation Information

Patent Citations

  • Information search method and system for utilizing information within company

    KR1020250130465A

  • Rag-based search system and method using document-specific permissions of meta information

    KR102732205B1

  • Method and system for providing authority control based retrieval augmented generation service

    KR1020250132711A