METHOD AND SYSTEM TO IMPLEMENT USER QUERIES
Methods, systems and computer program products for using AI context information to generate queries for content. An improved approach is provided to implement RAG-based techniques to search or content. The present approach solves the limitations of current RAG systems by introducing an approach to contextual understanding in information retrieval.
The proliferation of information in the modern world has led to an increasing reliance on sophisticated search and retrieval systems. For workers within an organization, the need for an efficient and effective way to search and retrieve data applies to both structured and unstructured content. The efficient retrieval of relevant information is therefore paramount in today's data-rich enterprise environments. Users across various roles and departments rely on search and retrieval systems to access crucial data, documents, and knowledge necessary for their daily tasks and decision-making processes.
However, traditional keyword-based search methods often prove inadequate, frequently delivering results that lack the necessary context and relevance, leading to inefficiencies and lost productivity. These systems typically focus on surface-level keyword matching, failing to capture the deeper semantic relationships within the data and the specific informational needs of the user.
To overcome these shortcomings, the field of information retrieval has increasingly embraced techniques that incorporate semantic understanding and contextual awareness. Retrieval-Augmented Generation (RAG) represents a significant step forward in this evolution. RAG systems integrate information retrieval with the power of large language models (LLMs). Upon receiving a user query, the system first retrieves relevant information from a knowledge base, which is then used by the LLM as contextual input to generate a more informed and accurate response. This approach grounds the LLM's output in specific evidence, thereby enhancing the reliability and trustworthiness of the generated information.
Despite the advancements offered by RAG, existing systems often face limitations in fully leveraging the available context to optimize the retrieval and generation processes. Many current RAG implementations primarily rely on the explicit content of the user's query and, in some cases, their individual past interactions with the system. While considering a user's personal history can offer some level of personalization, it may not fully capture the broader informational landscape and the interconnectedness of knowledge within an enterprise.
The effectiveness of any RAG system hinges on its ability to retrieve the most relevant context and to guide the LLM in synthesizing this information into a useful answer. Generating precise and effective retrieval queries is therefore critical. Overly simplistic queries can lead to the retrieval of vast amounts of irrelevant information, potentially diluting the quality of the generated response. Conversely, crafting highly specific queries often requires the user to possess an expert-level understanding of the underlying data structure and vocabulary.
Furthermore, enterprise information exists in diverse formats, ranging from structured databases to unstructured documents. Existing RAG systems may encounter challenges in seamlessly integrating these disparate data sources and in formulating appropriate retrieval strategies (e.g., SQL queries for structured data, semantic searches for unstructured text) based on the user's query and the nature of the underlying information.
Therefore, there is a need for an improved approach to implement a search and retrieval system for both structured and unstructured content.
SUMMARYEmbodiments of the present invention addresses the limitations of existing Retrieval-Augmented Generation (RAG) systems by introducing an enhanced approach to contextual understanding for information retrieval within enterprise environments. Recognizing that individual user context alone may be insufficient for optimal results, particularly in collaborative settings, the invention focuses on leveraging a broader spectrum of contextual information to improve the RAG pipeline.
The core of the invention lies in its ability to intelligently capture and utilize a richer understanding of relevance beyond individual user interactions. This involves analyzing various signals and relationships within the enterprise knowledge ecosystem to identify information that is likely to be pertinent to a user's query. By processing these contextual cues, the invention aims to enhance the effectiveness of content filtering, enabling the system to narrow down the corpus of information to a more relevant subset.
Furthermore, the invention employs this enhanced contextual understanding to generate more targeted and accurate retrieval queries. For structured data, this involves identifying relevant data sources and formulating more precise queries, such as SQL, to extract the necessary information. For unstructured data, the context informs the generation of more effective semantic search queries. This improved query generation leads to the retrieval of more relevant information, which in turn allows the Large Language Model (LLM) to generate more focused and accurate answers.
Finally, the invention leverages the enriched contextual information to tailor the generated answers to better meet the user's needs. By understanding the broader context of information relevance within the enterprise, the system can provide responses that are more insightful and directly applicable to the user's situation. This holistic approach to contextual awareness throughout the RAG process results in a more efficient and effective information retrieval experience, empowering users to access the knowledge they need with greater accuracy and speed.
Further details of aspects, objectives, and advantages of the technological embodiments are described herein, and in the drawings and claims.
The drawings described below are for illustration purposes only. The drawings are not intended to limit the scope of the present disclosure.
The present invention provides a system and method for enhancing Retrieval-Augmented Generation (RAG) based information retrieval, particularly within complex enterprise environments. As discussed in the background, existing RAG systems often face challenges in delivering consistently relevant and insightful results due to limitations in their understanding and utilization of contextual information. While some systems consider an individual user's past interactions, they often fail to capture the broader dynamics of information access and relevance that exist within collaborative organizational structures. This can lead to suboptimal retrieval of information and less effective generation of answers to user queries.
To overcome these limitations, the present invention introduces a more comprehensive approach to contextual understanding within the RAG pipeline. The core principle of this invention is to move beyond a solely user-centric view of context and to incorporate a richer set of signals and relationships that contribute to the overall relevance of information within the enterprise. By intelligently analyzing these diverse contextual cues, the system can more effectively filter the vast amounts of available data, generate more precise and targeted queries for information retrieval (across both structured and unstructured sources), and ultimately produce more relevant and useful answers for the user.
This enhanced contextual awareness is achieved through an architecture and methodology that focuses on identifying and leveraging key relationships and interactions within the enterprise knowledge ecosystem. Rather than solely relying on a user's direct query and past history, the present invention aims to understand the broader patterns of information access and utilization, thereby enabling a more nuanced and effective retrieval and generation process. The subsequent sections will detail the specific mechanisms and processes employed to achieve this enhanced contextual understanding and its application within the various stages of the RAG workflow.
Definitions and Use of FiguresSome of the terms used in this description are defined below for easy reference. The presented terms and their respective definitions are not rigidly restricted to these definitions-a term may be further defined by the term's use within this disclosure. The term “exemplary” is used herein to mean serving as an example, instance, or illustration. Any aspect or design described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other aspects or designs. Rather, use of the word exemplary is intended to present concepts in a concrete fashion. As used in this application and the appended claims, the term “or” is intended to mean an inclusive “or” rather than an exclusive “or”. That is, unless specified otherwise, or is clear from the context, “X employs A or B” is intended to mean any of the natural inclusive permutations. That is, if X employs A, X employs B, or X employs both A and B, then “X employs A or B” is satisfied under any of the foregoing instances. As used herein, at least one of A or B means at least one of A, or at least one of B, or at least one of both A and B. In other words, this phrase is disjunctive. The articles “a” and “an” as used in this application and the appended claims should generally be construed to mean “one or more” unless specified otherwise or is clear from the context to be directed to a singular form.
Various embodiments are described herein with reference to the figures. It should be noted that the figures are not necessarily drawn to scale, and that elements of similar structures or functions are sometimes represented by like reference characters throughout the figures. It should also be noted that the figures are only intended to facilitate the description of the disclosed embodiments-they are not representative of an exhaustive treatment of all possible embodiments, and they are not intended to impute any limitation as to the scope of the claims. In addition, an illustrated embodiment need not portray all aspects or advantages of usage in any particular environment.
An aspect or an advantage described in conjunction with a particular embodiment is not necessarily limited to that embodiment and can be practiced in any other embodiments even if not so illustrated. References throughout this specification to “some embodiments” or “other embodiments” refer to a particular feature, structure, material or characteristic described in connection with the embodiments as being included in at least one embodiment. Thus, the appearance of the phrases “in some embodiments” or “in other embodiments” in various places throughout this specification are not necessarily referring to the same embodiment or embodiments. The disclosed embodiments are not intended to be limiting of the claims.
Descriptions of Example EmbodimentsThe present invention introduces an enhanced Retrieval-Augmented Generation (RAG) process, specifically designed for web-based information retrieval, which aims to provide more relevant and contextually rich answers to user queries. The core improvement of this invention lies in the augmentation of the traditional RAG process with an Enterprise AI User Context. This comprehensive context allows the system to go beyond simple keyword matching and incorporate a deeper understanding of the user's environment and the enterprise's knowledge ecosystem.
The Enterprise AI User Context is comprised of at least two distinct yet interconnected subcontexts: (a) Enterprise Subcontext: This subcontextual information focuses on defining the enterprise itself, including its organizational structure, and precisely locating the user within this structure based on their specific role and position; and this understanding of the user's place within the company hierarchy is important for tailoring the information retrieval and answer generation processes; (b) Content Cloud Subcontext: This subcontextual information captures the historical data and evolving patterns associated with the creation, usage, and modification of digital content by users within the enterprise's content cloud; by analyzing these patterns, the system gains insights into the relevance and importance of various documents and files within the organizational context.
The enhanced RAG process leverages the vast repository of documents and files stored within the enterprise's Content Cloud. The selection of these documents for augmenting the answer generation is driven by a combination of key factors. One possible fact is semantic similarity, which is the degree to which the content of a document or file aligns semantically with the user's natural language query. This ensures that the retrieved information is directly related to the user's stated need. Another possible factor is a contextual relevance metrics, which may pertain to relevance scores derived from the Enterprise AI User Context. These metrics can include indicators such as the frequency with which documents are accessed by the user's close collaborators, suggesting potential relevance based on shared interests and workflows, or the overall popularity of documents across the entire enterprise, indicating broadly valuable information.
By integrating the Enterprise AI User Context into the RAG process, embodiments of the invention aim to produce answers that are significantly more relevant to the user. This enhanced relevance stems from the system's ability to consider the broader organizational context and prioritize information that has proven valuable to the user's network or the enterprise as a whole. Furthermore, the generated answer is intelligently adjusted based on several aspects of the Enterprise AI User Context. One possible aspect is the user relationship to the organization, where this includes factors such as the user's specific position within the organization, their primary job function, and their current employment status. Understanding these aspects allows the system to tailor the answer's content and style to the user's level of expertise and informational needs. Another would be any organization/company-wide guidelines and restrictions. The system may incorporate general company-wide guidelines, rules, best practices, and any relevant restrictions to ensure that the generated answer is compliant with organizational policies and promotes appropriate information sharing.
The process begins with a user query 102, which represents the initial information requested as expressed by a user (e.g., in natural language or a structured format). This user query 102 serves as the starting point for the information retrieval process and is transmitted to the query generation mechanism 104. The query generation mechanism 104 is the central component responsible for transforming the initial user query into a set of more specific and targeted queries suitable for different data sources.
The query generation mechanism 104 also receives context information 106 as input. This context information 106 (which may also be referred to here at “enterprise AI context” or “AI user/enterprise context”), which provides a rich understanding of factors relevant to the user's information needs. As detailed in earlier sections, this context information goes beyond the user's immediate query and individual history to incorporate a broader understanding of relevance within the enterprise environment. The specifics of how this context information is gathered and represented are described in subsequent sections.
Based on the initial user query 102 and the received context information 106, the query generation mechanism 104 produces several types of queries tailored to different data repositories. One output is a structured RAG query 120, which is specifically designed to interrogate structured data 110 residing within a content management system 108. Structured data 110 may include databases, spreadsheets, or other organized forms of information with well-defined schemas. The structured RAG query 120 is formulated to retrieve specific data points relevant to the user's need, informed by the context information 106.
Another output of the query generation mechanism 104 is an unstructured RAG query 122. This query is designed to search unstructured data 112, also located within the content management system 108. Unstructured data 112 encompasses documents, text files, presentations, and other forms of information that do not adhere to a rigid schema. The unstructured RAG query 122 leverages semantic understanding, enhanced by the context information 106, to identify relevant content within these diverse data sources.
Finally, the query generation mechanism 104 also generates a web query 124. This query is intended to search web data 114, which resides on remote cloud services and websites external to the immediate content management system 108. The web query 124 is formulated, again taking into account the user query 102 and the context information 106, to retrieve relevant information from the broader internet.
In some embodiments, the content management system 108 corresponds to a cloud service (e.g., collaboration or file sharing platform) and/or cloud storage accounts with capabilities for enabling a desktop/mobile application or browser for accessing a cloud-based collaboration platform. One or more users may use one or more client devices to access the content management system. The client devices can be any system and/or device, and/or any combination of devices/systems that is able to establish a connection, including wired, wireless, cellular connections with another device, a server and/or other systems. The client devices will typically include a display and/or other output functionalities to present information and data exchanged between among the devices and/or the server. For example, the client devices can include mobile, hand held or portable devices or non-portable devices and can be any of a server desktop, a desktop computer, a computer cluster, or portable devices including, a notebook, a laptop computer, a handheld computer, a palmtop computer, a mobile phone, a cell phone, a smart phone, a PDA, a Blackberry device, a handheld tablet (e.g. an iPad, a Galaxy, Xoom Tablet, etc.), a tablet PC, a thin-client, a hand held console, a hand held gaming device or console, an iPhone, and/or any other portable, mobile, hand held devices, etc. running on any platform or any operating system (e.g., Mac-based OS (OS X, iOS, etc.), Windows-based OS (Windows Mobile, Windows, etc.), Android, Blackberry OS, Embedded Linux platforms. In one embodiment, the client devices and the server are coupled via a network. In some embodiments, the devices and server 104 may be directly connected to one another. The input mechanism on the client devices can include touch screen keypad (including single touch, multi-touch, gesture sensing in 2D or 3D, etc.), a physical keypad, a mouse, a pointer, a track pad, motion detector (e.g., including 1-axis, 2-axis, 3-axis accelerometer, etc.), a light sensor, capacitance sensor, resistance sensor, temperature sensor, proximity sensor, a piezoelectric device, device orientation detector (e.g., electronic compass, tilt sensor, rotation sensor, gyroscope, accelerometer), or a combination of the above. Signals received or detected indicating user activity at the client devices through one or more of the above input mechanism, or others, can be used in the disclosed technology by any user or collaborator (hereinafter referred to collectively as “user”) for accessing a cloud-based collaboration platform or online collaboration platform (e.g., hosted by the host server). The collaboration platform or environment hosts workspaces with content items that one or more users can access (e.g., view, edit, update, revise, comment, download, preview, tag, or otherwise manipulate, etc.). To host the content items, the collaboration platform may store the uploaded content items in a data repository. The data repository may represent the collective data storage facilities of the cloud-based collaboration platform and may include any one data storage components operating at any one or more physical devices. For example, the data repository may be distributed across multiple network connected machines. As mentioned, the data repository may store digital content that is hosted in the cloud-based collaboration platform (i.e., content uploaded by users/collaborators). The data repository may also store code including the instructions, rules, models, etc. for performing one or more processes of the cloud-based collaboration platform. For example, the cloud-based collaboration platform may host various user-facing applications (e.g., Microsoft® Word) that can be used by users/collaborators for interacting with stored digital content. Similarly, the cloud-based collaboration platform may host various processing applications that operate in the background, for example, to perform various automated tasks. A content item stored/accessed within the cloud-based collaboration platform can generally include any type of digital or electronic content that can be viewed or accessed via an electronic device. The digital content can include, for example, pdf files, docs, slides (e.g., PowerPoint slides), images, audio files, multimedia content, web pages, blogs, etc. (which are collectively referred to herein illustratively and without limitation as a “file”).
In general, the content management system allows multiple users or collaborators to access or collaborate efforts on content items such each user can upload, open, view/preview/see, edit, revise, comment upon, and/or annotate specific content items through their own user devices.
For example, a user can upload a document to a work space for other users to access (e.g., for viewing, editing, commenting, signing-off, or otherwise manipulating). The user can login to the online platform and upload the document (or any other type of content item) to an existing work space or to a new work space. The document can be shared with existing users or collaborators in a work space.
The invention leverages an “event tracking” system within the content management system. This system monitors user-to-file interactions (opens, previews, modifies, deletes) and user-to-user interactions (adding to groups, sharing files). This event data is then used to create relationships and clusters based on file-to-file, user-to-file, and user-to-user connections. The system generates graphs and/or embeddings from these relationships to represent the context. When a user submits a query, the system identifies the user's context and expands it with a broader “enterprise context” derived from the relationships and interactions of others related to that user.
When a user submits a query, the system uses the generated graphs or embeddings to identify a smaller set of relevant documents. This filtering process considers not only the user's direct interactions but also the interactions of their connected co-workers (e.g., based on the established relationships). For example, if a user queries “marketing reports,” the system might prioritize documents frequently accessed by the user and by their team members or those who have collaborated with them on related marketing materials. The degree of relatedness (e.g., direct collaborator vs. someone in a shared group) could influence the weighting or prioritization of the co-worker's context.
The expanded enterprise context can inform the prompts sent to the LLM. For structured queries (SQL), the system can use the context to identify the most relevant documents (as per content filtering), and to infer the underlying schema of these documents based on how the user and their co-workers have interacted with them (e.g., which fields are frequently accessed or queried). The system can also generate more targeted SQL queries by including relevant tables, columns, and potential filtering conditions suggested by the combined context. For unstructured queries, the context could help formulate better natural language prompts to the LLM, potentially including relevant keywords, concepts, or even the style of queries that have been successful for the user or their collaborators in similar situations.
The system can use the combined context to anticipate the user's needs and tailor the answer accordingly. This could involve prioritizing information from the retrieved documents that has been deemed important or relevant by the user or their collaborators in the past. The system may also format the answer in a way that aligns with the user's or their collaborators' preferred formats (if such preferences can be inferred from past interactions). In some embodiment, the system includes related information or documents that the user or their network might find useful, based on their past engagement.
As mentioned above, for structured queries, the context helps in identifying relevant data sources and their schema, leading to more precise SQL generation. For unstructured queries, the context enriches the search by considering a broader set of potentially relevant information and can inform the LLM to generate more focused and useful responses.
From an architectural perspective, the enhanced Retrieval-Augmented Generation system 100 leverages a modular architecture as shown in
The Event Tracking Module forms the foundational layer for gathering the data that underpins the enhanced contextual understanding of the system. Operating within the sphere of the content management system (108), this module monitors and logs a comprehensive range of user interactions with the digital assets it manages. These tracked “events” encompass direct user-to-file engagements, such as when a user opens a document to review its contents, previews a file to quickly assess its relevance, modifies a document by making changes or additions, or even deletes a file, indicating a potential shift in its importance. By recording these actions, the module captures a granular history of how individual users interact with the information repository.
Beyond individual file interactions, the Event Tracking Module also extends its monitoring to user-to-user interactions that signify collaboration and relationships within the enterprise. This includes instances where a first user explicitly adds a second user to a defined group within the system, thereby establishing a formal connection. Furthermore, the module tracks instances where a user shares a specific file or folder with another user, designating them as a collaborator on that particular content. These user-to-user interactions provide valuable insights into the collaborative networks and shared interests within the organization, which are critical for understanding the broader context of information relevance.
The data captured by the Event Tracking Module can be stored in a structured format, such as a dedicated database or log file, which includes timestamps, user identifiers, file identifiers, and the type of interaction performed. This detailed event log serves as the raw material for the subsequent modules that process and transform this data into meaningful contextual information. The module is designed to be efficient and scalable to handle the potentially high volume of user interactions within a large enterprise, ensuring that a comprehensive and up-to-date record of activity is maintained without impacting the performance of the content management system itself.
The Relationship and Clustering Module takes the raw event data generated by the Event Tracking Module and transforms it into a more structured and actionable representation of the connections within the enterprise. This module employs various analytical techniques to identify and quantify the strength of relationships between different entities, including users and files. For instance, users who frequently access the same files or collaborate on multiple documents are identified as having a strong user-to-file or user-to-user relationship, respectively. Similarly, files that are often accessed together or are part of the same projects can be identified as having a strong file-to-file relationship.
To further organize these relationships, the module implements clustering algorithms. These algorithms group related entities based on the identified connections. For example, users who frequently interact with a similar set of files might be grouped into a cluster representing a team or project. Likewise, files that are often accessed by the same group of users or share similar content characteristics might be clustered together based on topic or project affiliation. The parameters and sensitivity of these clustering algorithms can be configured to fine-tune the granularity and relevance of the resulting clusters.
The output of the Relationship and Clustering Module is a set of structured data representing these identified relationships and clusters. This could take the form of adjacency matrices for graph representations or labeled groupings of users and files. This structured output provides a clear and organized view of the interconnectedness within the enterprise, moving beyond individual interactions to reveal broader patterns of information flow and collaboration. This processed data is then passed on to the Graph/Embedding Generation Module for further transformation into a format suitable for the Contextual Information Module.
Building upon the structured relationship data produced by the Relationship and Clustering Module, the Graph/Embedding Generation Module creates representations of the enterprise context. This module can construct graph data structures where users and files are represented as nodes, and the identified relationships (e.g., accessed, collaborated, shared) are represented as edges. The weight of these edges can reflect the strength or frequency of the interaction, providing a nuanced view of the connections. These graph representations capture the complex web of relationships within the organization, allowing for graph-based algorithms to identify relevant connections and pathways.
In addition to graph representations, this module can also generate embeddings for users and files. Embeddings are dense vector representations that capture the semantic meaning and relationships of entities in a lower-dimensional space. These embeddings are typically learned using techniques like graph neural networks or matrix factorization on the relationship data. Users or files that are closely related or share similar interaction patterns will have embeddings that are closer to each other in the vector space. These embeddings offer a powerful way to measure the similarity and relatedness of different entities, enabling efficient retrieval of relevant context.
The choice between using graph representations or embeddings, or a combination of both, can depend on the specific requirements of the system and the types of contextual queries that need to be supported. Graph representations excel at capturing explicit relationships and enabling path-based reasoning, while embeddings are highly effective for similarity-based retrieval and can capture more implicit relationships. The output of this module, whether in the form of graph data structures, embeddings, or both, provides a rich and computationally efficient way to represent the enterprise context, ready to be utilized by the Contextual Information Module to inform the query generation process.
The Contextual Information Module, represented by context information 106 in
The Enterprise Information Import Module imports enterprise-related information which cannot be easily obtained as results of functioning of the aforementioned modules but still might be used during the enhanced RAG process. This might include but is not limited to data import from such systems as HR & employee tracking tools, project management software, enterprise intranet, internal enterprise documents. The import of those items of information relies upon enterprise consent and certain embodiments have an opt-in/opt-out option on a per-information-item basis. It is also possible that the enterprise completely disallows the information import in this step making it no-operation placeholder in the whole flow.
For a given user, the Contextual Information Module can extract information about their direct interactions with files (e.g., recently accessed documents, frequently edited files), their relationships with other users (e.g., team members, frequent collaborators), and the clusters they belong to. Furthermore, by traversing the graph or examining the embedding space, the module can identify related entities, such as files frequently accessed by the user's collaborators or users who share similar interaction patterns. The depth and breadth of this contextual retrieval can be dynamically adjusted based on system configuration and the specifics of the user query.
The output of this module is the context information 106, a structured collection of data that encapsulates the user's individual context as well as the broader enterprise context relevant to them. This information might include lists of related files, related users, relevant topics or clusters, and potentially weights or scores indicating the strength of these relationships. This rich contextual data is then passed to the query generation mechanism 104 to inform the formulation of more effective and targeted queries for the various underlying data sources.
The query generation mechanism 104 is the intelligent engine that transforms the initial user query 102 into specific and optimized queries for the different data repositories, guided by the comprehensive context information 106. Upon receiving both the user's explicit request and the rich contextual data, this mechanism employs different strategies for generating structured RAG query 120, unstructured RAG query 122, and web query 124.
For generating the structured RAG query 120 aimed at structured data 110, the mechanism analyzes the user query and the context to identify relevant tables, fields, and potential filtering conditions. The context might suggest commonly queried tables by the user or their collaborators, frequently used join conditions, or relevant entities that can be used to filter the data (e.g., project IDs, department names). The generated SQL query is thus informed not only by the keywords in the user's query but also by the structural insights derived from the context.
When generating the unstructured RAG query 122 for unstructured data 112, the mechanism leverages the context to enrich the query with semantically related terms, concepts, and entities. The context might suggest relevant keywords that the user or their network frequently associate with the topic of the query, or it might help to disambiguate the user's intent by identifying the specific domain or project they are interested in. This enriched query, often in the form of a natural language query or a vector embedding, is then used to search the unstructured data repository for relevant documents. Similarly, for the web query 124 targeting web data 114, the mechanism uses the context to refine the search terms and potentially include relevant domain-specific keywords or filters that are likely to yield more accurate results from external web sources.
A Content Filtering Module plays a role in refining the set of potentially relevant information before it is used for answer generation. This module can be conceptually integrated within the query generation mechanism 104, operating after the initial retrieval queries are formulated but before the final data retrieval, or it can function as a separate step immediately following the execution of the queries. The primary purpose of this module is to further narrow down the scope of information based on the rich context information 106.
Leveraging the context, this module can apply additional filters to the potential results. For instance, it might prioritize documents that have been recently accessed or highly rated by the user's close collaborators, even if those documents were not direct matches for the initial query. Similarly, it might down-rank or exclude documents that are deemed irrelevant based on the user's team affiliation, project focus, or past negative feedback on similar content. This filtering step ensures that the subsequent stages of the RAG process operate on a more focused and relevant subset of the available information, improving efficiency and the quality of the final answer.
The Content Filtering Module can employ various techniques, such as applying weighted scores based on the strength of relationships derived from the context, using semantic similarity measures to compare retrieved content with the user's context and query, or implementing rule-based filters based on organizational hierarchies or project affiliations. By strategically filtering the retrieved content, this module optimizes the downstream processing by the LLM and increases the likelihood of generating accurate and useful answers.
The Query Execution Module is the component responsible for taking the generated queries and executing them against the respective data sources. Following the generation of the structured RAG query 120 by the query generation mechanism 104, this module interacts with the structured data 110 within the content management system 108. This typically involves submitting the SQL query to the underlying database and retrieving the resulting data records. Similarly, the unstructured RAG query 122 is executed against the unstructured data 112, likely utilizing a search engine or a vector database to identify relevant documents or text snippets based on keyword matching or semantic similarity.
For the web query 124, the Query Execution Module interacts with web data 114, typically by sending the formulated search terms to web search APIs and retrieving the search results. This module is responsible for handling the communication protocols and data formats required to interact with each of these diverse data sources. It ensures that the queries generated by the preceding stage are properly translated and executed to retrieve the most relevant information.
The output of the Query Execution Module is a set of retrieved documents, data records, or web snippets that are deemed relevant to the user's initial query based on the enhanced contextual understanding and the targeted queries. This retrieved information is then passed on to the subsequent stages of the RAG pipeline, specifically the answer preparation module, for synthesis and presentation to the user.
The Answer Preparation Module takes the retrieved information from the Query Execution Module (and potentially after the Content Filtering Module) and the original user query 102 as input. Its primary function is to synthesize a coherent and relevant answer to the user's query, leveraging the retrieved context. This often involves feeding the retrieved information and the user's query to a Large Language Model (LLM). The LLM then processes this information to generate a natural language response that is grounded in the retrieved evidence.
The Answer Preparation Module can also utilize the original context information 106 to further refine and tailor the generated answer. For example, the context might indicate the user's preferred format for receiving information (e.g., summaries, bullet points, detailed explanations), or it might highlight specific aspects of the retrieved information that would be most relevant to the user based on their role, project affiliations, or past interactions. The module can also incorporate information about the user's collaborators or related entities into the answer if it enhances the understanding or provides additional valuable insights.
Furthermore, the Answer Preparation Module is responsible for formatting the final answer in a user-friendly manner and potentially including citations or links back to the original retrieved sources, enhancing transparency and allowing the user to explore the evidence further. The goal of this module is to transform the raw retrieved data into a concise, informative, and contextually relevant answer that directly addresses the user's information need.
The RAG Engine manages the flow of information and coordinating the activities of all the other modules. It receives the initial user query 102 and initiates the process by engaging the Contextual Information Module to gather the relevant context 106. It then passes both the user query and the context to the Query Generation Mechanism 104, which in turn generates the targeted queries for the various data sources.
The RAG Engine then invokes the Query Execution Module to execute these queries against the content management system 108 (including structured data 110 and unstructured data 112 and web data 114. It manages the retrieval of the results and may engage the Content Filtering Module to refine the retrieved information. Finally, it passes the filtered results and the original query to the Answer Preparation Module for synthesis and generation of the final response to the user.
The RAG Engine is responsible for ensuring the smooth and efficient operation of the entire pipeline. It may include mechanisms for monitoring performance, handling errors, and potentially optimizing the process based on user feedback and system analytics. It acts as the central control unit, ensuring that the enhanced contextual understanding is effectively integrated into each stage of the Retrieval-Augmented Generation process, ultimately delivering more accurate, relevant, and insightful information to the user.
At 202, the system performs user activities in a content management system. This encompasses a wide spectrum of actions crucial for their daily workflows and knowledge sharing. Users routinely create new documents to capture ideas, reports, and other essential information. They access and view existing files to retrieve necessary data and insights. Furthermore, they modify content through editing and updates, ensuring information remains current and accurate. Collaboration is also a key aspect, with users sharing documents with colleagues for review, co-authoring, or dissemination. Project work involves users organizing files into specific folders and workspaces, establishing relationships between different pieces of content. All these activities, from individual content consumption to collaborative creation, contribute to the rich tapestry of interactions within the content management system.
These user activities within the content management system are not isolated events but rather interconnected actions that reflect individual needs, team collaborations, and organizational knowledge flows. The frequency of access to certain documents by specific users can indicate their importance or relevance to those individuals or their teams. Patterns of co-editing or sharing can highlight collaborative relationships and shared areas of interest. The organization of files within project folders can reveal the thematic connections between different pieces of content. Therefore, understanding and capturing these diverse user activities is crucial for building a comprehensive model of how information is created, accessed, and utilized within the enterprise. This active engagement forms the initial data source for the subsequent stages of the enhanced RAG process.
At 204, the system records activities in the CMS, e.g., in an interaction database, which details the systematic process of capturing and storing the user activities performed within the content management system. As users engage in the various actions described in the previous step, each interaction is meticulously recorded in a dedicated interaction database. This database serves as a comprehensive log of who did what with which content and when. Each record typically includes a timestamp, a unique identifier for the user performing the action, a unique identifier for the file or object being interacted with, and a code specifying the type of activity (e.g., view, edit, share, delete).
The interaction database is designed to be robust and scalable to handle the potentially high volume of user interactions within a large enterprise environment. Efficient indexing and data management techniques are employed to ensure that this historical record of activity can be readily accessed and analyzed in subsequent stages. The granularity of the recorded activities is important, as more detailed information allows for a richer understanding of user behavior and the nuances of information consumption. For instance, tracking the specific sections of a document that a user frequently views might provide more insightful context than simply recording that the document was opened. This comprehensive and well-structured interaction database forms the foundation upon which the AI context is built.
At 205, the system imports external enterprise information (that is external to the CMS). The imported information may be related to the enterprise, its entities, employees, initiatives, internal corporate structure, the projects undertaken, internal recommendations and regulations. This step may include but is not limited to the interaction with external systems such as: HR modules, employees time tracking tools, project management software, document and content storage external to the CMS. This step includes also data pre-processing and transitioning to the further used internal representations such as graph structure representing the corporate hierarchy.
At 206, the system generates the AI context that represents both the requesting user as well as enterprise entities. The wealth of interaction data stored in the interaction database is processed using advanced artificial intelligence techniques to generate a comprehensive AI context. This context extends beyond a simple understanding of individual user behavior to encompass the intricate relationships between users, content, and other relevant enterprise entities such as teams and projects. This process likely involves analyzing patterns of co-access, collaboration networks, content usage trends, and organizational structures to infer meaningful connections and associations.
The generation of this AI context likely leverages the functionalities described earlier, such as the Relationship and Clustering Module and the Graph/Embedding Generation Module. These modules analyze the interaction data to identify strong relationships between users and content, as well as between users themselves. Clustering algorithms might group users with similar content consumption patterns or files that are frequently accessed together. Graph-based representations can capture the complex network of relationships, while embedding techniques can create dense vector representations that capture the semantic relatedness of different entities. The resulting AI context provides a multi-faceted understanding of the enterprise knowledge landscape, capturing both explicit interactions and implicit relationships. This rich contextual information is then crucial for guiding the query generation process in the subsequent stage.
At 208, the system generates and executes structured and/or unstructured queries using the AI context. When a user submits a query, the AI context developed in the previous step is leveraged by the query generation mechanism. This context provides valuable insights into the user's likely information needs, their relationships with other users and content, and the overall patterns of information usage within the enterprise. This allows the system to formulate more effective and targeted queries than would be possible based solely on the user's explicit query.
For accessing structured data within the content management system, the AI context can help in identifying the most relevant data tables, understanding the relationships between different data fields, and formulating more precise SQL queries that incorporate relevant filtering criteria suggested by the context. For retrieving information from unstructured data, the AI context can enrich the search queries with semantically related terms, identify relevant topics or concepts that might not be explicitly mentioned in the user's query, and even guide the search towards documents that have been deemed relevant by the user's collaborators or are popular within the enterprise. The execution of these context-aware structured and unstructured queries leads to the retrieval of a more focused and relevant set of information, which can then be effectively utilized by the RAG process to generate more accurate and insightful answers for the user.
The Enterprise Subcontext 304 serves as a foundational layer, encapsulating a broad spectrum of information that defines the company's internal structure and the intricate relationship between the individual user (employee) and the organization as a whole. This includes granular details describing the hierarchical arrangement of the company at various levels, from overarching entities like offices and branches down to more specific units such as departments, teams, projects, and even financial reporting lines. Furthermore, this subcontext captures the dynamic characteristics of the user's employment journey, both current and historical, effectively positioning the employee within the corporate structure and the established chain of command, including the identification of both direct and indirect supervisory roles. Beyond organizational placement, the Enterprise Subcontext also encompasses data directly or indirectly related to the outcomes and responsibilities of the employee's work, as well as the explicit and implicit limitations, rights, and expectations imposed upon the employee by the company's policies and operational norms.
The granular data points within the Enterprise Subcontext provide a rich profile of the user's professional standing and organizational integration. This includes specific details such as the user's designated job function and their current employment status, encompassing their pay grade, comprehensive employment history within the company, progression through promotion history, and the nature of their employment contract (whether permanent or contractual). Practical aspects of their employment, such as the number of paid time off or sick leave days utilized, and the physical office location assigned to the employee, are also integral components. Moreover, the Enterprise Subcontext incorporates information regarding corporate data access policies and the overarching need-to-know principles that govern information visibility. This includes defining the scope of information deemed necessary for the user and their immediate team to perform their duties, outlining any information barriers or restrictions imposed on them, and detailing corporate access rules that may be established on a per-content-item basis, ensuring data security and compliance.
Furthermore, the Enterprise Subcontext extends to encompass corporate engagement metrics for both the individual user and their team, providing insights into performance and involvement within the organization. This includes results from performance reviews, offering a measure of individual and collective contributions, as well as the number of corporate initiatives in which the user is actively participating, indicating their engagement beyond core responsibilities. To provide a broader organizational perspective, this subcontext also includes comprehensive lists and descriptions of past and ongoing company-wide projects and initiatives, as well as schedules of past and upcoming corporate events, such as industry conferences or internal company gatherings. Even employee-led initiatives, such as volunteering events, are captured, reflecting broader engagement within the corporate culture. Finally, the Enterprise Subcontext provides detailed corporate structure information, explicitly locating the employee or their team within the organizational hierarchy, identifying direct and indirect supervisors through a structural graph, and pinpointing the location of cooperating teams within this framework, alongside other relevant data sources that contribute to a comprehensive understanding of the organizational landscape. The job-function related fields of interest, outlining essential and restricted topics for the user and their team, further refine this contextual understanding.
Complementing the organizational insights of the Enterprise Subcontext, the Content Cloud Subcontext 306 focuses specifically on the enterprise's digital content and the patterns of user interaction with this information. Its primary goal is to enhance the efficiency and relevance of the file selection process during the later stages of the RAG pipeline. It achieves this by identifying and highlighting portions of content that are frequently accessed not only by the user but also by their close collaborators, indicating potential relevance and interest. Moreover, this subcontext describes the historical interactions of users with the selected files, providing a temporal dimension to content engagement. It also establishes clear links between content item changes and their respective authors, enabling attribution and understanding of content evolution. The Content Cloud Subcontext encompasses detailed metadata associated with each content item, such as its path within the file system tree, its name, size, creator, creation date, and last modification date, providing essential descriptive information.
The data points within the Content Cloud Subcontext offer granular insights into content consumption and collaboration patterns. This includes embeddings calculated on the files to which the user has access, e.g., utilizing cosine similarity to enable rapid querying of the embedding database for files semantically relevant to the user's query. Furthermore, it incorporates ranks and rankings of files and content pieces, determined based on predefined relevance metrics. These metrics can include the ranking of the most trending content across the entire company, the ranking of the most recently viewed content by a specific user or team, lists of content items deemed most relevant to specific projects or initiatives, and rankings based on custom functions, such as an exponentially decaying count of views over time. The subcontext also explicitly identifies files and content owned by the user, providing a direct link to their contributions. Detailed user access and usage statistics are captured, including lists of viewed files and content items by a user or team, comprehensive content access history, the duration of time spent viewing specific files, and lists of content stored in or copied to the user's private folders, indicating potential personal relevance.
Furthermore, the Content Cloud Subcontext provides a history of all changes and versions of content items on which the user and their team have collaborated, including the actual content of each change, the date and time of the change, and the author responsible for the modification. Even the specific Content Cloud features most frequently utilized by a user are tracked, providing insights into their preferred workflows. Finally, the Content Cloud Subcontext incorporates the Content Cloud search history of the user and their team, offering valuable information about their explicit information-seeking behavior, telemetry data from the Content Cloud (including geographical location, device types, and session lengths), and the history of previous conversations with intelligent query systems, providing a longitudinal view of information needs and interactions. All these diverse data points within the Content Cloud Subcontext contribute to a rich understanding of how users interact with and value the enterprise's digital assets.
The system then initiates parallel information retrieval operations across diverse data repositories. At step 410, a targeted search is executed for relevant structured files, specifically those in formats like XLS or CSV, residing within the enterprise's content cloud. These structured files, characterized by their organized data formats, are used for extracting specific factual information. Following their retrieval, the process undergoes a processing phase 412, which may involve data cleaning, format standardization, or extraction of key data points to facilitate subsequent analysis and integration.
At step 414, a search is conducted for relevant unstructured files, encompassing formats such as PDF or DOC, also located within the content cloud. These unstructured files, containing narrative text and varied layouts, are processed in a separate processing stage 416, which might involve text extraction, document parsing, or the generation of semantic embeddings to capture their meaning.
In addition to these internal content cloud searches, the system extends its reach to the external domain by performing a search for relevant information on the World Wide Web 418. This step leverages the user query and potentially elements of the enterprise AI context to formulate effective web search queries. The information retrieved from the web, which can include articles, news reports, or product announcements, also undergoes a processing step 420. This processing might involve content extraction, noise reduction, or the identification of authoritative sources to enhance the quality of the retrieved web data.
The processed outputs from the structured files 412, unstructured files 416, and web searches 420 converge at a concatenation stage 426. Here, relevant excerpts or summaries from the identified files, along with appropriate references to their sources, are combined with the pertinent findings from the web search. This aggregation creates a unified pool of potentially relevant information that will inform the final answer generation.
Following this concatenation, the system enters a decision point regarding refinement of relevant information 428. At this stage, the system's intelligence assesses the combined information to determine if further filtering, ranking, or summarization is necessary to enhance the clarity and relevance of the input for the final answer generation. Finally, the refined or unrefined information is passed to a generation module 430, which employs a Large Language Model (LLM) to synthesize a comprehensive and natural language answer that directly addresses the user's initial query, presented seamlessly through the chat interface.
The Enterprise Subcontext exerts a significant influence throughout this intricate process, ensuring that the generated answers are not only factually accurate but also contextually appropriate for the individual user and aligned with organizational policies. Firstly, the adaptation of answers to the user's specific relationship with the company, including their position, job function, and employment status, permeates the entire workflow. During the initial candidate file selection phases in steps 410 and 414, the system might prioritize or de-prioritize files based on the corporate processes the employee is currently engaged in or the active projects they are involved in, ensuring relevance to their immediate responsibilities. Furthermore, the final answer generated in step 430 is carefully tailored to the user's organizational role and their specific information needs. A high-level executive might receive a concise summary, while a subject matter expert would be provided with detailed technical specifications.
Secondly, the Enterprise Subcontext plays a crucial role in enforcing general company-wide guidelines, rules, best practices, and restrictions during the answer generation process. This governance is particularly evident during the candidate file selection stages (410, 414), where data access policies are strictly enforced based on the user's hierarchical position, geographical location, or assigned office, preventing unauthorized access to sensitive information such as trade secrets or confidential reorganization plans. Moreover, access privileges can be dynamically adjusted based on an employee's current status, such as limiting data access during a notice period to maintain data security. Thirdly, the system intelligently considers the current company situation. During times of crisis, for instance, information access might be temporarily restricted (410, 414), while relevant updates about upcoming corporate events or critical announcements can be proactively incorporated into the information refinement stage (426) to ensure users are informed of timely and relevant organizational developments.
The Content Cloud Subcontext plays a role in enhancing the factual adequacy and personalization of the generated responses by leveraging the user's interaction history and the collective intelligence of their professional network. During the crucial file selection steps (410, 414), the system intelligently utilizes embeddings calculated on the user's query to efficiently search the embedding database of available files, prioritizing content with high semantic similarity. Furthermore, files and content that the user has directly owned or created are given higher precedence, recognizing their potential relevance. The access statistics of the user's close collaborators or individuals with similar job functions are also considered, allowing the system to surface information deemed valuable by their peers. Files frequently shared among members of the same team are also prioritized, reflecting collaborative knowledge sharing. Custom relevance metrics, defined based on the enterprise's specific Content Cloud data, can further refine the selection process, such as promoting longer, recently shared files within a team. Even the user's daily and weekly Content Cloud usage patterns are analyzed, allowing the system to anticipate their information needs based on their typical routines. In the web search phase (418, 420), telemetry information from the Content Cloud, such as the user's geographical location, can be used to refine web search queries, for example, when searching for nearby company facilities. Finally, the final answer generation phase (430) benefits from the AI-summarized history of previous conversations with the intelligent query system, allowing the system to adapt its response style and level of detail based on the user's established preferences for brevity or comprehensiveness.
The first decision point arises at box 504, where the system evaluates whether the scope of content considered for the RAG process should be dynamically adjusted based on the insights gleaned from the Enterprise AI Context. This evaluation draws upon elements such as the user's defined data access privileges and their specific role within the organizational hierarchy (derived from the Enterprise Subcontext). Furthermore, it considers content-centric factors such as the relevance scores of documents based on access patterns of the user's close collaborators or the overall popularity of content within the enterprise (informed by the Content Cloud Subcontext). A “No” decision at this stage signifies that the default content scope is deemed appropriate, and the process advances to the subsequent decision regarding the LLM prompt at 508. Conversely, a “Yes” decision triggers the content filtering/modification step at 506. This step involves actively refining the pool of candidate documents by either restricting access to certain sensitive information based on the user's clearance or by prioritizing documents deemed highly relevant due to collaborative access or trending status, thereby optimizing the subsequent retrieval and generation processes. Following this context-driven content refinement, the process proceeds to the LLM prompt evaluation at 508.
The next pivotal decision point occurs at box 508, where the system assesses whether the prompt that will be presented to the Large Language Model (LLM) for generating the final answer should be tailored based on the Enterprise AI Context. This evaluation considers various user-specific and enterprise-wide contextual cues. For instance, the system might analyze the user's historical interactions with the chat interface to infer their preferred level of detail or communication style (a component of the Content Cloud Subcontext). Additionally, it might consider specific entities, projects, or topics that are highly relevant to the user's professional responsibilities and organizational affiliations (derived from the Enterprise Subcontext). A “No” at this decision point indicates that the default prompt is deemed sufficient, and the process moves to the final answer evaluation at 512. However, a “Yes” decision initiates the prompt modification step at 510. Here, the prompt is dynamically adjusted to incorporate contextually relevant keywords, refine the tone or complexity of the language, or explicitly instruct the LLM to consider specific aspects of the enterprise or content context during its response generation, aiming for a more accurate and user-centric answer. After the prompt modification, the process advances to the final answer evaluation at 512.
The final decision point in this processing flow is at box 512, where the system determines whether the answer generated by the LLM should undergo further modification based on the Enterprise AI Context before being presented to the user. This decision considers a range of contextual factors, such as the user's seniority or role within the company (from the Enterprise Subcontext), which might influence the expected level of detail or the appropriate language for the response. Furthermore, the system might consider the user's previously expressed preferences for answer format or the inclusion of specific types of information (from the Content Cloud Subcontext, such as a preference for concise summaries). A “No” at this stage indicates that the LLM-generated answer is deemed satisfactory and is directly provided to the user at step 516. However, a “Yes” decision leads to the answer modification step at 514. Here, the generated answer is actively refined to incorporate contextually relevant details, adjust the formatting for better readability, or include specific disclaimers or caveats based on organizational policies or data access restrictions. Following this context-driven answer modification, the final modified answer is presented to the user.
In essence,
The process initiates at step 602, where the foundation for structured querying is laid through the creation and storage of one or more structured file representations within the CMS. These representations typically encompass well-organized data formats such as XLS or CSV files, characterized by their tabular structure of rows and columns, providing a standardized framework for storing and managing structured information. These structured files constitute a critical segment of the enterprise's knowledge base, holding the potential to answer a wide range of analytical and factual questions.
Following the establishment of these structured data assets within the CMS, the system will identify one or more “structures” within the structured file at 603. For example, the structures identified within the structured file may include one or more “tables” having a tabular structure comprising a set of rows and columns.
It is noted that a given file may include multiple tables that can be identified. For example, an excel file can have multiple tables inside of it, where each of these tables inside the excel file may represent completely different sets of information. Therefore, each of the multiple tables within the excel files are found in step 603.
For each of the identified tables, a separate schema can be identified. Table identification can be done using machine learning model or using simple heuristics. The system therefore performs schema acquisition at 604. Here, the system retrieves the table and schema definitions for a subset, or potentially all, of the stored structured file representations. Notably, the Enterprise AI Context can play a significant role in optimizing this schema acquisition process. Leveraging the rich contextual understanding of the user's specific query, their organizational role and responsibilities, the intricate network of their professional collaborations, and the overall relevance and popularity of various files across the enterprise, the system can strategically select and process only those structured files deemed most likely to contain the information pertinent to the user's needs. This context-aware filtering significantly enhances the efficiency of the process by focusing computational resources on the most promising data sources, thereby accelerating the subsequent query generation.
The system then analyzes the selected files to decipher their underlying structural organization. For example, by identifying embedded tables. The system can determine the names and data types of each column, and discerning any existing relationships or constraints, such as primary and foreign key linkages, that govern the data's integrity and interconnectivity. This extracted schema information forms the essential blueprint for constructing accurate and effective SQL queries.
At 605, the system will load the tables from the structured file into the database. In previous steps, the system has identified tables in the structured file and defined their schema. The goal is to be able to query those tables via SQL or any query-related language. To do this, the system will extract those tables from the structured file and load them into the database.
At step 606, the system embarks on the creation of an LLM prompt, a carefully crafted instruction designed to guide the Large Language Model in the generation of the desired SQL query. This prompt is typically formulated based on the user's initial natural language request (605), ensuring that the generated query directly addresses the user's information need. However, the prompt's effectiveness is further amplified by the intelligent incorporation of the Enterprise AI Context. Information about the user's preferred level of detail in past interactions, their level of familiarity with structured data concepts, or even specific tables and columns that the user or their team frequently access can be seamlessly integrated into the prompt. This contextual enrichment provides the LLM with valuable cues, enabling it to generate a more targeted, semantically accurate, and contextually appropriate SQL query. Subsequently, at step 608, this meticulously designed prompt is received by the LLM. The LLM then employs sophisticated natural language to SQL (NL2SQL) techniques to interpret the user's natural language question, taking into account the provided schema information and the contextual cues embedded within the prompt, and translates this understanding into a syntactically correct and logically sound SQL query that can be executed against the structured data.
The process at step 608 of
Modern NL2SQL systems often employ a variety of sophisticated NLP methodologies. One prominent approach involves semantic parsing, where the natural language query is broken down into its constituent parts, and a semantic representation of the query's intent is constructed. This semantic parse captures the relationships between different entities and actions mentioned in the query. For instance, in the query “Show me the total sales for the ‘Project X’ in 2024,” a semantic parser would identify “total sales” as the aggregation function, “‘Project X’” as a filter condition on a product or project entity, and “2024” as a filter condition on a date entity. This structured representation then serves as an intermediate step in the translation to SQL.
Another widely adopted technique leverages machine learning, particularly deep learning models. These models are trained on large datasets of natural language questions and their corresponding SQL queries. By learning the patterns and relationships between natural language and SQL, these models can predict the appropriate SQL query for a new, unseen natural language input. Different neural network architectures, such as sequence-to-sequence models (e.g., using LSTMs or Transformers), are commonly employed for this task. These models learn to encode the natural language query into a contextualized representation and then decode this representation into the target SQL query, often predicting the SQL keywords, table names, and column names sequentially.
Furthermore, advanced NL2SQL systems often incorporate knowledge about the database schema. This schema information, obtained in step 604 of
In the context of the enhanced RAG system, the Enterprise AI Context can further enhance the NL2SQL process. By providing the LLM with information about the user's role, their frequently accessed data, and relevant enterprise terminology, the context can help to disambiguate ambiguous natural language queries and guide the LLM towards generating SQL queries that are not only syntactically correct but also more aligned with the user's specific information needs and the organizational context. For example, if a user asks “sales figures,” the context might indicate that, for this user's department, “sales figures” typically refers to data within a specific table related to their product line in the “Project X” database. This contextual grounding allows the LLM to generate a more precise and relevant SQL query than would be possible with just the natural language input and the raw schema.
The following is an example prompt that may be used in some embodiments to perform SQL generation: “Here is the database structure {INSERT HERE DATABASE_SCHEMA}. Here is the natural language query {INSERT_USER_NATURAL_LANGUAGE_QUERY_HERE}. Generate SQL query answering that user question and ran against the given database schema”.
Once the LLM has successfully generated the SQL query, the system proceeds to step 610, where this query is executed against the relevant structured content residing within the CMS. This execution triggers the database engine to retrieve the specific data records that satisfy the conditions and criteria defined in the generated SQL query. The raw results returned from the database are typically in a structured, tabular format, which, while precise, may not be immediately accessible or easily interpretable by the average user who posed the initial natural language question. Therefore, at step 612, the system undertakes the crucial task of constructing natural language results from this structured data. This transformation is accomplished using natural language generation (NLG) techniques. These techniques involve analyzing the retrieved tabular data and generating human-readable sentences, paragraphs, or summaries that articulate the findings in a clear, concise, and contextually relevant manner, directly addressing the user's original natural language inquiry. The NLG process is further enhanced by the Enterprise AI Context, allowing the system to tailor the phrasing, the level of detail provided in the answer, and even the specific data points emphasized, to align with the user's preferences, their organizational role, and the broader context of their information need.
The process at step 612 of
Several key steps and techniques are typically involved in the NLG process at this stage. The first step often involves content determination, where the system identifies the most important pieces of information within the retrieved tabular data that are relevant to the user's original query. This involves analyzing the data based on the query's intent and potentially leveraging the Enterprise AI Context to prioritize information that is most likely to be of interest to the user based on their role, past interactions, or collaborative network. For instance, if the user asked for “top performing products,” the system would identify the product names and their corresponding sales figures as the key content to be conveyed.
Following content determination is data-to-text structuring. This step involves organizing the selected data points into a logical and coherent structure for natural language expression. Various rhetorical structures can be employed, such as listing, comparison, summarization, or narration, depending on the nature of the query and the retrieved data. For example, if the query involved comparing sales across different regions, the NLG system might structure the output to explicitly highlight these comparisons. This stage ensures that the generated text flows naturally and effectively conveys the intended meaning.
The next critical phase is lexicalization, which involves selecting appropriate words and phrases to express the structured data in natural language. This includes choosing the right vocabulary, considering synonyms and paraphrases, and ensuring that the language used is clear, unambiguous, and suitable for the user. For instance, instead of simply stating “Product A: 100,” the system might generate a more descriptive phrase like “Product A achieved sales of 100 units.” The choice of words can also be influenced by the Enterprise AI Context, such as using terminology familiar to the user's specific domain or industry.
Referring expression generation is another important aspect, focusing on how to refer to entities within the generated text. This involves deciding whether to use pronouns, definite or indefinite articles, and descriptive adjectives to ensure clarity and avoid ambiguity. For example, after introducing “Project X,” subsequent references might use “the project” for conciseness.
The aggregation of information is also a key technique, particularly when dealing with multiple data points. Instead of generating a separate sentence for each data point, NLG systems often group related information together to create more concise and informative sentences or paragraphs. For example, instead of saying “Sales in Q1 were $1000. Sales in Q2 were $1200,” the system might generate “Total sales were $1000 in Q1 and increased to $1200 in Q2.”
Finally, linguistic realization involves generating the actual surface form of the text, ensuring grammatical correctness, proper sentence structure, and appropriate punctuation. This stage uses grammatical rules and linguistic models to produce fluent and well-formed natural language output. The overall goal of these NLG techniques is to transform the structured data retrieved from the database into a meaningful and easily understandable answer that directly addresses the user's original natural language query, effectively bridging the gap between data and human comprehension. The Enterprise AI Context further refines this process by ensuring the generated natural language is tailored to the user's specific needs and the broader organizational understanding.
The following is an example prompt that may be used for the natural language response: “ Here is the user natural language query {INSERT_USER_NATURAL_LANGUAGE_QUERY_HERE} and database structure {INSERT_HERE_DATABASE_SCHEMA}. As a result of running this {INSERT_HERE_SQL_QUERY} we got {INSERT_SQL_RESULT_HERE}. Please generate the answer to user query using those results”.
From step 612, the processing may conditionally go to 606, where this portion of the flow is referred to herein as “error correction”. The executed query in 610 may on occasion return an error. This may occur, for example, due to incorrectly generated SQL that is executed. In this situation, the SQL-generation processing may be re-initiated with the added information about the previously generated SQL being incorrect, along with citation of that SQL query to be advantageously used by LLM to redo the SQL generation.
At step 614, the system generates and presents the final result to the user through the intuitive chat interface (404 in
Therefore, what has been described is an improved approach to implement RAG-based techniques to search or content.
The present invention solves the limitations of current RAG systems by introducing an approach to contextual understanding in information retrieval. This approach focuses on capturing and utilizing a more holistic view of the factors that contribute to the relevance of information within an enterprise environment. By intelligently processing various signals and relationships, the invention improves the accuracy and efficiency of information retrieval and the quality of the generated responses.
System Architecture Overview Additional System Architecture ExamplesAccording to an embodiment of the disclosure, computer system 8A00 performs specific operations by data processor 807 executing one or more sequences of one or more program instructions contained in a memory. Such instructions (e.g., program instructions 8021, program instructions 8022, program instructions 8023, etc.) can be contained in or can be read into a storage location or memory from any computer readable/usable storage medium such as a static storage device or a disk drive. The sequences can be organized to be accessed by one or more processing entities configured to execute a single process or configured to execute multiple concurrent processes to perform work. A processing entity can be hardware-based (e.g., involving one or more cores) or software-based, and/or can be formed using a combination of hardware and software that implements logic, and/or can carry out computations and/or processing steps using one or more processes and/or one or more tasks and/or one or more threads or any combination thereof.
According to an embodiment of the disclosure, computer system 8A00 performs specific networking operations using one or more instances of communications interface 814. Instances of communications interface 814 may comprise one or more networking ports that are configurable (e.g., pertaining to speed, protocol, physical layer characteristics, media access characteristics, etc.) and any particular instance of communications interface 814 or port thereto can be configured differently from any other particular instance. Portions of a communication protocol can be carried out in whole or in part by any instance of communications interface 814, and data (e.g., packets, data structures, bit fields, etc.) can be positioned in storage locations within communications interface 814, or within system memory, and such data can be accessed (e.g., using random access addressing, or using direct memory access DMA, etc.) by devices such as data processor 807.
Communications link 815 can be configured to transmit (e.g., send, receive, signal, etc.) any types of communications packets (e.g., communication packet 8381, communication packet 838N) comprising any organization of data items. The data items can comprise a payload data area 837, a destination address 836 (e.g., a destination IP address), a source address 835 (e.g., a source IP address), and can include various encodings or formatting of bit fields to populate packet characteristics 834. In some cases, the packet characteristics include a version identifier, a packet or payload length, a traffic class, a flow label, etc. In some cases, payload data area 837 comprises a data structure that is encoded and/or formatted to fit into byte or word boundaries of the packet.
In some embodiments, hard-wired circuitry may be used in place of or in combination with software instructions to implement aspects of the disclosure. Thus, embodiments of the disclosure are not limited to any specific combination of hardware circuitry and/or software. In embodiments, the term “logic” shall mean any combination of software or hardware that is used to implement all or part of the disclosure.
The term “computer readable medium” or “computer usable medium” as used herein refers to any medium that participates in providing instructions to data processor 807 for execution. Such a medium may take many forms including, but not limited to, non-volatile media and volatile media. Non-volatile media includes, for example, optical or magnetic disks such as disk drives or tape drives. Volatile media includes dynamic memory such as RAM.
Common forms of computer readable media include, for example, floppy disk, flexible disk, hard disk, magnetic tape, or any other magnetic medium; CD-ROM or any other optical medium; punch cards, paper tape, or any other physical medium with patterns of holes; RAM, PROM, EPROM, FLASH-EPROM, or any other memory chip or cartridge, or any other non-transitory computer readable medium. Such data can be stored, for example, in any form of external data repository 831, which in turn can be formatted into any one or more storage areas, and which can comprise parameterized storage 839 accessible by a key (e.g., filename, table name, block address, offset address, etc.).
Execution of the sequences of instructions to practice certain embodiments of the disclosure are performed by a single instance of a computer system 8A00. According to certain embodiments of the disclosure, two or more instances of computer system 8A00 coupled by a communications link 815 (e.g., LAN, public switched telephone network, or wireless network) may perform the sequence of instructions required to practice embodiments of the disclosure using two or more instances of components of computer system 8A00.
Computer system 8A00 may transmit and receive messages such as data and/or instructions organized into a data structure (e.g., communications packets). The data structure can include program instructions (e.g., application code 803), communicated through communications link 815 and communications interface 814. Received program instructions may be executed by data processor 807 as it is received and/or stored in the shown storage device or in or upon any other non-volatile storage for later execution. Computer system 8A00 may communicate through a data interface 833 to a database 832 on an external data repository 831. Data items in a database can be accessed using a primary key (e.g., a relational database primary key).
Processing element partition 801 is merely one sample partition. Other partitions can include multiple data processors, and/or multiple communications interfaces, and/or multiple storage devices, etc. within a partition. For example, a partition can bound a multi-core processor (e.g., possibly including embedded or co-located memory), or a partition can bound a computing cluster having plurality of computing elements, any of which computing elements are connected directly or indirectly to a communications link. A first partition can be configured to communicate to a second partition. A particular first partition and particular second partition can be congruent (e.g., in a processing element array) or can be different (e.g., comprising disjoint sets of components).
A module as used herein can be implemented using any mix of any portions of the system memory and any extent of hard-wired circuitry including hard-wired circuitry embodied as a data processor 807. Some embodiments include one or more special-purpose hardware components (e.g., power control, logic, sensors, transducers, etc.). Some embodiments of a module include instructions that are stored in a memory for execution so as to facilitate operational and/or performance characteristics pertaining to accessing a dynamically extensible set of content object workflows. A module may include one or more state machines and/or combinational logic used to implement or facilitate the operational and/or performance characteristics pertaining to accessing a dynamically extensible set of content object workflows.
Various implementations of database 832 comprise storage media organized to hold a series of records or files such that individual records or files are accessed using a name or key (e.g., a primary key or a combination of keys and/or query clauses). Such files or records can be organized into one or more data structures (e.g., data structures used to implement or facilitate aspects of accessing a dynamically extensible set of content object workflows). Such files, records, or data structures can be brought into and/or stored in volatile or non-volatile memory. More specifically, the occurrence and organization of the foregoing files, records, and data structures improve the way that the computer stores and retrieves data in memory, for example, to improve the way data is accessed when the computer is performing operations that pertain to accessing a dynamically extensible set of content object workflows, and/or for improving the way data is manipulated when performing computerized operations pertaining to accessing a dynamically extensible set of applications through a content management system to perform workflows over content objects managed by the content management system.
A portion of workspace access code can reside in and be executed on any access device. Any portion of the workspace access code can reside in and be executed on any computing platform 851, including in a middleware setting. As shown, a portion of the workspace access code resides in and can be executed on one or more processing elements (e.g., processing element 8051). The workspace access code can interface with storage devices such as networked storage 855. Storage of workspaces and/or any constituent files or objects, and/or any other code or scripts or data can be stored in any one or more storage partitions (e.g., storage partition 8041). In some environments, a processing element includes forms of storage, such as RAM and/or ROM and/or FLASH, and/or other forms of volatile and non-volatile storage.
A stored workspace can be populated via an upload (e.g., an upload from an access device to a processing element over an upload network path 857). A stored workspace can be delivered to a particular user and/or shared with other particular users via a download (e.g., a download from a processing element to an access device over a download network path 859).
In the foregoing specification, the disclosure has been described with reference to specific embodiments thereof. It will however be evident that various modifications and changes may be made thereto without departing from the broader spirit and scope of the disclosure. For example, the above-described process flows are described with reference to a particular ordering of process actions. However, the ordering of many of the described process actions may be changed without affecting the scope or operation of the disclosure. The specification and drawings are to be regarded in an illustrative sense rather than in a restrictive sense.
Claims
1. A method, comprising: generating, based at least in part upon the context information, a structured query for retrieving structured content from a structured data repository and an unstructured query for retrieving unstructured content from an unstructured data repository, wherein generating the structured query comprises using the context information to identify one or more relevant tables, fields, or filtering conditions for the structured query, and wherein generating the unstructured query comprises using the context information to identify one or more semantically related terms. concepts, or entities for the unstructured query; and
- identifying user activities in a content management system;
- recording the user activities in a database;
- generating context information for a user and other entities within the content management system related to the user; and
- executing the structured query against the structured data repository and the unstructured query against the unstructured data repository to retrieve respective structured content and unstructured content.
2. The method of claim 1, wherein the structured query comprises a SQL query for structured content.
3. The method of claim 1, wherein the context information corresponds to an AI enterprise context.
4. The method of claim 1, wherein the context information corresponds to a content cloud context.
5. The method of claim 1, wherein the structured query and the unstructured query are generated as part of a plurality of queries that further comprises a web query for retrieving web content from a data source external to the content management system.
6. The method of claim 5, wherein query results from multiple types of queries are concatenated together.
7. The method of claim 5, wherein queried content is filtered by the context information.
8. A non-transitory computer readable medium having stored thereon a sequence of instructions which, when stored in memory and executed by one or more processors causes the one or more processors to perform a set of acts, the set of acts comprising: generating, based at least in part upon the context information, a structured query for retrieving structured content from a structured data repository and an unstructured query for retrieving unstructured content from an unstructured data repository, wherein generating the structured query comprises using the context information to identify one or more relevant tables, fields, or filtering conditions for the structured query, and wherein generating the unstructured query comprises using the context information to identify one or more semantically related terms, concepts, or entities for the unstructured query; and
- identifying user activities in a content management system;
- recording the user activities in a database;
- generating context information for a user and other entities within the content management system related to the user; and
- executing the structured query against the structured data repository and the unstructured query against the unstructured data repository to retrieve respective structured content and unstructured content.
9. The computer readable medium of claim 8, wherein the structured query comprises a SQL query for structured content.
10. The computer readable medium of claim 8, wherein the context information corresponds to an AI enterprise context.
11. The computer readable medium of claim 8, wherein the context information corresponds to a content cloud context.
12. The computer readable medium of claim 8, wherein content, structured query and the unstructured query are generated as part of a plurality of queries that further comprises a web query for retrieving web content from a data source external to the content management system.
13. The computer readable medium of claim 12, wherein query results from multiple types of queries are concatenated together.
14. The computer readable medium of claim 12, wherein queried content is filtered by the context information.
15. A system comprising: generating, based at least in part upon the context information, a structured query for retrieving structured content from a structured data repository and an unstructured query for retrieving unstructured content from an unstructured data repository, wherein generating the structured query comprises using the context information to identify one or more relevant tables, fields, or filtering conditions for the structured query, and wherein generating the unstructured query comprises using the context information to identify one or more semantically related terms, concepts, or entities for the unstructured query; and executing the structured query against the structured data repository and the unstructured query against the unstructured data repository to retrieve respective structured content and unstructured content.
- a storage medium having stored thereon a sequence of instructions; and
- one or more processors that execute the sequence of instructions to cause the one or more processors to perform a set of acts, the set of acts comprising: identifying user activities in a content management system; recording the user activities in a database; generating context information for a user and other entities within the content management system related to the user; and
16. The system of claim 15, wherein the structured query comprises a SQL query for structured content.
17. The system of claim 15, wherein the context information corresponds to an AI enterprise context.
18. The system of claim 15, wherein the context information corresponds to a content cloud context.
19. The system of claim 15, wherein the structured query and the unstructured query are generated as part of a plurality of queries that further comprises a web query for retrieving web content from a data source external to the content management system.
20. The system of claim 19, wherein query results from multiple types of queries are concatenated together or where queried content is filtered by the context information.
Type: Application
Filed: May 23, 2025
Publication Date: Nov 26, 2026
Applicant: Box, Inc. (Redwood City, CA)
Inventors: Marcin Zakidalski (Gdynia), Przemyslaw Kusiak (Warszawa), Mateusz Plesinski (Warszawa), Przemyslaw Debek (Warszawa), Anna Naroska (Legionowo), Marian Dabrowski (Warszawa), Damian Serwin (Kraków), Andrii Shamanov (Kraków)
Application Number: 19/218,013