Method of database querying and response generation and system therefor
The database querying system leverages vector databases and LLMs to unify data access and response generation across diverse applications, addressing data confidentiality and accuracy challenges, thereby improving operational efficiency and user experience.
Patent Information
- Application Number
- PCT/IL2025/050291
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-02
- Filing Date
- 2025-03-31
- Publication Date
- 2025-10-09
AI Technical Summary
Existing systems face challenges in efficiently accessing and aggregating data across multiple cloud-based applications while maintaining data confidentiality and generating accurate responses to user queries, particularly in environments where data is scattered across various platforms like project management and communication tools.
A database querying system that utilizes vector databases to store embedding vectors of data items from different applications, enabling unified search and response generation through advanced AI systems like Large Language Models (LLMs), while ensuring data confidentiality by processing and storing data in a transient memory.
Facilitates seamless data retrieval and generation of concise, accurate responses across multiple applications, enhancing operational efficiency and user experience by maintaining data confidentiality and adhering to access levels.
Smart Images

Figure IL2025050291_09102025_PF_FP_ABST
Abstract
Description
[0001] METHOD OF DATABASE QUERYING AND RESPONSE GENERATION AND SYSTEM THEREFOR
[0002] TECHNICAL FIELD
[0003] The presently disclosed subject matter relates to the field of database querying and, more specifically, to vector database querying and response generation.
[0004] BACKGROUND
[0005] Vector databases have emerged as a widely utilized technology for supporting the rapid growth of data-driven applications, particularly in areas such as artificial intelligence (Al), machine learning (ML), computer vision, natural language processing (NLP), and similar domains that require efficient handling of high-dimensional data vectors. Unlike traditional relational databases that store data in tables with rows and columns, vector databases are designed to store and manage data represented in the form of vectors, i.e., arrays of numbers, known as embeddings, each representing complex data points (such as words, sentences, images, or any other kind of data) in a high-dimensional space. The main advantage of the embeddings resides in their generation through training processes using models, which capture not just the raw data, but the context and relationships within the data in a manner that is computationally efficient to process. In embeddings, semantic or contextual similarities between the data points are reflected by their proximity within the space. As such, in NLP, word embeddings capture syntactic and semantic word relationships based on their usage in text. Words used in similar contexts are positioned closely within the vector space, allowing algorithms to understand synonyms, antonyms, and overall context. Similarly, in computer vision, embeddings can represent images in such a way that images with similar content are closer together in the embedding space.
[0006] The vector format and, inherently, vector database storing numerous embeddings representing data points, typically offer a more efficient way to handle complex queries that involve similarity searches, nearest neighbor searches, or pattern recognition. Searching a vector database is performed by generating a vector corresponding to a user query, and identifying vectors that are "closest" to the query vector based on various distance metrics between two vectors, such as Euclidean distance or cosine similarity.
[0007] In addition to the aforementioned challenges and considerations surrounding vector databases, the importance of maintaining the confidentiality of data managed by an entity cannot be exaggerated. In an era where data breaches and unauthorized access are increasingly common, ensuring the security and privacy of sensitive information by entities is paramount. This concern is magnified in contexts where entities store personal, financial, or proprietary business data, necessitating stringent data protection measures. The necessity for entities, along with any third parties that manage applications with access to these entities' storage, to implement strong encryption, access control mechanisms, and adhere to regulatory standards, is crucial for protecting data against potential threats.
[0008] Consequently, there is a need to maintain data confidentiality.
[0009] GENERAL DESCRIPTION
[0010] Today, many organizations utilize a range of applications, each with its own cloud-based storage system. Users within these organizations frequently encounter difficulties in efficiently and accurately accessing data scattered across these varied platforms. Although each application offers its own search interface for user access, conducting a single search query across all these different applications simultaneously is not feasible. To overcome this obstacle, there is an urgent need for a unified system or mechanism that allows users to seamlessly access and aggregate data from all these applications. There is also a need to generate accurate and efficient responses to user queries by leveraging data from the various applications. This entails not only aggregating data across different platforms but also ensuring that the analysis and retrieval processes to generate the response are optimized. Implementing such a system would greatly improve operational efficiency and guarantee that the retrieved data is not only accurate and consistent but also up-to-date. This would provide users with effective data retrieval solutions and enhance the overall user experience within the organization's digital framework.
[0011] To address the above challenges, in accordance with certain embodiments of the presently disclosed subject matter, there is provided a database querying system, also referred to as a querying system, that enables a user to retrieve information from various applications utilized by his organization, in a single search. An organization may utilize various applications, including project management applications such as Jira, Monday or Asana, communication and collaboration applications such as Email application, Teams or Slack, client management applications, and optionally, additional data of users relevant to the organization. The various data items, referred to also herein and below as interactions, stored in the applications can be pre-embedded to corresponding embedding vectors and may be stored in a single database. The database may implement a vector format storage and is also referred to herein below as a vector database, storing the embedding vectors. In some cases, in order to retrieve information, a user may input a search query via a dedicated querying system. In response to receipt of a user's query, the querying system searches the vector database for information, e.g., relevant embeddings in the vector database, each representing a relevant data item, that can be used in replying to the user. Upon identifying relevant embeddings, the querying system accesses the corresponding data items stored in the applications' storage and retrieves the entire content of the relevant data items. The querying system then processes the data items and generates a response to the user's query. It should be note that throughout the following description and the appended claims, the terms 'embeddings', 'embedding vectors', 'embedded vectors' are used interchangeably.
[0012] Using a vector database to represent data items stored in various applications, and querying the vector database for information, is advantageous, as confidentiality of the stored data within the various applications is maintained. Although those data items that were found to be relevant are transmitted from the storage of the applications to the querying system, however, by searching a vector database instead of the data items themselves, it is possible to avoid duplicating, transmitting, and storing confidential data in an additional storage where the query is conducted.
[0013] Turning to generating a response to the user's query, with the immersive use of advanced Al systems, such as Large Language Models (LLMs) including GPT, BERT, T5, and others, trained on extensive datasets to understand, generate, and interact with human language, users wish to operate in an environment implementing a tailored data retrieval interaction that advances the search experience. Unlike traditional search engines that present a list of results, using an LLM for inquiries means anticipating a singular, concise response that directly addresses the user's query. In relation to the claimed subject matter, inquiring an LLM creates an expectation to receive a precise response to the user's query based on data stored in the various applications.
[0014] Using advanced Al systems for data retrieval is advantageous in streamlining the information retrieval process, thereby facilitating the shift towards more intuitive, conversational interfaces that leverage LLMs to offer immediate, relevant information without the need for users to sift through multiple search results.
[0015] In some cases, querying the vector database leads to the identification of multiple relevant embeddings. These embeddings correspond to data items that may be used when generating the response to the user's inquiry. The data items retrieved from various applications, that correspond the relevant embeddings, may include interactions such as emails or documents exchanged between individuals within an organization. These interactions may contain only partial information and may feature diverse content forms. For example, an email retrieved from an email application might consist of an employee's reply to a question posed by his manager. Although the interaction may include the whole chain of emails exchanged between the employee and this manager, it is standard practice in organizations not to expect comprehensive information in exchange emails, as they are not formal documents. Consequently, individuals might write brief emails, omitting some necessary details, and might refer to other individuals by first names only, relying on the recipient's familiarity with the context to understand the email fully and gather all pertinent information regarding the discussed topic. However, over time, relying on such emails, which only provide partial identifying details, as a foundation for generating information in response to a user query about the discussed topic, could result in providing an inaccurate or incomplete response. Hence, according to certain embodiments of the presently disclosed subject matter, the interactions may be associated with additional data and only then, are processed by the LLM. For instance, the additional data can be a unified structure of the interaction in a manner that assists the LLM to achieve an effective response. The additional data may also include enriching identifying data, such as full names of participants mentioned in the interaction. For example, an email data item and a project ticket data item from a project management application may both be subjected to a process of uniformity to create a uniform structure, as well as would be enriched with identifying details of the participants. Using a uniform structure for data items having diverse form may enhance the operation of the LLM and may improve the accuracy of its outcome.
[0016] According to a first aspect of the presently disclosed subject matter there is provided a computer-implemented method for database querying and response generation, the method comprising: receiving a search query; generating an embedding vector corresponding to the search query; accessing a vector database storing a plurality of vectors wherein each vector represents a data item stored in at least one native application; searching the vector database to identify matching vectors of the plurality of vectors to the embedding vector; retrieving from at least one of the native applications data items corresponding to the matching vectors; processing the data items to generate a response; and providing a response based on the processed data items. In addition to the above features, the computer implemented method according to this aspect of the presently disclosed subject matter can optionally comprise in some examples one or more of features (i) to (xvi) below, in any technically possible combination or permutation: (i). Wherein processing the data items is performed using large language model
[0017] (LLM).
[0018] (ii). Wherein the data items include interactions.
[0019] (iii). Wherein the search query is received from a first user having a predefined access level, and wherein generating the response is based on the access level.
[0020] (iv). Wherein retrieving the data items comprises filtering out data items that are unavailable to the user.
[0021] (v). Wherein retrieving the data items further comprises: storing the retrieved data items in a transient memory; and processing the data items in the transient memory
[0022] (vi). wherein prior to processing the interactions, the method further comprises: associating at least one of the interactions with additional data pertaining to the interaction; and processing the interactions and the additional data to generate the response.
[0023] (vii). The method further comprises: creating a respective unified representation of the at least one interaction; and associating the at least one interaction with the respective unified representation.
[0024] (viii). The method further comprises: obtaining conclusive identifying data pertaining to a relational nature of the interaction content in the at least one interaction; and associating the at least one interaction with the conclusive identifying data.
[0025] (ix). Wherein the relational nature interaction content includes time-related terms pertaining to a participant, and wherein the method further comprising: obtaining time zone of the participant; and associating the particular interaction with the time zone of the participant.
[0026] (x). Wherein the relational nature interaction content includes name-related terms pertaining to a participant, and wherein the method further comprises: obtaining identifying details of the participant; and associating the particular interaction with the identifying details.
[0027] (xi). Wherein the additional data is obtained from an external database.
[0028] (xii). The method further comprising: modifying the interaction based on the additional data.
[0029] (xiii). Wherein processing the data items comprises dynamically generating a prompt based on at least a subset of the interactions.
[0030] (xiv). Wherein generating the prompt comprises: prioritizing at least of the interactions according to priority criteria; and generating the prompt based on the prioritized interactions.
[0031] (xv). Wherein the priority criteria comprise at least one criterion selected from a group comprising: the number of participants, the nature of the interaction, search query's specifics, topics discussed in the interaction, and the date of the interaction.
[0032] (xvi). Wherein retrieving the data items comprises retrieving a subset of the data items for which a matching degree between the matching vectors to the embedding vector is above a predefined matching threshold, and processing the subset of the data items to generate the response.
[0033] The presently disclosed subject matter further comprises a computer system comprising a processing and memory circuitry that comprises at least one processor and a computer memory, the processing circuity is configured to execute a method as described above with reference to the first aspect and may optionally further comprise one or more of the features (i) to (xvi) listed above, mutatis mutandis, in any technically possible combination or permutation.
[0034] The presently disclosed subject matter further comprises a non-transitory computer readable storage medium tangibly embodying a program of instructions that, when executed by a computer, cause the computer to perform a method as described above with reference the first aspect, and may optionally further comprise one or more of the features (i) to (xvi) listed above, mutatis mutandis, in any technically possible combination or permutation. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to understand the invention and to see how it can be carried out in practice, embodiments will be described, by way of non-limiting examples, with reference to the accompanying drawings, in which:
[0036] Fig. 1 illustrates a high-level overview of an environment 110, enabling usage of a database querying system 100, in accordance with certain embodiments of the presently disclosed subject matter;
[0037] Fig. 2 illustrates a high-level functional block diagram of the database querying system 100, in accordance with certain embodiments of the presently disclosed subject matter; and
[0038] Fig. 3 illustrates a general flowchart of operations performed by the database querying system 100, in accordance with certain embodiments of the presently disclosed subject matter.
[0039] DETAILED DESCRIPTION
[0040] In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the invention. However, it will be understood by those skilled in the art that the presently disclosed subject matter may be practiced without these specific details. In other instances, well-known methods, procedures, components, and circuits have not been described in detail so as not to obscure the presently disclosed subject matter.
[0041] Unless specifically stated otherwise, as apparent from the following discussions, it is appreciated that throughout the specification discussions utilizing terms such as "receiving", "generating", "accessing", "representing", "searching", "retrieving", "processing", "providing", "performing", "filtering", "storing", "associating", "modifying", "creating", "obtaining", "prioritizing", or the like, refer to the action(s) and / or process(es) of a computer that manipulate and / or transform data into other data, said data represented as physical, such as electronic, quantities and / or said data representing the physical objects. The term "computer", "computer system", "computer device", "computerized device", "computerized method" or the like, should be expansively construed to cover any kind of hardware-based electronic device with one or more data processing circuitries. A processing circuitry can comprise, for example, one or more processors operatively connected to computer memory of any suitable sort, loaded with executable instructions for executing operations, as further described below. The one or more processors referred to herein can represent, for example, one or more general-purpose processing devices such as a microprocessor, a central processing unit, or the like. More particularly, a given processor may be one of: a complex instruction set computing (CISC) microprocessor, a reduced instruction set computing (RISC) microprocessor, a very long instruction word (VLIW) microprocessor, processor implementing other instruction sets, or a processor implementing a combination of instruction sets. The one or more processors may also be one or more special-purpose processing devices such as an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), a digital signal processor (DSP), a graphics processing unit (GPU), a network processor, or the like. By way of non-limiting example, computerized systems or devices can include the database querying system 100, disclosed in the present application.
[0042] The terms "non-transitory memory" and "non-transitory storage medium" used herein should be expansively construed to cover any volatile or non-volatile computer memory suitable to the presently disclosed subject matter.
[0043] The operations in accordance with the teachings herein may be performed by a computer specially constructed for the desired purposes or by a general-purpose computer specially configured for the desired purpose by a computer program stored in a non-transitory computer-readable storage medium.
[0044] Embodiments of the presently disclosed subject matter are not described with reference to any particular programming language. It will be appreciated that a variety of programming languages may be used to implement the teachings of the presently disclosed subject matter as described herein.
[0045] As used herein, phrases including "for example", "such as", "for instance" and variants thereof, describe non-limiting embodiments of the presently disclosed subject matter. Usage of conditional language, such as "may", "might", or variants thereof, should be construed as conveying that one or more examples of the subject matter may include, while one or more other examples of the subject matter may not necessarily include, certain methods, procedures, components, and features. Thus, such conditional language is not generally intended to imply that a particular described method, procedure, component or circuit is necessarily included in all examples of the subject matter. Moreover, the usage of non-conditional language does not necessarily imply that a particular described method, procedure, component, or circuit is necessarily included in all examples of the subject matter. Also, reference in the specification to "one case", "some cases", "other cases", or variants thereof, means that a particular feature, structure or characteristic described in connection with the embodiment(s) is included in at least one embodiment of the presently disclosed subject matter. Thus the appearance of the phrase "one case", "some cases", "other cases", or variants thereof does not necessarily refer to the same embodiment(s).
[0046] It is appreciated that certain features of the presently disclosed subject matter, which are, for clarity, described in the context of separate embodiments, may also be provided in combination in a single embodiment. Conversely, various features of the presently disclosed subject matter, which are, for brevity, described in the context of a single embodiment, may also be provided separately or in any suitable sub-combination.
[0047] Bearing this in mind, attention is drawn to Fig. 1 illustrating a high-level overview of an environment 110, enabling usage of a database querying system 100 (referred to herein and below as 'system 100'), in accordance with certain embodiments of the presently disclosed subject matter. The environment 110 is configured to enable execution of a computer-implemented method for database querying and response generation in the database querying system 100. Environment 110 may include several entities, all operatively communicating with each other and with the database querying system 100 via a network. Environment 110 may include one or more users each operating a respective user device 130a-130n, optionally, within an organization 150. For ease of explanation, the term 'user 130' shall be used to refer to either the user or the user device, it being understood that the description is equally applicable to one or multiple users. Environment 110 may also include a Client API 120 operatively communicating with the system 100. The Client API 120 is configured to receive from the user 130 a search query. The search query can be input by the user through e.g. a web-application, a web browser extension or an automated assistant integrated within a messaging platform, such as 'Instant Messaging Platform bot', each configured to operatively communicate with the Client API 120. The environment 110 further comprises one or more native applications 140a-n, referred to as native apps, each operatively communicating with the system 100. Each of the native apps 140a-n can be an application, app, optionally, cloud-based, which may be utilized by the organization 150.
[0048] The native applications 140a-140n can be Project / Task Management applications such as Jira, Monday, Linear or Asana, communication and collaboration applications such as Email applications such as Outlook or Gmail, communication or instant messaging applications such as Discord, 'Teams' or 'Slack', client management applications, File storage & Sharing / Knowledge management / team workspaces such as 'Confluence', Google Drive, Box, Dropbox, Sharepoint, Code hosting applications such as Github, Bitbucket, client manages systems such as CRMs and optionally, additional applications used for storing users' data, such as employees of the organization 150. Data items within the native apps 140 140a-140n can include any content which is stored within these applications, including but not only documents, emails, tickets, statuses, calendar events, chat messages, contacts, etc. A single data item may include an interaction for example, an email sent from one user to another, a chain of emails exchanged between two users, a chat between two users, a shared document to which users contribute content, etc. Each data item or interaction may be associated with metadata such as the date the interaction was generated and / or modified, the participants that are involved in that interaction, etc. Alternatively, such data can be learned from the data item or interaction content.
[0049] For illustration, consider the following example. Assume the organization 150 operates with a plurality of native apps 140a-140n including a Project Management Platform' (140a) for project management and 'Instant Messaging' (140b) for messaging. The following two data items are stored, each in its respective data storage of the native application:
[0050] The following is a ticket opened in a Project Management Platform . The ticket is stored in the relevant storage as 'record 1':
[0051] ID: AD-1131
[0052] Summary: supporting Email plugins for Enterprise-Search
[0053] Assigned to: Larry (LA, R&D)
[0054] Created at: 2024-01-01 00:16
[0055] Last Update: 2024-01-0200:16
[0056] The following is a ticket opened in an Instant Messaging application. The ticket is a conversation and is stored in the relevant storage as 'record 2':
[0057] [2024-01-0200:00] Jerry (NYC, Product): What's the status of the task AD- 1131?
[0058] [2024-01-0200:16] Larry (LA, R&D): Pending review.
[0059] [2024-01-0200:33] Jerry (NYC, Product): thank you.
[0060] The user 130 inserts the following status search query in a web browser extension (not shown), which is transmitted by the client API 120 to the system 100:
[0061] 'What's the status of AD-1131 and what is it about?'
[0062] The system 100 generates an embedding vector corresponding to the above status search query. The system 100 accesses a vector database (not shown) comprising a plurality of vectors, i.e. embeddings, each representing a data item stored in native apps 140a-140n, where each of the embeddings may be associated with data indicative of data item it represents. The system 100 searches the vector database to identify matching vectors to the embedding vector corresponding to the status search query. We assume that embeddings representing above two records (record 1 and record 2) are identified. Based on the two identified vectors, the system 100 retrieves the records themselves, record 1 and record 2, from respective native apps 140a and 140b. Then, the system 100 processes the two records to generate a response and provides the following response, e.g., by transmitting to the user's device 130 the response:
[0063] "AD-1131 is about supporting Email plugins for Enterprise-Search and the status is 'Pending review'".
[0064] Further details pertaining to the generation of the response are described below with reference to Fig. 3.
[0065] In some examples, the system 100 may be operatively connected to some or all native apps 140a-140n utilized by the organization 150, while in some cases, there may be native apps, such as 140c, used by the organization 150, which are not connected to the system 100. In such cases, the response is generated based on the data stored in all other native apps apart from 140c.
[0066] The database querying system 100 may further connect one or more external databases 150 such as the web, which may be used e.g., when generating the response.
[0067] Bearing this in mind, attention is drawn to Fig. 2, which illustrates a high-level functional block diagram of the database querying system 100, in accordance with certain embodiments of the presently disclosed subject matter.
[0068] The system 100 comprises a processor and memory circuitry (PMC) 210 comprising a processor 220 and a memory 230. The system 100 further comprises a communication interface 240 enabling the system 100 to operatively communicate with external devices and storages, such as the client API 120, native apps 140a-140n, and the external database 150.
[0069] The processor 220 is configured to execute several functional modules in accordance with computer-readable instructions implemented on a non-transitory computer-readable storage medium such as memory 230. Such functional modules may be realized by software stored in memory and executed by the processor 220. The processor 220 can likewise implement a querying module 222 and a generating module 226. The querying module 222 can comprise an embedding module 224. Memory 230 may store Vector DB 232, where vector DB 232 may comprise a plurality of vectors. Each vector represents a data item stored in the native apps 140a- 140n. In some examples, the vectors stored in the vector DB 232 correspond to only a subset of all data items stored in native apps 140a-140n. Memory 230 can also store LLM models 234 storing a plurality of LLM modules, each configured to generate a response. Some non-limiting examples of LLM models 234 include 'Vertex Al', HuggingFace and Open-AI GPT.
[0070] Memory 230 may also include transient memory 236, such as volatile memory 236, or a memory with a very low retention time, such as a few minutes, or in a memory that retains data only temporarily and is intended to forget information quickly, used for storing data items retrieved from native apps 140a-140n. Usage of the transient memory 236 for storing retrieved data items that is advantageous as, by its nature, the memory is used for temporary storage to ensure that the data stored only for a short time, and the data does not exist anymore after the response is provided to the user. This temporary storage of data items significantly enhances the confidentiality of the stored information in native apps 140a-140n, ensuring that such data is utilized solely for the query's purpose and the generation of the response, and is then discarded.
[0071] In some cases, the querying module 222 is configured to receive a search query and to generate an embedding vector corresponding to the search query, e.g. using embedding module 224. The querying module 222 can access the vector DB 232, and search for matching vectors to the embedding vector that was generated. Once such matching vectors are identified, the generating module 226 can retrieve from native apps 140a-140n data items corresponding to the matching vectors, e.g., based on data associated with each embedding indicative of the corresponding data item, and generate and provide a response based on the data items. Further details on generating the response are described below with reference to Fig. 3. The system 100 is configured to operate in real time, and to provide a response to a search query, in real time.
[0072] It should be noted that elements in Fig. 2 can be made up of any combination of software and hardware and / or firmware that performs the functions as defined and explained herein. Elements in Fig. 2 may be centralized in one location or dispersed over more than one location. For example, each one of elements 222 and 226 can be located at a different geographical location, remote from the other elements. Furthermore, in some examples of the presently disclosed subject matter, the system 100 may comprise fewer, more, and / or different elements than those shown in Fig. 2. For example, elements 222 and 226 show several separate elements, each dedicated for executing certain functions of the system 100, however it will be clear to any person skilled in the art that the functionalities of the system can be otherwise divided. For instance, in an alternative system-design, different functions assigned to the querying module 222 can be otherwise implemented by the generating module 226. Likewise, various elements described as distributed over different computers can be otherwise consolidated into a single computer device.
[0073] Those skilled in the art will also readily appreciate that the data repositories comprising the memory 230 can be consolidated or divided differently; databases can be shared with other systems or can be provided by other systems, including third-party equipment. Specifically, either or both Vector DB 232 and LLM models 234 can be stored external to the system 100, and the system 100 can communicate with these storages, e.g. using communication interface 240.
[0074] Referring to Fig. 3, there is illustrated a general flowchart of operations performed by the database querying system 100, in accordance with certain embodiments of the presently disclosed subject matter. The following flowchart operations are described with reference to elements described in the system 100. However, this is by no means binding, and the operations can be performed by elements other than those described herein.
[0075] A user such as the user 130, who wishes to retrieve information, can input a search query through e.g. a web application, a web browser extension, or an automated assistant integrated within a messaging platform. Each of these platforms operatively communicates with the Client API 120, which transmits the search query to the system 100.
[0076] In some cases, querying module 222 can receive the user's 130 search query (block 310). The querying module 222 can generate an embedding vector corresponding to the search query, e.g. using the embedding module 224 (block 320). Generating an embedding vector based on the search query that was inserted by the user 130 may be performed using known methods, e.g., embedding models provided by LLMs.
[0077] In certain cases, it is beneficial to provide the user 130 with a response derived from data he is permitted to access, based on permissions set in the native apps 140a- 140n. Through this approach, the user 130 is not exposed to access data that ought to remain inaccessible to him, while ensuring adherence to the organization's 150access level and standards, maintaining access controls, and avoiding privacy breaches. In order to adhere to the organization's 150 access level, the response can be generated or later tailored based on a predefined access level associated with the user 130, in accordance with the user's role / department / title. An access level can be predefined by the organization 150 for its users 130a-130n., optionally, for each native app 140a-140n When search queries are received from the user 130, his associated access level is retrieved, e.g. from a database of the organization 150 or from an access level list provided for all users of the particular organization 150. If the user 130 has more than one access levels e.g., for particular activities in the organization, then all his access levels are retrieved. In some examples, the relevant access level can be selected based on the context of the search query. The search query together with the user's access level can be used in querying the Vector DB 232. In cases where vectors representing data items stored in the native apps 140a-140n are associated with access level for users 130 of the organization 150, then the search for similar vectors can be performed under the constraint that the querying user 130 has access to data items represented by those vectors. Alternatively, or as an additional measure to ensure compliance with the organization's authorization policies, a search can be performed for all matching vectors, but then, the matching vectors can be filtered according to the user's access level, thus removing any matching vectors that exceed the user's access level. Filtering can be performed after matching vectors are identified, before the data items are retrieved, or after data items are retrieved but before the response is generated based on the data items. Filtering the results, either the matching vectors or the data items, is further described below. Hence, in some cases, a response for a particular, first, user 130 having a predefined access level is generated based on that access level. Filtering the results can also be performed based on other considerations, e.g. the user's preferences to receive a response of a certain form or a response based on interactions he was directly involved with.
[0078] After the search query embedding is generated, in some cases, the querying module 222 can access a vector database such as vector DB 232 (block 330). As described above, vector DB 232 can store a plurality of vectors, where each vector represents a data item stored in one of the native applications 140a-140n. In the example described, record 1 captures details from an interaction with a 'Project Management' ticket within the native 'Project Management' application. This record is stored within 'Project Management's own storage system, while its associated embedding vector is stored in vector database 232. Record 2 captures details from a separate interaction, of an 'Instant Messaging' conversation within the native 'Instant Messaging' application. Similarly, record 2 is stored in 'Instant Messaging''s storage system, and its corresponding embedding vector is also stored in vector database 232. The querying module 222 can access the vector DB 232 to identify one or more matching vectors to the embedding vector within the plurality of stored embedding vectors (block 340). Similarity between two vectors is often measured such that the distance between the vectors does not exceed a specified threshold. This threshold-based approach helps determine the relevance of two vectors to each other in response to a specific query. In the context of embeddings, similarity between vectors indicates that the data items represented by these vectors share semantic or contextual similarities.
[0079] Thus, when searching for embeddings based on a search query embedding, those vectors closest to the query, deemed the matching vectors, signify the data items most similar to the query, capturing not just the raw data but also the intricate context and relationships within the represented data items.
[0080] In the example of records 1 and 2, the embedding vector corresponding to the search query of 'What's the status of AD-1131 and what is it about?' would be close in the high-dimensional space to embedding vectors representing record 1 of the 'Project Management' ticket and record 2 of the 'Instant Messaging' conversation. As such, performing a search in the vector database 232, using known techniques such as similarity searches, nearest neighbor searches, or pattern recognition, for the embedding of the search query would identify those vectors that correspond to data items that are similar in context to the search query. Therefore, storing the vector database 232 of embeddings representing respective data items stored in native applications 104a-140n, facilitates conducting a search using similarity searches or the like on the stored embeddings, to identify data items similar to the search query.
[0081] After matching vectors are identified, the generating module 226 can retrieve from at least one of the native apps 140a-140n data items corresponding to the matching vectors (block 350), e.g. through communication interface 240. As described, each embedding in the vector DB 232 may be associated with data indicative of the data item it represents. Based on the data indicative of the matching vectors, the data items can be retrieved from the native apps.
[0082] In some examples, the generating module 226 retrieves only a subset of data items represented by a subset of matching vectors, e.g., to minimize system load. In such cases, the generating module 226 retrieves only those data items represented by the top matching vectors, for instance, the 10 matching vectors showing the highest matching degree from the embedding vector corresponding to the search query. To identify the top matching vectors, for each identified matching vector, the generating module 226 defines a matching degree, e.g., a value calculated based on the spatial distance of the matching vector from the search query's embedding vector. Matching vectors whose corresponding match degree falls below a predetermined threshold are eliminated. This predetermined threshold serves as a secondary threshold, set higher than the initial threshold used to identify matching vectors during the search. It is employed to further refine the selection, retaining only the top matching vectors. The generating module 226 can then retrieve only those data items associated with the retained matching vectors, which represent a subset of those initially identified matching vectors but with a match degree above the predefined matching threshold. These data items can then be utilized to generate the response. As described above, to adhere to the predefined access levels of organization, the response that is provided to the user 130 may depend on the access level of the user 130. In some examples, the search query embedding can be based on the access level of the user 130 and hence, the results of the search may include only those data items that meet the access level of the user 130. Irrespectively, after retrieving data items, privacy rules may apply to the results, and the compatibility of the results to the access level of the user 130 may be re-confirmed. In some examples, data items that do not meet the user's 130 access level, and hence should not be available to him may be filtered.
[0083] In existing systems, searches are typically performed directly on the databases or on internal indices that represent data items. Both the databases and internal indices are stored within the same database. This approach necessitates access to the entirety of the data. According to the presently disclosed subject matter, using a separate vector database, such as vector DB 232, for storing embeddings of data items stored elsewhere such as in native apps 140a-140n, is advantageous, as it enables provision of a comprehensive and up to date response to a user search query based on all data that is relevant and accessible to him, while both maintaining confidentiality of the stored information and adhering to access levels of the organization. In some examples, in order to maintain confidentiality of the information, after retrieving the data items, the items are stored only in the transient memory, such as transient memory 236 that retains data only temporarily, such that data are not retained once the memory 236 ceases to operate or the search terminates, optionally, the earlier of which. In some examples, the data are purged once the response is sent to the user 130. Processing the data items is also performed in the transient memory 236, while enhancing the confidentiality of the stored information in native apps 140a-140n, ensuring that such data are utilized solely for the query's purpose and the generation of the response, and is then purged.
[0084] In some examples, the retrieved data items include interactions of various types such as documents, emails, tickets, statuses. Each interaction may be associated with metadata such as the date the interaction was generated and / or modified, the participants that are involved in that interaction, etc. Alternatively, such data can be learned from the interaction content.
[0085] As mentioned earlier, users seeking information expect a concise and brief response that directly addresses their query. Presenting the user 130 with a list of search results from the native apps 140a-140n would necessitate them to meticulously examine each item to discern the relevance and comprehend the response to his query. This task could prove burdensome for the user 130, especially when the retrieved relevant data items can count tens of results, some of which may be more updated than others, while differing in relevancy. Moreover, the content of a specific data item might only offer incomplete context, such as in instances involving an email from a series of emails exchanged between two parties on a particular subject. Providing the results out of context may not be helpful to the user 130 to retrieve the required information. It is therefore advantageous, according to certain embodiments of the presently disclosed subject matter, to leverage LLMs to offer immediate, relevant information without the need for users to sift through multiple search results.
[0086] Therefore, referring back to fig. 3, in block 360, the data items retrieved from the native apps 140a-140n are processed, optionally in real time, to generate a response, e.g., using LLM. In cases where one or more data items were filtered as they should not be available to the user 130 based on his access level, then the remaining data items that were not filtered are processed to generate the response. In some examples, processing the data items includes dynamically generating a prompt, e.g. LLM-prompt- compatible presentation based at least on the interactions, or a subset of the interactions. For example, a prompt can be generated based on data extracted from the interactions or metadata associated with the interactions. If a 'Instant Messaging' interaction was retrieved, then the associated metadata can include the number of participants, their identities, the type of the interaction and any additional data that may be used to leverage the operation of the LLM. A prompt dynamically generated for that interaction may include the following form:
[0087] "An instant messaging interaction is provided, with 3 participants, named [...]. The content of the instant messaging interaction is as follows: [...]" In cases where a plurality of matching vectors is identified and corresponding data items are retrieved, a prompt should be generated using all or a selection of these items. The response from the LLM is influenced by the nature of the given input prompt. Among the retrieved data items, some may be more pertinent than others, and certain items may need to be disregarded, for instance, if they are no longer relevant. In order to leverage the LLM operation, in some examples, the data items can be prioritized, e.g., according to priority criteria. In some examples, the priority criteria may rely on one or more general assumptions, e.g., that the relevant response to the search query may be found in one or two interactions, or that the LLM capability is limited where too much information is provided in a prompt, resulting in the generated response deviating from the correct direction. The priority criteria can comprise a plurality of criteria such as the number of participants, the nature of the interaction and the search query, and the date of the interaction. Following are some non-limiting examples of priority criteria determined for a particular nature of an interaction:
[0088] 1. Ranking the interactions based on predefined heuristics, considering the search query's specifics. For instance, if the query contains the word 'Summarize', precedence and higher priority is given to more recent interactions over older ones. Conversely, if the query includes the word 'Explain', assign greater priority to lengthier interactions rather than shorter ones.
[0089] 2. An interaction involving a large number of participants can be assigned a higher or lower priority, either based on the details of the search query or regardless of them.
[0090] 3. Ranking the interactions according to the nature of the interaction and the search query. For example, if the query includes a request for the status of a project, then precedence and higher priority are given to interactions from project management native applications.
[0091] 4. Higher / lower priority can be given to an interaction including discussions of a particular topic, e.g., references to external organizations. For instance, if many interactions reference interaction A (for example, they include a link to A), it could be assigned a higher priority due to its frequent referencing.
[0092] Those versed in the art will realize that additional or other criteria can be determined, e.g., based on the operation of the particular organization and the specific native applications that it utilizes.
[0093] Therefore, in some examples, the interactions retrieved from the native apps 140a-140n can be prioritized according to priority criteria. In some examples, only one or some of the interactions are prioritized. In order to determine the priority for an interaction, the metadata associated with the interaction, such as the date or the number of participants, can be used. As described above, the priority criteria can comprise a plurality of optional criteria for determining the priority for each interaction, where the priority criteria comprise at least one criterion selected from a group comprising: the number of participants, the nature of the interaction, search query's specifics, topics discussed in the interaction, and the date of the interaction. The prompt can then be generated, based on the prioritized data items.
[0094] In some cases, inquiring LLM using the data items that were retrieved may lead to an imprecise outcome. As described above, each of the data items retrieved from the applications 140a-140n may feature diverse content forms including e.g., emails, shared documents, tickets, calendar events, chat messages, etc. It is therefore advantageous to convert the data items to a uniform structure of a prompt type, to leverage the operation of the LLM. Using a prompt structure of the retrieved data items to provide a response improves the accuracy and consistency of the LLM outcome. Moreover, some data items might include partial information. As described above, individuals might write brief emails, omitting some necessary details, and might refer to other individuals by first names only, relying on the recipient's familiarity with the context to understand the email or ticket fully. As such, the data items may be associated with additional data e.g., with enriching data to offer more comprehensive details on each item. Referring back to Fig. 3, according to certain embodiments of the presently disclosed subject matter, prior to processing the interactions, at least one of the interactions is associated with additional data (block 355), e.g., a respective unified representation of the interaction or enriching data, and only then, are processed by the LLM. The additional data can be obtained from an external database, e.g., the Web, one of the native apps 140a-140n from which the interaction originated, from the content of the interaction itself, or from another native application used by the organization. For instance, if there is mention of a competitor by an incomplete name, the full official name can be found online. Similarly, if there is mention of another organization's employee, their complete name can be retrieved from the company's database. Moreover, if the discussion involves another interaction, like a 'Project Management Platform' ticket mentioned in an email, the details of that ticket can be accessed and obtained, and also be stored in the transient memory 236. In some examples, based on the additional data, the interaction can be modified, e.g. by replacing the content of the interaction, where relevant, with the additional data. A modified interaction is then created and can then be processed to generate the response by the LLM.
[0095] Various kinds of additional data can be associated with the interaction. For example, to leverage the LLM operation, an interaction can be associated with a unified representation of the interaction. Since the interactions originate from different native apps, each having its particular structure, a unified and consistent structured data item that assists the LLM to achieve effective response can be generated and may be associated with the interaction. Another example includes replacing abbreviations or acronyms with the full terms, optionally, based on history of searches. For example, the database querying system 100 may store previously used terms and may use acronyms used in a current search query with its full term.
[0096] In some examples, original interaction content can include relational nature content. Such relational nature content can include phrases such as time-related terms e.g. ‘ 'last month', 'tomorrow', 'just', 'right now', etc. Processing interactions including such terms may reduce the accuracy of the LLM outcome. Conclusive identifying data for such phrases in the interaction's content can be associated with the interaction. For example, consider the following example of an Instant Messaging conversation ("record 3"):
[0097] [2024-24-0201:00] Jim: was task AD-1200 concluded yesterday? [2024-24-0201:16] Larisa: not yet. Asked Jeremy. He told me - tomorrow.
[0098] The terms 'yesterday' and 'tomorrow' are time-related terms and contribute little to the generation of the response in the LLM. These time-related terms can be replaced or associated with conclusive identifying data. For example, the time zone of Jim / Larisa can be obtained, e.g., from profile information associated with Jim / Larisa in the organization's database. Also, based on time data in Record 3 [2024-24-02 01:00], [2024-24-0201:16] the terms 'yesterday' and 'tomorrow' can be associated with [2024- 23-02] and [2024-25-02], respectively.
[0099] An additional example of relational nature content can include personal pronouns used to refer to people or things in the third person, such as 'he' 'she' 'they'. Such personal pronouns can be replaced with conclusive identifying data such as full names of individuals. In the above example, the nondescript pronouns 'he' can be replaced by "Jeremy" based on the context of the interaction or a chain of interactions. Yet another additional example of relational nature content can include nondescript locations or places, such as 'there' and 'here'. Such nondescript locations or places can also be replaced with conclusive identifying data of names of locations, e.g., based on the context of the interaction. To understand the context of the interaction and replace any relational nature content with conclusive identifying data, the interaction can be pre-processed, e.g., using LLMs to identify relational nature phrases in the interaction. Metadata associated with the interaction, such as time timestamp of the interaction, time zones, roles of participants in the interaction and their contact details, or the context of the interaction can be used to replace the relational nature content with conclusive identifying data.
[0100] Record 3 can be associated with the conclusive identifying data. Optionally, record 3 may be modified to read:
[0101] [2024-24-0201:00] Jim: was task AD-1200 concluded [2024-23-02]?
[0102] [2024-24-0201:16] Larisa: not yet. Asked Jeremy. Jeremy told Larisa - [2024-25- 02].
[0103] In some examples, the relational nature interaction content may include name- related terms pertaining to a participant, such as the mention of Jeremy in record 3 example above. In such cases, identifying details of the participant, e.g., of Jeremy, can be obtained, for example, from the organization's databases, and the identifying details can be associated with the interaction. For example, record 3 can be associated with 'Jeremy Smith' or to be modified to read:
[0104] [2024-24-02 01:00] Jim Brown: was task AD-1200 concluded [2024-23-
[0105] 02]?
[0106] [2024-24-02 01:16] Larisa Timber: not yet. Asked Jeremy Smith. Jeremy Smith told Larisa Timber - [2024-25-02].
[0107] The modified record 3 can then be processed to generate a response.
[0108] Referring back to block 360 in Fig. 3, the interactions retrieved from the native apps 140a-140n, either prioritized or associated with additional data as described above, can be processed to generate a response, e.g., using LLM, e.g., using one or more of models stored in LLM models 234. In the status example above: 'What's the status of AD-1131 and what is it about?' the following response can be generated based on Records 1 and 2: "AD-1131 is about supporting Email plugins for Enterprise-Search and the status is "Pending review".
[0109] The response can be provided to the user 130 (block 370). For example, the response can be provided to be displayed on the user's device, optionally, with the interactions on which the prompt is based, e.g., with links to records 1 and 2.
[0110] It is noted that the teachings of the presently disclosed subject matter are not bound by the flow chart illustrated in Fig. 3. In various examples of the presently disclosed subject matter, fewer, more, and / or different stages than those shown in Fig. 3 may be executed. In embodiments of the presently disclosed subject matter, one or more stages illustrated in the figures may be executed in a different order, and / or one or more groups of stages may be executed simultaneously, such as in the cases of prioritizing the interactions and associating the interactions with additional data described in detail above.
[0111] It is noted that, as is well known in the art, systems operating in real time may experience some delay between the onset of a command and its execution, due to various reasons such as processing time and / or network communication delay. The term real-time as used herein is meant to include near real-time i.e., operation in systems that may experience some internal delays.
[0112] It is to be understood that the invention is not limited in its application to the details set forth in the description contained herein or illustrated in the drawings. The invention is capable of other embodiments and of being practiced and carried out in various ways. Hence, it is to be understood that the phraseology and terminology employed herein are for the purpose of description and should not be regarded as limiting. As such, those skilled in the art will appreciate that the concept upon which this disclosure is based may readily be utilized as a basis for designing other structures, methods, and systems for carrying out the several purposes of the presently disclosed subject matter.
[0113] It will also be understood that the system according to the invention may be, at least partly, implemented on a suitably programmed computer. Likewise, the invention contemplates a computer program being readable by a computer for executing the method of the invention. The invention further contemplates a non-transitory computer-readable memory tangibly embodying a program of instructions executable by the computer for executing the method of the invention.
[0114] Those skilled in the art will readily appreciate that various modifications and changes can be applied to the embodiments of the invention as hereinbefore described without departing from its scope, defined by the appended claims.
Claims
CLAIMS1. A computer-implemented method for database querying and response generation, the method comprising: receiving a search query; generating an embedding vector corresponding to the search query; accessing a vector database storing a plurality of vectors wherein each vector represents a data item stored in at least one native application; searching the vector database to identify matching vectors of the plurality of vectors to the embedding vector; retrieving from at least one of the native applications data items corresponding to the matching vectors; processing the data items to generate a response; and providing a response based on the processed data items.
2. The method of claim 1, wherein processing the data items is performed using large language model (LLM).
3. The method of claim 2, wherein the data items include interactions.
4. The method of claim 3, wherein the search query is received from a first user having a predefined access level, and wherein generating the response is based on the access level.
5. The method of claim 4, wherein retrieving the data items comprises filtering out data items for which the user is not permitted access.
6. The method of any one of the preceding claims, wherein retrieving the data items further comprises: storing the retrieved data items in a transient memory; and processing the data items in the transient memory.
7. The method of claim 3, wherein prior to processing the interactions, the method further comprises: associating at least one of the interactions with additional data pertaining to the interaction; and processing the interactions and the additional data to generate the response.
8. The method of claim 7, further comprising: creating a respective unified representation of the at least one interaction; and associating the at least one interaction with the respective unified representation.
9. The method of claim 7 or 8, further comprising: obtaining conclusive identifying data pertaining to a relational nature of the interaction content in the at least one interaction; and associating the at least one interaction with the conclusive identifying data.
10. The method of claim 9, wherein the relational nature interaction content includes time-related terms pertaining to a participant, and wherein the method further comprising: obtaining time zone of the participant; and associating the particular interaction with the time zone of the participant.
11. The method of claim 9 or 10, wherein the relational nature interaction content includes name-related terms pertaining to a participant, and wherein the method further comprises: obtaining identifying details of the participant; and associating the particular interaction with the identifying details.
12. The method of any one of claims 7 to 11, wherein the additional data is obtained from an external database.
13. The method of any one of claims 7 to 12, further comprising: modifying the interaction based on the additional data.
14. The method of claim 3, wherein processing the data items comprises dynamically generating a prompt based on at least a subset of the interactions.
15. The method of claim 14, wherein generating the prompt comprises: prioritizing at least one of the interactions according to priority criteria; and generating the prompt based on the prioritized interactions.
16. The method of claim 15, wherein the priority criteria comprise at least one criterion selected from a group comprising: the number of participants, the nature of the interaction, search query's specifics, topics discussed in the interaction, and the date of the interaction.
17. The method of any one of the preceding claims, wherein retrieving the data items comprises retrieving a subset of the data items for which a matching degree between the matching vectors to the embedding vector is above a predefined matching threshold, and processing the subset of the data items to generate the response.
18. A computer system for database querying and response generation, the system comprising a processing circuitry comprising at least one processer and computer memory, the processing circuitry being configured to execute a method defined by claim 1.
19. The system of claim 18, wherein processing the data items is performed using large language model (LLM).
20. The system of claim 19, wherein the data items include interactions.
21. The system of any one of claims 18 to 20, wherein prior to processing the interactions, the processing circuitry being configured to: associate at least one of the interactions with additional data pertaining to the interaction; and process the interactions and the additional data to generate the response.
22. The system of any one of claims 18 to 21, wherein processing the data items comprises dynamically generating a prompt based on at least a subset of the interactions.
23. A non-transitory computer readable storage medium tangibly embodying a program of instructions that, when executed by a computer, cause the computer to perform a method database querying and response generation as defined by any one of claims 1 to 18.
Citation Information
Patent Citations
Search engine
US20180196877A1
Translating Search Queries on Online Social Networks
US20190108228A1
Comprehensive search engine scoring and modeling of user relevance
US20190392082A1
Neural network-based semantic information retrieval
US20220083603A1
Cited By
Data retrieval system with controlled access based upon security levels
US20260244782A1