Responses for electronic document queries

The document management system addresses inefficiencies in unstructured query processing by combining lexical and semantic searches, ensuring non-null responses while conserving resources.

US12817900B1Active Publication Date: 2026-12-01DOCUSIGN INC
View PDF 18 Cites 0 Cited by

Patent Information

Application Number
US19/042996
Authority / Receiving Office
US · United States
Patent Type
Patents(United States)
Current Assignee / Owner
Filing Date
2025-01-31
Publication Date
2026-12-01
Estimated Expiration
2045-01-31

AI Technical Summary

Technical Problem

Existing electronic document management systems struggle with ineffective and inefficient searching of unstructured input queries, often consuming additional computational resources due to the need for creating or modifying filters and manually analyzing documents to locate requested information, and may return null results.

Method used

A document management system that employs a two-stage process, first performing a lexical search on electronic documents and, if insufficient, a semantic search using vector database vectors to generate responses, conserving computational resources by intelligently determining the need for additional semantic analysis based on a threshold and context configuration data.

Benefits of technology

Efficiently generates non-null responses to unstructured queries, reducing computational resource consumption by optimizing the use of lexical and semantic searches, and improving the processing of electronic document data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure US12817900-D00000_ABST
    Figure US12817900-D00000_ABST
Patent Text Reader

Abstract

Techniques are described for a system configured to identify, based on an input query requesting a response, a set of electronic documents from a plurality of electronic documents. The system may further be configured to, based on determining the set of electronic documents satisfies a threshold, generate the response based at least on the set of electronic documents. The system may further be configured to, based on determining the set of electronic documents does not satisfy the threshold determine, based on the input query, one or more vectors stored at a vector database, the one or more vectors characterizing semantic information of one or more documents of the plurality of electronic documents, and generate, based at least on the one or more vectors, the response. The system may further be configured to output an indication of the response.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] This disclosure relates generally to electronic document management.BACKGROUND

[0002] Electronic document management allows for agreements to be electronically executed. For example, two parties may propose changes to an electronic agreement, and when the electronic agreement is acceptable, both parties may electronically sign the electronic agreement.SUMMARY

[0003] Techniques are described herein for generating responses to input queries. A document management system may lexically and / or semantically search information of electronic documents based on processing an input query. The document management system may lexically search information of electronic documents based on matching lexical information of input queries to lexical information of electronic documents. Lexical information may include data representing characters, keywords, structured object data, grammar, phonographic information, syntactic information, or the like. The document management system may semantically search information of electronic document using vectorized data encoding linguistic meanings of an input query and electronic documents. The document management system may process an input query to determine context configuration data for obtaining information for response generation. For instance, the document management system may categorize an input query to determine an intent associated with the input query. The document management system may determine context configuration data, such as a context window and / or other meta prompting information (e.g., in-context learning information), based on the intent associated with the input query (e.g., determine a small context window for an intent of an input query associated with identification of documents, determine a large context window for an intent of an input query associated with a recommendation or computation associated with documents, etc.).

[0004] The document management system may perform a lexical search of electronic documents using context configuration data. For example, the document management system may generate, according to context configuration data, a lexical query to determine whether character or other grammatical characteristics of electronic documents match corresponding characters or grammatical characteristics of an input query that have been encoded in the lexical query. The document management system may identify a set of documents based on the input query. For instance, the document management system may identify a set of documents by applying a lexical query to determine indications of electronic documents with matching lexical information associated with an input query. In some examples, based on determining an identified set of electronic documents satisfied a threshold, the document management system may generate a response to an input query. The document management system may generate the response based at least on the identified set of electronic documents. For example, the document management system may generate a prompt for a machine learning model (e.g., a generative machine learning model) that includes the identified set of electronic documents and data associated with the input query.

[0005] In some examples, based on determining an identified set of electronic documents does not satisfy a threshold, the document management system may determine vectors from a vector database that are numerical representations of semantic information of electronic documents in a high-dimensional latent space. For example, the document management system may determine vectors (e.g., data chunks including values that capture semantic information of electronic documents) based on a vector query generated for an input query. The document management system may generate a vector query for an input query by processing an input query according to context configuration data, for example. The document management system may generate a vector query by encoding semantic information associated with a request of the input query as a vector associated with vectors stored at the vector database. The document management system may determine one or more vectors from the vector database based on comparisons of the vector query to the vectors stored at the vector database. The document management system may generate a response based at least on the determined one or more vectors. For example, the document management system may generate a prompt including semantic information encoded in determined one or more vectors and an input query. The document management system may apply the prompt to a generative machine learning model to generate a response

[0006] The techniques described herein may provide one or more technical advantages that realize one or more practical applications. For example, the document management system may reply to unstructured input queries (e.g., input queries including unstructured text data that does not follow any convention and may include spelling errors) with non-null responses. Some electronic document managements may allow users to submit queries to request information on a corpus of electronic documents. For instance, such electronic document management systems may process user queries to output a set of electronic documents, or indications thereof, with labeled data that match filters, keywords, or other structured data of the user queries. By determining whether lexical searching results in enough information for a response using a threshold, the document management system, according to the techniques described herein, may determine whether additional, semantic information may need to be obtained to produce a non-null response. The document management system may preserve computational resources associated with subsequent semantic search of electronic documents by performing a semantic search in response to lexical search results satisfying a threshold. The document management system may, additionally or alternatively, conserve computational resources associated with performing the techniques described herein by classifying input queries and determining context configuration data indicating computational resources that may be used when analyzing various classes of input queries. In this way, the document management system may effectively and efficiently respond to unstructured input queries with non-null responses to improve a technical field of data processing (e.g., responding to queries associated with electronic documents based on searching databases of electronic documents).

[0007] For example, a system comprising processing circuitry and computer readable media. The computer readable media includes instructions that, when executed, cause the processing circuitry to identify, based on an input query requesting a response, a set of electronic documents from one or more databases storing a plurality of electronic documents. The instruction may further cause the processing circuitry to, based on determining the set of electronic documents satisfies a threshold, generate the response based at least on the set of electronic documents. The instruction may further cause the processing circuitry to, based on determining the set of electronic documents does not satisfy the threshold determine, based on the input query, one or more vectors stored at a vector database, the one or more vectors characterizing semantic information of one or more documents of the plurality of electronic documents, and generate, based at least on the one or more vectors, the response. The instruction may further cause the processing circuitry to output an indication of the response.

[0008] In some examples, a method includes identifying, by a document management system and based on an input query requesting a response, a set of electronic documents from one or more databases storing a plurality of electronic documents. The method may further include determine, by the document management system, whether the set of electronic documents satisfies a threshold. The method may further include based on determining the set of electronic documents satisfies the threshold, generating, by the document management system, the response based at least on the set of electronic documents. The method may further include based on determining the set of electronic documents does not satisfy the threshold: determining, by the document management system and based on the input query, one or more vectors stored at a vector database, the one or more vectors characterizing semantic information of one or more documents of the plurality of electronic documents, and generating, by the document management system and based at least on the one or more vectors, the response. The method may further include outputting, by the document management system, an indication of the response.

[0009] For example, computer-readable media is encoded with instructions that, when executed, cause processing circuitry to identify, based on an input query requesting a response, a set of electronic documents from one or more databases storing a plurality of electronic documents. The instructions may further cause the processing circuitry to, based on determining the set of electronic documents satisfies a threshold, generate the response based at least on the set of electronic documents. The instructions may further cause the processing circuitry to, based on determining the set of electronic documents does not satisfy the threshold: determine, based on the input query, one or more vectors stored at a vector database, the one or more vectors characterizing semantic information of one or more documents of the plurality of electronic documents, and generate, based at least on the one or more vectors, the response. The instructions may further cause the processing circuitry to output an indication of the response.

[0010] The details of one or more examples of the techniques of this disclosure are set forth in the accompanying drawings and the description below. Other features, objects, and advantages of the techniques will be apparent from the description and drawings, and from the claims.BRIEF DESCRIPTION OF THE DRAWINGS

[0011] FIG. 1 is a block diagram illustrating an example computing environment for generating and outputting responses to input queries, in accordance with the techniques of this disclosure.

[0012] FIG. 2 is a block diagram illustrating an example document management system for generating natural language responses, in accordance with techniques of this disclosure.

[0013] FIG. 3 is a flow diagram illustrating an example operation of generating a natural language response to an input query, in accordance with techniques of this disclosure.

[0014] FIG. 4 is a flow diagram illustrating an example operation of generating a natural language response using an electronic database search and / or a vector index search, in accordance with techniques of this disclosure.

[0015] FIG. 5 is a conceptual diagram illustrating an example user interface for requesting natural language responses, in accordance with techniques of this disclosure.

[0016] FIG. 6 is a flow diagram illustrating an example operation for generating a response to an input query, in accordance with techniques of this disclosure.

[0017] Like reference characters denote like elements throughout the text and figures.DETAILED DESCRIPTION

[0018] FIG. 1 is a block diagram illustrating example computing environment 100 for generating and outputting responses to input queries, in accordance with the techniques of this disclosure. Computing environment 100 may include document management system 102, entity 110, network 111, and machine learning system 190. Document management system 102 may provide storage and management of documents or document packages for users associated with user devices 108. Document management system 102 may include a collection of hardware devices, software components, and / or data stores that can be used to implement one or more applications or services provided to user devices 108 via network 111. Document management system 102 may be configured to allow users of user devices 108 to create and send documents to one or more recipients for negotiation, collaborative editing, electronic execution (e.g., electronic signature), automation of contract fulfillment, archival, and analysis, among other tasks.

[0019] Document management system 102 may be implemented within a centralized document system, an online document system, a document management system, or any type of digital management platform. Example environments for document management system 102 may include, but are not limited to online signature systems, online document creation and management systems, collaborative document and workspace systems, online workflow management systems, multi-party communication and interaction platforms, social networking systems, marketplace and financial transaction management systems, or any suitable digital transaction management platform.

[0020] Document management system 102 may be located on premises and / or in one or more data centers, with each data center a part of a public, private, or hybrid cloud. The applications or services may be distributed applications. The applications or services may support enterprise software, financial software, office or other productivity software, data analysis software, customer relationship management, web services, educational software, database software, multimedia software, information technology, healthcare software, or other types of applications or services. The applications or services may be provided as a service (-aaS) for Software-aaS, Platform-aaS, Infrastructure-aaS, Data Storage-aas (dSaaS), or other type of service.

[0021] Document management system 102 may allow user devices 108 to access documents, via network 111 using a communication protocol, as if such document was stored locally (e.g., to a hard disk of a corresponding user devices 108). Example communication protocols for accessing documents and objects may include, but are not limited to, Server Message Block (SMB), Network File System (NFS), or AMAZON Simple Storage Service (S3).

[0022] Intelligent agreement management (IAM) manager 115 of document management system 102 may manage workflows for electronic documents. As used herein, IAM 115 may include instructions for executing operations such as one or more of: helping to create agreements in a way that is collaborative, automated and integrated with all business processes and systems, helping to commit to agreements faster, more securely and with a better end-customer, partner and employee experience, or helping to manage agreements dynamically by, for example, breaking down the data hidden within, unlocking value, and eliminating or reducing unnecessary risk. For example, IAM manager 115 may provide tailored applications built for the needs of different individuals, teams, lines of business and / or industries. In some examples, IAM manager 115 may provide modular capabilities and / or workflow designer to build agreement process solutions to match business needs in an easy-to-use, no-code workflow tool. IAM manager 115 may provide enhanced integrations and interoperability to seamlessly connect agreement processes with critical business systems and enable the flow of agreement data across system 102 and partner solutions. In some examples, IAM manager 115 may provide a single, intelligent repository to centrally store, manage and analyze agreements across the organization, unlocking data trapped in agreements to drive efficiencies, uncover opportunities to lower costs and reduce risk.

[0023] For example, IAM manager 115 may access documents (e.g., stored in electronic documents database 116) to provide informed, data-backed decisions to entity 110. For instance, IAM manager 115 may proactively suggest and / or simplify a generation of a workflow and / or workflow steps (e.g., Docusign Maestro™). In some instances, IAM manager 115 may identify actionable insights, such as agreements with an upcoming renewal date (e.g., Docusign Navigator™). IAM manager 115 may provide artificial intelligence (AI) capabilities in one or more steps of an agreement lifecycle. For example, IAM manager 115 may provide capabilities for identifying agreements, auto-tagging dynamic fields, generating summaries, and / or identifying risks of an agreement. IAM manager 115 may provide contract lifecycle management (CLM). For example, IAM manager 115 may automate tasks (e.g., auto-populate new agreements or automate agreement routing) and / or manage complex workflows, strengthen compliance (e.g., set conditional rules for review of non-standard terms or allow a legal department to define pre-approved clauses), and / or drive business intelligence.

[0024] Network 111 may include the Internet and / or may include or represent any public or private communications network or other network. For instance, network 111 may be a cellular network, Wi-Fi®, ZigBee®, Bluetooth®, Near-Field Communication (NFC), satellite, enterprise, service provider, and / or other type of network enabling transfer of data between computing systems, servers, computing devices, and / or storage devices. One or more of such devices may transmit and receive data, commands, control signals, and / or other information across network 111 using any suitable communication techniques. Network 111 may include one or more network hubs, network switches, network routers, satellite dishes, or any other network equipment. Such network devices or components may be operatively inter-coupled, thereby providing for the exchange of information between computers, devices, or other components (e.g., between one or more client devices or systems and one or more computer / server / storage devices or systems). Each of the devices or systems illustrated in FIG. 1 may be operatively coupled to network 111 using one or more network links. The links coupling such devices or systems to network 111 may be Ethernet, Asynchronous Transfer Mode (ATM) or other types of network connections, and such connections may be wireless and / or wired connections. One or more of the devices or systems illustrated in FIG. 1 or otherwise on network 111 may be in a remote location relative to one or more other illustrated devices or systems.

[0025] Data exchanged over network 111 may be represented using any suitable format, such as hypertext markup language (HTML), extensible markup language (XML), or JavaScript Object Notation (JSON). In some aspects, network 111 may include encryption capabilities to ensure the security of documents. For example, encryption technologies may include secure sockets layers (SSL), transport layer security (TLS), virtual private networks (VPNs), and Internet Protocol security (IPsec), among others.

[0026] Entity 110 of FIG. 1 may represent computational resources owned by a corporation, a business, a government entity, a portion of a company (e.g., business unit, subsidiary, etc.), a personal user, or the like. Entity 110 may include one or more user devices 108A-108N (collectively referred to herein as “user devices 108”), working documents 132, and electronic document database 116. Examples of user devices 108 may include, but are not limited to, portable, mobile, or other devices, such as laptop computers, desktop computers, mobile phones (including smartphones), wearable computing devices (e.g., smart watches, smart glasses, etc.), tablet computers, server computers, mainframes, etc. In some examples, user devices 108 may represent a cloud computing system that provides one or more services via network 111. That is, in some examples, user devices 108 may be a distributed computing system.

[0027] Users of user devices 108 may represent computing devices (e.g., desktop computers, laptop computers, smartphones, wearable computing devices, virtual machines, cloud services executed by a collection of data centers, etc.) operated by an individual user, a group, an organization, a company, or a software application script that is authorized to represent entity 110 in terms of document management and document execution in transactions associated with entity 110. Users of user devices 108 may interact with document packages (or other content) generated on or managed by the document management system 102. Each user may be associated with a username, email address, full or partial legal name, or other identifier that may be used by the document management system 102 to identify the user and to control the ability of the user to view, modify, execute, or otherwise interact with document packages managed by the document management system 102. In some aspects, user devices 108 may sign in (e.g., based on inputs received from users of user devices 108) to user accounts associated with credentials and / or authorization that allow signed—in user devices 108 to interact with the document management system 102. In situations in which document management system 102 stores and uses information of a user operating user devices 108, document management system 102 may request explicit permission from the user (e.g., by causing user device 108A to display a prompt) prior to storing and using any personally identifiable information of the users.

[0028] Working documents 132 may include a database or other storage devices configured to store electronic documents for entity 110. For example, document management system 102 may manage working documents as data for draft documents composed using one or more user devices 108 of entity 110. User devices 108 may send document management system 102 a request for a response to an input query associated with a working document of working documents 132 based on searching information of electronic document database 116.

[0029] Electronic document database 116 of entity 110 may include a database or other storage devices configured to store historical electronic documents. Historical documents may include transaction agreement contracts, company policies, employment agreements, lease agreements, or the like that have been executed and / or otherwise implemented by entity 110. For example, electronic document database 116 may store previously executed agreement documents associated with a transaction between entity 110 and a counterparty. Electronic document database 116 may store documents as structured data including, for example, labels which may be implemented to identify lexical information (e.g., based on a lexical query) and / or semantic information (e.g., based on a vector query). In some instances, historical documents stored at electronic document database 116 may include publicly available documents that have been retrieved or otherwise downloaded from public repositories (e.g., EDGAR). User devices 108 of entity 110 and / or document management system 102 may store historical documents at electronic document database 116 via network 111, for example. Although illustrated as stored locally at to entity 110, functionality of electronic document database 116 may be stored locally at or distributed throughout document management system 102 or an external computing system.

[0030] Machine learning system 190 may represent any collection of hardware and software components configured to perform machine learning tasks. Machine learning system 190, in the example of FIG. 1, may include machine learning models 122 and vector database 118. Machine learning models 122 may include one or more software modules with computer-readable instructions for executing various traditional and / or generative machine learning models, such as neural networks, autoencoders, transformer models, or other machine learning techniques, to perform one or more operations as described herein. For example, machine learning models 122 may include multiple clustering-based, traditional machine learning models and / or transformer-based, generative machine learning models trained to perform various operations as described herein.

[0031] Vector database 118 may include data for vectors characterizing semantic information of electronic document database 116. Machine learning system 190 may, for example, apply (e.g., execute) a machine learning model (e.g., a traditional machine learning model, a transformer machine learning model, etc.) of machine learning models 122 to process documents of electronic document database 116 to generate vectors of vector database 118 that characterize semantic information of the documents in a high-dimensional latent space. Machine learning system 190 may generate vectors of vector database 118 by, for example, converting data of documents stored at electronic document database 116 into numerical representations that embed semantic, contextual, and / or feature-based information in vectors that may be compared or otherwise analyzed in a high-dimensional, trainable latent space. Machine learning system 190 may apply a pre-trained and / or custom trained machine learning model to generate vectors of vector database 118. Vector database 118 may include vectors with various dimensionalities that may be labeled with indications of corresponding documents of electronic document database 116 associated with encoded semantic information. Machine learning system 190 may store generated vectors at vector database 118 as metadata linked to original content of characterized information of documents of electronic document database 116.

[0032] In some systems, a system may respond to input queries associated with electronic documents using filters (e.g., key word searches) to obtain information from a corpus of electronic documents. For example, a system may search a corpus of electronic documents according to filters that may identify one or more candidate documents from the corpus of electronic documents that are associated with (e.g., labeled with) information indicated in the filters. However, systems configured to respond to input queries based on filters may limit data structures of input queries, such as limiting input queries to drop down menus and / or keywords associated with the filters. Additionally, or alternatively, such systems may return null or no results to an input query based on the input query not being compliant with a filter format, the input query not directly matching labeled electronic documents, and / or other discrepancies associated with structured query formats. By limiting a user's ability to request information of electronic documents and potentially outputting null results to input queries (e.g., via filter-based searching techniques), such systems may have a technical problem of ineffective and / or inefficient searching of electronic document information. Such systems may attempt to address the technical problem by consuming additional computational resources associated with creating or modifying filters and / or associated with a user manually opening and analyzing electronic documents to ascertain requested information for electronic documents. Document management system 102, according to the techniques described herein, may improve efficiency and effectiveness of searching and outputting electronic document information to respond to an input query, and may reduce computational resources associated with responding to multiple input queries (e.g., by performing a semantic analysis of electronic document and input queries without having to create or modify search filters based on multiple null results for input queries). In this way, document management system 102 may provide a non-null response to an input query requesting a response to improve the technical field of processing electronic document data to respond to input queries.

[0033] In accordance with the techniques of the disclosure, document management system 102 may output a response to an input query. Document management system 102 may output, for example, a response to an input query in, for example, three stages. In a first stage, document management system 102 may process an input query to search electronic document database 116 for candidate documents that may be applied in generating a response to the input query. In a second stage, document management system 102 may process an input query to determine semantic information of vector database 118 that may be applied in generating a response to the input query. In some examples, document management system 102 may apply semantic information of vector database 118 in instances where the first stage does not result in a threshold number of candidate documents and / or an input query is associated with a query category indicating that semantic information may need to be obtained and processed to generate a response. In a third stage, document management system 102 may generate a response to an input query based on candidate documents output at the first stage and / or semantic information output at the second stage. In this way, document management system 102 may effectively output a non-null response to an input query using an efficient process for searching and applying information associated with electronic documents.

[0034] In operation, document management system 102, or more specifically response generator 114, may obtain an input query requesting a response associated with a plurality of electronic documents. For example, response generator 114 may receive, from user device 108A via network 111, an input query including a data structure (e.g., string) requesting a response, such as one or more sentences responding to a question associated with data of electronic document database 116. User device 108A may send response generator 114 an input query as user inputs provided via a user interface prompting a user to ask a question about documents stored at electronic document database 116 and / or working documents 132.

[0035] Response generator 114 may process an input query to identify a set of electronic documents (also referred to herein as “candidate documents”) from electronic document database 116. For example, response generator 114 may apply machine learning models 122 to determine an embedding for an input query that characterizes an intent of the input query. Response generator 114 may apply machine learning models 122 to generate an input embedding for an input query by, for example, creating a latent representation of the input query in a high-dimensional embedding space that characterizes a semantic intent of the input query. In some examples, response generator 114 may generate a lexical query based on an input embedding for an input query. A lexical query may include a prompt for searching electronic document database 116 according to characters, keywords, grammar, structured objects, phonetic information, syntactic information, or other lexical information indicated in the prompt. For instance, response generator 114 may generate a lexical query as an elastic query (e.g., Elasticsearch data structure) associated with searching one or more databases, such as electronic document database 116, indicating an intent characterized in an input embedding for an input query. Response generator 114 may identify a set of candidate documents from electronic document database 116 using a lexical query determined according to processing of an input query. In this way, response generator 114 may process (e.g., based on attributes associated with character, grammatical, or other vocabulary characteristics included in a lexical query) input queries to identify potentially relevant documents without having to implement search filters.

[0036] Response generator 114 may determine whether a set of identified electronic documents satisfies a threshold. In one example, response generator 114 may determine whether a set of electronic documents include a threshold number of electronic documents. Response generator 114 may implement a candidate document threshold indicating a threshold number of identified electronic documents that may be sufficient to generate a response to an input query. For example, response generator 114 may implement a candidate document threshold indicating a threshold number of identified electronic documents of non-zero being sufficient to generate a response to an input query. In some instances, response generator 114 may implement a threshold indicating criteria associated with a volume, a classification, or other information attributes that may be associated with a query category. Based on response generator 114 determining a set of identified electronic documents satisfies a threshold, response generator 114 may generate a response based at least on the set of identified electronic documents. In this way, response generator 114 may conserve computational resources associated with proceeding to perform a vector search based on an input query while ensuring that a non-null response is generated and output for the input query.

[0037] Based on response generator 114 determining a set of identified electronic documents does not satisfy a threshold, response generator 114 may generate a response based at least on information stored at vector database 118. For example, response generator 114 may determine, based on a threshold, a lexical search of electronic document database 116 does not result in enough information to generate a response. Based on determining that a lexical search of electronic document database 116 is insufficient, response generator 114 may determine one or more vectors from vector database 118 based on an input query. For instance, response generator 114 may compute a vector query for an input query that captures semantic relationships between semantic information extracted from the input query and semantic information stored in vectors of vector database 118.

[0038] Response generator 114 may identify one or more vectors from vector database 118 using a vector query for an input query. For example, response generator 114 may determine similarity scores for each vector of vector database 118 with respect to a vector query to identify one or more vectors that may include relevant semantic information associated with an input query. Response generator 114 may provide one or more determined vectors from vector database 118 to machine learning models 122. Response generator 114 may apply machine learning models 122 to generate a response to an input query based at least on determined vectors from vector database 118. For instance, response generator 114 may apply machine learning models 122 to process an input query and determined vectors from vector database 118 to generate a string data structure as a response indicating an answer to the input query. In this way, response generator 114 may process complex, non-structured or non-uniform input queries to generate a non-null response, especially in instances where lexical based searching of electronic document information, based on natural language processing of an input query, may not result in enough information.

[0039] In some examples, response generator 114 may generate a response based at least on a query category associated with an input query. Response generator 114 may maintain mappings of query categories that response generator 114 may implement when determining information for generating a response. A query category may include a cluster of historical or sample queries that indicate attributes associated with the historical or sample queries, such as a level of complexity of a response requested in queries, a volume of information that may be processed to generate a response to queries, a type of response requested in queries, an intent of queries, or the like. In some examples, response generator114 may maintain mappings of query categories to context configuration data (e.g., context window values and / or other meta prompting information) that may indicate an amount of input data or tokens response generator 114 may instruct machine learning models 122 to process when performing the techniques described herein and / or how much training a machine learning model may have to undergo. Response generator 114 may process an input query to assign an input query to a query category. Response generator 114 may determine context configuration data for the input query based on the query category being mapped to the context configuration data. Response generator 114 may provide the context configuration data to machine learning models 122 to perform the techniques described herein based on the context configuration data, such as lexical query generation, vector query generation, and / or response generation. In this way, response generator 114 may efficiently consume computational resources associated with applying machine learning models 122 based on context configuration data that may be selected according to attributes associated with input queries (e.g., conserve fewer computational resources for an input query requesting basic information based on context configuration data indicating a smaller context window compared to an input query requesting complex information).

[0040] Response generator 114 may output a response for an input query. For example, response generator 114 may output a generated response for an input query to user device 108A based on user device 108A sending the input query. In some instances, response generator 114 may output a response as part of a working document of working documents 132. For example, user device 108A may send an input query to document management system 102 via a user interface (e.g., managed using IAM 115) displaying data for a working document of working documents 132 that is to be electronically signed by a user of user device 108A. User device 108A may send an input query in any form or structure (e.g., without having to follow a structured document format or filter structure such as any sentence composed by a user). User device 108A may send an input query indicating a request for information associated with a working document with respect to historical documents stored at electronic document database 116. For example, user device 108A may send an input query indicating a request for information associated with individuals executing historical agreement documents of electronic document database 116 that are associated with a working document displayed at user device 108A. Response generator 114 may process the input query to identify a set of candidate documents from electronic document database 116 that are associated with executed agreement documents that share a party label associated with the working document.

[0041] In some examples (e.g., in instances where the set of candidate documents does not satisfy a candidate threshold), response generator 114 may process the input query to determine semantic information of vector database 118 associated with individual names that signed agreement documents with a party associated with the working document. Response generator 114 may generate a response to the input query based on the set of identified candidate documents from electronic document database 116 and / or semantic information determined from vector database 118. For instance, response generator 114 may generate the response as a string data structure indicating individual names of those that signed agreement documents associated with the working document. Response generator 114 may output the response to user device 108A via a user interface (e.g., the user interface associated with the input query).

[0042] The techniques described herein may provide one or more technical advantages that realize one or more practical applications. For example, document management system 102 may improve the technical field of data processing (e.g., electronic document querying) by processing input queries to obtain a volume of information to efficiently and effectively output a non-null response. By implementing logic to intelligently retrieve information for response generation, document management system 102 may reduce computational resources associated with creating and maintaining search filters, creating and maintaining structured data for searching electronic documents, and / or manually searching information in instances where users are unable to effectively or efficiently locate data using search filters, for example. For instance, by determining whether a threshold number (e.g., non-null) of candidate documents are identified according to a natural language processing of an input query, document management system 102 may avoid maintaining or using search filters for searching structured data and intelligently determine whether to consume additional resources to achieve a non-null result. In this way, document management system 102 may process unstructured input queries (e.g., unstructured text data a user manually types in plain English) to generate responses in a way that conserves computational resources associated with implementing conventional search techniques (e.g., search filters), conserves computational resources based on a determination of threshold information, and / or solves the technical problem of automatically generating responses to unstructured input queries (e.g., a natural language input by a user including text data that does not follow a search format and / or includes grammatical errors) associated with electronic documents (e.g., improving resource consumption associated with obtaining insights associated with electronic documents and / or providing action recommendations based on insights).

[0043] Additionally, or alternatively, document management system 102 may conserve computational resources associated with the techniques described herein based on context configuration data selected according to a query category associated with an input query. For instance, document management system 102 may consume fewer computational resources based on a selected context configuration indicating a smaller context window for a basic query category associated with an input query, compared greater computational resources consumed based on larger context windows mapped to more complex query categories. In this way, document management system 102 may process various types of input queries, having various natural language forms, to output non-null responses in a way that conserves computational resources according to the various types of input queries.

[0044] In some examples, document management system 102 may implement response generator 114 in workflows associated with IAM 115. For example, IAM 115 may execute response generator 114 to generate a document based on an input query input via a user interface managed by IAM 115. IAM 115 may manage a user interface for a review workflow associated with a working document. IAM 115 may execute response generator 114 to validate information of the working document, such as executing response generator 114 to output responses to an input query to confirm whether particular information of the working document is consistent with documents of electronic document database 116. In some instances, IAM 115 may execute response generator 114 to autofill or otherwise generate field values for a working document based on an input query associated with generating recommendations for field values based on electronic document database 116. In some instances, IAM 115 may facilitate training of machine learning models 122 to perform the techniques described herein. For example, IAM 115 may collect feedback data to determine whether a response to an input query is satisfactory. Based on one or more indications that a response to an input query is not satisfactory, IAM 115 may instruct response generator 114 to adjust context configuration data (e.g., increase a context window) mapped to a query category associated with the input query. In this way, response generator 114 may update context configuration data to query category mappings to effectively generate responses based on user feedback.

[0045] FIG. 2 is a block diagram illustrating an example document management system 202 for generating natural language responses, in accordance with techniques of this disclosure. Document management system 202, response generator 214, machine learning models 222, electronic document database 216, and working documents 232 of FIG. 2 may be example or alternative implementations of document management system 102, response generator 114, machine learning models 122, electronic document database 116, and working document 132 of FIG. 1, respectively. FIG. 2 illustrates a particular example of document management system 202, and other examples of document management systems may be used in other instances, may include a subset of components included in example document management system 202, and / or may include one or more additional components not shown in FIG. 2. For example, functionality of processing circuitry 213, communication units 215, I / O devices 204, and / or storage devices 208 may be distributed across multiple computing devices within a cloud-based environment provided by document management system 202.

[0046] In the example of FIG. 2, document management system 202 includes communication units 215, processing circuitry 213, input / output (I / O) devices 204, one or more storage devices 208, and communication channels 206. Communication channels 206 may interconnect each of the components 215, 213, 204, and 208 for inter-component communications (physically, communicatively, and / or operatively). In some examples, communication channel 206 may include a system bus, a network connection, an inter-process communication data structure, or any other method for communicating data.

[0047] Communication units 215 of document management system 202 may communicate with one or more external devices via one or more wired and / or wireless networks by transmitting and / or receiving network signals on the one or more networks. Examples of communication units 215 include a network interface card (e.g., such as an Ethernet card), an optical transceiver, a radio frequency transceiver, a GNSS receiver, or any other type of device that can send and / or receive information. Other examples of communication units 215 may include short wave radios, cellular data radios (for terrestrial and / or satellite cellular networks), wireless network radios, as well as universal serial bus (USB) controllers.

[0048] One or more input devices of I / O devices 204 may represent any input devices of document management system 202 not otherwise separately described herein. Input devices of I / O devices 204 may generate, receive, and / or process input. For example, one or more input devices of I / O devices 204 may generate or receive input from a network, a user input device, or any other type of device for detecting input from a human or machine.

[0049] One or more output devices of I / O devices 204 may represent any output devices of document management system 202 not otherwise separately described herein. Output devices of I / O devices 204 may generate, present, and / or process output. For example, one or more output devices of I / O devices 204 may generate, present, and / or process output in any form. Output devices of I / O devices 204 may include one or more universal serial bus (USB) interfaces, video and / or audio output interfaces, or any other type of device capable of generating tactile, audio, visual, video, electrical, or other output. Some devices may serve as both input and output devices. For example, a communication device may both send and receive data to and from other systems or devices over a network.

[0050] Processing circuitry 213 may include one or more processors for implementing functionality and / or execute instructions within document management system 202. For example, processing circuitry 213 may receive and execute instructions that provide the functionality of response generator 214, operating system (OS) 234, training module 272, working documents 232, vector database 218, electronic document database 216, and / or query category mappings 212. These instructions executed by processing circuitry 213 may cause document management system 202 to store and / or modify information within storage devices 208 or processing circuitry 213 during program execution. Processing circuitry 213 may execute instructions of response generator 214, OS 234, training module 272, working documents 232, vector database 218, electronic document database 216, and / or query category mappings 212 to perform one or more operations. That is, response generator 214, OS 234, training module 272, working documents 232, vector database 218, electronic document database 216, and / or query category mappings 212 may be operable by processing circuitry 213 to perform various functions described herein. In some instances, processing circuitry 213 may include one or more processors associated with cloud computing processing components (e.g., distributed processors across a cloud computing platform).

[0051] In the example of FIG. 2, storage devices 208 may include response generator 214, OS 234, training module 272, working documents 232, vector database 218, electronic document database 216, and query category mappings 212. Storage devices 208 within document management system 202 may store information for processing during operation of document management system 202 (e.g., document management system 202 may store data accessed by response generator 214, OS 234, training module 272, working documents 232, vector database 218, electronic document database 216, and / or query category mappings 212). In some examples, storage devices 208 may be a temporary memory, meaning that a primary purpose of storage devices 208 is not long-term storage. Storage devices 208 on document management system 202 may be configured for short-term storage of information as volatile memory and therefore not retain stored contents if powered off. Examples of volatile memories include random access memories (RAM), dynamic random access memories (DRAM), static random access memories (SRAM), and other forms of volatile memories known in the art.

[0052] Storage devices 208 may include one or more computer-readable storage media. Storage devices 208 may be configured to store larger amounts of information than volatile memory. Storage devices 208 may further be configured for long-term storage of information as non-volatile memory space and retain information after power on / off cycles. Examples of non-volatile memories include magnetic hard discs, optical discs, floppy discs, flash memories, or forms of electrically programmable memories (EPROM) or electrically erasable and programmable (EEPROM) memories. Storage devices 208 may store program instructions and / or information associated with response generator 214, OS 234, training module 272, working documents 232, vector database 218, electronic document database 216, and / or query category mappings 212. In some instances, storage devices 108 may include cloud storage components (e.g., distributed storage devices across a cloud computing environment).

[0053] Storage devices 208 may store response generator 214, OS 234, training module 272, working documents 232, vector database 218, electronic document database 216, and / or query category mappings 212. OS 234 may control the operation of components of document management system 202. For example, OS 234 may facilitate the communication of response generator 214, OS 234, training module 272, working documents 232, vector database 218, electronic document database 216, and / or query category mappings 212 with processing circuitry 213, storage devices 208, communication units 215, and I / O devices 204. In some examples, OS 234 may manage interactions between software modules (e.g., response generator 214) and a user operating document management system 202. OS 234 may have a kernel that facilitates interactions with underlying hardware of document management system 202 and provides a fully formed application space capable of executing a wide variety of software modules having secure partitions in which each of the software modules executes to perform various operations.

[0054] Machine learning models 222 may include one or more generative machine learning models and / or one or more traditional machine learning models. Examples of generative machine learning models may include, for example, transformer-based deep neural networks or large language models (LLMs). Generative machine learning models may be associated with natural language prompts, or simply “prompts.” Examples of traditional machine learning models may include, for example, a rule-based machine learning model or a deterministic machine learning model. Traditional machine learning models may be associated with training data.

[0055] Machine learning models 222 may include a generative machine learning model configured to summarize information. Examples of a generative machine learning model may include encoder based models, decoder based models, or encoder / decoder based models. Examples of encoder based models may include, for example, a bidirectional encoder representations from transformers or “BERT” machine learning model, convolutional neural networks (CNNs), and / or recurrent neural networks (RNNs). Examples of decoder based models may include, for example, generative pre-trained transformers (GPT) models, variational autoencoders (VAEs), and / or generative adversarial networks (GANs). Examples of encoder / decoder based models may include, for example, a transformer encoder-decoder, such as a bidirectional (BERT-like) encoder and an autoregressive (GPT-like) decoder (e.g., BART), a Text-To-Text Transfer Transformer (T5) model, and / or large language models (LLMs). Machine learning models 222 may include a visualization tool model, such as Tensorboard™ or Matplotlib™).

[0056] Training module 272 may include computer readable instructions for training and / or retraining machine learning models 222. Training module 272, in the example of FIG. 2, may include training data 274. For example, training module 272 may train one or more machine learning models of machine learning models 222 to generate or otherwise encode lexical and semantic information using sample encodings of training data 274. In some examples, training data 274 may include sample input queries labeled with ground truth natural language responses. In some examples, training data 274 may include feedback data associated with natural language response feedback detected by conversational agent 220. Training module 272 may train, retrain, and / or fine-tune machine learning models 222 (e.g., establish, modify, adjust, or otherwise update weights, biases, architectures, or other hyperparameters associated with machine learning models of machine learning models 222) using training data 274. In some instances, training module 272 may be an external module, managed by an external provider, that exports instructions for executing pre-trained machine learning models of machine learning models 222 to document management system 202.

[0057] Response generator 214, in the example of FIG. 2, may include conversational agent 220, machine learning models 222, context configurator 224, lexical search module 226, vector search module 228, and input generation module 230. Conversational agent 220 may include computer readable instructions for interfacing between a user device (e.g., user devices 108 of FIG. 1) and response generator 214. For example, conversational agent 220 may include an application programming interface or other software module configured to generate user interfaces associated with input queries and respective natural language responses, as well as communicate data associated with input queries and natural language responses. In some examples, conversational agent 220 may generate data for a user interface emulating a chat interface that includes graphical user interface elements (e.g., text boxes, suggested input queries, auto-fill options, feedback options, etc.) associated with a user interacting with input queries and natural language responses. In some instances, conversational agent 220 may generate data for a user interface that is displayed alongside data for a working document of working documents 232 with graphical elements associated with a user interacting with input queries and natural language responses for questions related to the working document. Conversational agent 220 may monitor, process, store, or otherwise manage data associated with input queries and natural language responses. For example, conversational agent 220 may collect and prepare data for a series of previous input queries and respective natural language responses to provide additional contextual information to machine learning models 222 when generating subsequent natural language responses. In some instances, conversational agent 220 may provide data for a series of previous input queries and respective natural language responses to input generation module 230 for input query recommendation generation. Conversational agent 220 may, additionally or alternatively, collect and prepare data for feedback associated with natural language responses to provide data to training module 272 to fine tune machine learning models 222 for a particular user device or customer system. In some instances, conversational agent 220 may be a component of IAM 115 of FIG. 1.

[0058] Context configurator 224 may include computer readable instructions for determining context configuration data associated with the techniques described herein. For example, context configurator 224 may determine context configuration data, such as a context window, based on a query category associated with an input query. Query category mappings 212 may include data associated with mappings of query categories to context configuration data used by machine learning models 222. Context configurator 224 may generate mapping data of query category mappings 212 by, for example, determining query category embeddings for previous input queries detected using conversational agent 220. In some examples, context configurator 224 may determine query category embeddings for sample input queries of training data 274. Context configurator 224 may generate query category embeddings that characterize attributes (e.g., intent, keywords, types of analysis, types of responses requested, etc.) of input queries as encodings in a high-dimensional embedding space. Context configurator 224 may cluster query category embeddings to determine query categories (e.g., each cluster of query category embeddings corresponds to a query category).

[0059] Context configurator 224 may process an input query to determine a query category embedding associated with clusters of query category embeddings of query category mappings 212. Context configurator 224 may determine a query category for an input query by, for example, assigning a query category embedding generated for the input query to a cluster of query category embeddings associated with query category mappings 212. Context configurator 224 may determine context configuration data for responding to an input query based on the context configuration data being mapped to a query category assigned to the input query. For instance, context configurator 224 may determine context configuration data (e.g., a context window, in-context learning prompts, or other meta prompting configurations) for a first input query mapped to a first query category associated with enumeration queries as including a smaller context window compared to a second input query mapped to a second query category associated with recommendation queries. Context configurator 224 may send machine learning models 222 an indication of determined context configuration data for an input query. In this way, context configurator 224 may intelligently and automatically conserve computational resources associated with processing an input query and / or searching databases for information.

[0060] Lexical search module 226 may include computer readable instructions for identifying a set of electronic documents based on an input query. Lexical search module 226 may process an input query to classify an intent associated with the input query. In one example, lexical search module 226 may determine a classification (e.g., query category) of an input query based on a list of query classifications obtained from a user device via conversational agent 220. In some instances, lexical search module 226 may determine an intent classification for an input query to determine context configuration data mapped to query categories of query category mappings 212. In one example, lexical search module 226 may determine an intent classification to generate an elastic query to identify documents of electronic document database 216 associated with an input query.

[0061] In some examples, lexical search module 226 may preprocess an input query by, for example, tokenizing an input query according to context configuration data (e.g., a context window) determined by context configurator 224. Lexical search module 226 may abstract string data structures from an input query to generate a lexical query prompting a first machine learning model (e.g., a traditional machine learning model) of machine learning models 222 to identify a set of electronic documents with characters (e.g., identified via optical character recognition) matching—at least matching by a threshold amount—tokenized characters of the string data structures (e.g., matching character, grammatical, and structural attributes of words or sentences of electronic documents of electronic document database 216 to words or sentences of an input query according to a context window determined by context configurator 224). Lexical search module 226 may apply the first machine learning model of machine learning models 222 to output indications (e.g., document identifiers) of documents of electronic document database 216 including tokenized characters matching tokenized characters of the input query. Lexical search module 226 may retrieve a set of electronic documents (candidate documents) from electronic document database 216 based on the output indications.

[0062] Lexical search module 226 may apply machine learning models 222 (e.g., based on determining a number of document included in a set of electronic documents satisfies a threshold and / or according to context configuration data determined by context configurator 224) to generate a natural language response to an input query. For example, lexical search module 226 may generate a response prompt including candidate documents (e.g., identified via an elastic search conducted based on an input query) to prompt a second machine learning model (e.g., a generative machine learning model) of machine learning models 222 to generate a natural language response that responds to an input query using the candidate documents (e.g., generate a sentence responding to the input query with references to tokenized information of candidate documents identified as matching tokenized information of the input query, generate a list of indications of identified candidate documents, etc.). In this way, lexical search module 226 may trigger, in instances where there is a threshold amount of information obtained via a lexical-based search, natural language response generation to an input query without consuming additional computational resources associated with vector search module determining semantic information for natural language response generation.

[0063] Vector search module 228 may determine vectors of vector database 218 that characterize semantic information associated with an input query. Vector search module 228 may process (e.g., according to context configuration data determined by context configurator 224) an input query to compute a vector query as an embedding that characterizes an input query in a high-dimensional latent space associated with vector database 218. Vector search module 228 may compare a vector query to vectors of vector database 218 (e.g., vectors characterizing semantic information of documents of electronic document database 216 in the high-dimensional latent space) to identify vectors (e.g., chunks of semantic information encoded in the high-dimensional latent space with sizes according to context configuration data determined by context configurator 224) for natural language response generation. In some examples, vector search module 228 may determine one or more vectors of vector database 218 using a third machine learning model (e.g., a traditional machine learning model) of machine learning models 222. Vector search module 228 may apply a fourth machine learning model (e.g., a generative machine learning model) machine learning models 222 to generate a natural language response based, at least, on an input query and vectors of vector database 218 determined based on a processing of the input query.

[0064] In some examples, vector search module 228 may generate vectors of vector database 218. For example, vector search module 228 may prepare vector database 218 by applying a large language model of machine learning models 222 to extract and encode semantic information of documents of electronic document database 216 in a high-dimensional latent space. Vector search module 228 may apply the large language model to generate vectors of vector database 218 as encodings of the semantic information including chunks of values that represent semantic characteristics of tokenized information (e.g., encoding with sizes according to a context configuration determined by context configurator 224).

[0065] Input generation module 230 may include computer readable instructions for generating recommendations for input queries. For example, input generation module 230 may process previous input queries detected by conversational agent 220 to predict an input query related to the previous input queries. Input generation module 230 may apply a large language model of machine learning models 222 to predict an input query based on previous input queries and semantic information stored at vector database 218. For instance, input generation module 230 may identify a pattern associated with previous input queries. Input generation module 230 may generate a vector query by, for example, applying a generative model of machine learning models 222 to generate an embedding that characterizes the pattern associated with previous input queries in a high-dimensional latent space associated with vector database 218. Input generation module 230 may determine a set of vectors of vector database 218 based on the vector query (e.g., similarities between the set of vectors and the vector query). Input generation module 230 may generate an input query by, for example, providing the set of vectors to a generative machine learning model of machine learning models 222 configured to generate input queries.

[0066] FIG. 3 is a flow diagram illustrating an example operation of generating a natural language response to an input query, in accordance with techniques of this disclosure. FIG. 3 may be discussed with respect to FIG. 2 for example purposes only.

[0067] Document management system 202 may process an input query (302). For example, document management system 202 may apply machine learning models 222 by encoding an intent (e.g., determined based on intents mapped to query categories of query category mappings 212) of an input query in an input query embedding. Document management system 202 may determine a query category for an input query (304). For example, document management system 202 may map an input query embedding for an input query to a cluster of input query embeddings of query category mappings 212 to assign the input query embedding to a query category corresponding to the cluster. Document management system 202 may process an input query to determine a category, class, type, or other types of attributes associated with an input query that may be applied to direct analysis for responding to the input query in a comprehensive and / or computationally efficient manner.

[0068] Document management system 202 may select context configuration data (306). Context configuration data may include configuration data associated with determining meta prompt information for searching information of electronic documents, such as a context window, perspective information (e.g., generate a response from the perspective of an analyst), or the like. Context configuration data may be implemented to determine a volume of data chunks of vectorized data to ingest and / or retrieve for vector identification. For example, document management system 202 may select context configuration data (e.g., a context window or other meta prompting configurations) mapped to a query category determined for an input query (e.g., in query category mappings 212). In this way, document management system 202 may instruct machine learning models 222 to search for information at a particular level of details and / or using a certain amount of computational resources based on a complexity associated with a query category determined for an input query. For example, document management system 202 may dynamically adjust a context window used by machine learning models 222 based on a complexity associated with query categories. For instance, document management system 202 may select a small context window for a simple query (e.g., “what is the most recent contract with company X?”) and a large context window for a complex query (e.g., “what warranty clause language did person Y from company X sign in previous contracts?”).

[0069] Document management system 202 may identify candidate documents (306). For example, document management system 202 may apply context configuration data to machine learning models 222 to determine a lexical search query for an input query. Document management system 202 may execute the lexical search query to identify a set of electronic documents of electronic document database 216 with data structures (e.g., strings) that may match lexical data structures (e.g., strings) included in the lexical search query. Additionally, or alternatively, document management system 202 may determine semantic information (310). For example, document management system 202 may apply context configuration data to machine learning models 222 to determine a vector query for an input query. Document management system 202 may execute the vector query to determine one or more vectors of vector database 218 embedded with semantic information related to semantic encodings of the vector query.

[0070] Document management system 202 may generate a natural language response (312). For example, document management system 202 may generate a prompt using context configuration data, identified candidate documents and / or determined semantic information. In this example, document management system 202 may apply the prompt to machine learning models 222 to generate a natural language response to an input query. Document management system 202 may output an indication of the generated natural language response in, for example, a user interface displayed at a user device associated with an input query.

[0071] FIG. 4 is a flow diagram illustrating an example operation of generating a natural language response using an electronic database search and / or a vector index search, in accordance with techniques of this disclosure. FIG. 4 may be discussed with respect to FIG. 2 for example purposes only.

[0072] Response generator 214, or more specifically, for example, context configurator 224, may determine context configuration data for an input query (402). Context configurator 224 may determine context configuration data for an input query based on a query category determined for the input query and context configuration data of query category mappings 212 that are mapped to the query category. Context configurator 224 may provide context configuration data to a response pipeline associated with searching for information to generate a natural language response to an input query.

[0073] Response generator 214, or more specifically, for example, conversational agent 220, may determine user preferences (404). For example, conversational agent 220 may detect, via an application programming interface and / or user interfaces, a set of preferences input by a user that indicate security information, privacy restrictions, computational resources restrictions, or other preferences associated with how input queries are processed and / or how natural language responses are generated. Conversational agent 220 may provide user preferences to machine learning models 222 as configuration preferences for processing input queries and / or generating natural language responses. In some examples, conversational agent 220 may process historical queries (406). Conversational agent 220 may process historical queries as input queries that have been previously responded to in a particular chat thread. Conversational agent 220 may process historical queries to ascertain more information associated with a context of an input query provided by a user device. For example, conversational agent 220 may process historical queries to ascertain pronouns, references, or other background information that may be included in an input query sent to response generator 214. Conversational agent 220 may provide information for an input query, determined based on processing historical queries, to lexical search module 226 and / or vector search module 228.

[0074] Lexical search module 226 may generate a document query (408). For example, lexical search module 226 may determine a prompt for generating a document query using user preferences, historical query information, and / or other information of an input query. Lexical search module 226 may call a first machine learning model of machine learning models 222 (410). For example, lexical search module 226 may call a first machine learning model (e.g., a traditional machine learning model, a generative machine learning model, etc.) by providing the first machine learning model the prompt for generating the document query. The first machine learning model may be configured to process the prompt to generate a document query associated with lexicographically searching electronic document database 216 (e.g., document query associated with a character-by-character, word-by-word, sentence-by-sentence, etc. matching of tokenized information associated with an input query and documents of electronic document database 216). Lexical search module 226 may apply the first machine learning model to retrieve candidate documents (412). For example, lexical search module 226 may provide the document query to the first machine learning model to identify and retrieve documents of electronic document database 216 that include lexicographically similar elements to an input query. Lexical search module 226 may apply the first machine learning model to perform a document database search (414). For example, lexical search module 226 may apply the first machine learning model using the document query to elastically search electronic document database 216 to identify a set of documents that match information of an input query on a lexicographical level.

[0075] Vector search module 228 may determine whether a number of candidate documents satisfies a threshold (416). Vector search module 228 may obtain, from lexical search module 226, an indication of a number of candidate document identified as being lexicographically similar to an input query. Vector search module 228 may compare the number of candidate documents to a candidate document threshold to determine whether the candidate documents may provide a threshold amount of information for generating a natural language response to an input query. For example, vector search module 228 may determine a candidate threshold (e.g., at least one identified document in a set of identified documents) based on a candidate threshold being mapped, in query category mappings 212, to a query category determined for an input query. Vector search module 228 may compare the candidate threshold to a number of retrieved candidate documents to determine whether the number of candidate documents satisfies the candidate threshold. Based on determining that a number of candidate documents satisfies a threshold (e.g., the number of identified documents is greater than a minimum number of documents), vector search module 228 may send an indication to machine learning models 222 to generate a natural language response to an input query based at least on retrieved candidate documents.

[0076] Based on determining that a number of candidate documents do not satisfy a threshold, vector search module 228 may compute a vector query (418). For example, vector search module 228 may generate a prompt for computing a vector query using user preferences, historical query information, and / or other information of an input query. Vector search module 228 may call a second machine learning model of machine learning models 222 (420). For example, vector search module 228 may call a second machine learning model (e.g., a traditional machine learning model, a generative machine learning model, etc.) by providing the second machine learning model the prompt for computing the vector query. The second machine learning model may be configured to process the prompt to generate a vector query associated with semantically searching vector database 218 to determine semantic information for generating a natural language response to an input query (e.g., vector query associated with analyzing mappings of vectors characterizing an input query and documents of electronic document database 216 in a high-dimensional latent space to extract chunks or encodings of semantic information encoded in vectors of vector database 218). Vector search module 228 may apply the second machine learning model to determine vectors of vector database 218 (422). For example, vector search module 228 may provide the vector query to the second machine learning model to parse and determine vectors of vector database 218 that are encoded with semantically similar elements to information used to generate a vector query (e.g., user preferences, historical query information, and / or other information of an input query). Vector search module 228 may apply the second machine learning model to perform a vector index of vector database 218 (424). For example, vector search module 228 may apply the second machine learning model using the vector query to index and extract data chunks encoded with semantic information associated with a requested natural language response to an input query.

[0077] Vector search module 228 may trigger generation of a natural language response. For example, vector search module 228 may trigger natural language response generation based on a determination that a number of candidate documents does satisfy a threshold and / or based on a determination of vectors from vector database 218. In some instances, vector search module 228 may trigger natural language response generation based on retrieving information from external sources that may provide additional context for generating a natural language response to an input query. For example, vector search module 228 may apply a vector query to semantically search information associated with an input query from knowledge sources not owned by document management system 202 (e.g., a cloud service such as electronic mail, co-located data centers, the Internet, etc.).

[0078] Regardless of how vector search module 228 triggers generation of a natural language response, response generator 214 may generate a prompt for the natural language response (426). For example, response generator 214 may generate a prompt using retrieved candidate documents and / or determined vectors associated with machine learning model processing of an arbitrarily structured input query. Response generator 214 may generate the prompt using user preferences, historical queries, and / or information obtained from external knowledge sources. Response generator 214 may generate a natural language response (430). For example, response generator 214 may generate a natural language response by providing the prompt for natural language response generation to an external machine learning system configured to process information of the prompt to generate the natural language response. Response generator 214 may call a third machine learning model of machine learning models 222 (432). For example, response generator 214 may call a third machine learning model (e.g., a traditional machine learning model, a generative machine learning model, etc.) by executing instructions of the third machine learning model to process the prompt to generate a natural language response. Response generator 214 may generate data for a user interface including an indication of the natural language response (434). For example, conversational agent 220 may generate data for a user interface including a listing of documents or other responding information included in the prompt based on user preferences or a current user interaction associated with the input query (e.g., a user interface displaying data with text of a natural language response below text for an input query in a chat emulator).

[0079] FIG. 5 is a conceptual diagram illustrating example user interface 550 for requesting natural language responses, in accordance with techniques of this disclosure. FIG. 5 may be discussed with respect to FIG. 2 for example purposes only. Conversational agent 220 may generate data for user interface 550 to include graphical elements for an enhanced chat emulator for electronic document searching (e.g., chat functionality associated with responding to arbitrarily structured input queries with natural language responses based on searching information of electronic document database 216 and / or vector database 218 on a lexicographical and / or semantical level, respectively).

[0080] In the example of FIG. 5, conversational agent 220 may generate data for user interface 550 to include graphical elements of working document chat 536, input query suggestions 544, and auto-fill input 541. Working document chat 536 may include working document data 548 and input query 538. Working document data 548 may include data of a working document of working documents 232 that may provide additional contextual information for response generator 214 to generate a natural language response to an input query. Input query 538 may include one or more input queries requesting a non-null, natural language response to a particular question based on searching information associated with electronic document database 216 and / or the working document.

[0081] Input query suggestions 544 may include data of recommended input queries generated using input generation module 230. For example, input generation module 230 may process historical query information, analyze vector database 218, and / or determine events associated with working documents 232 to predict a pattern for generating an input query recommendation for a natural language response a user may request. Input generation module 230 may send conversational agent 220 indications of generated input query recommendations. Conversational agent 220 may create a graphical element of input query suggestions 544 to include selectable indications of input query recommendations. Conversational agent 220 may trigger natural language response generation to a recommended input query based on detecting a selection of the recommended input query from input query suggestions 544.

[0082] Auto-fill input 541 may include auto-fill query suggestions and auto-fill text box 540. Auto-fill text box 540 may include a graphical element of a text box a user may input characters to compose an input query. Conversational agent 220 may detect inputs to auto-fill text box 540 to generate and output data for auto-fill query suggestions 542. Auto-fill query suggestions 542 may include graphical elements with selectable options of recommended input queries based at least on inputs to auto-fill text box 540. Conversational agent 220 may, in some examples, apply input generation module 230 to generate input query recommendations based on inputs to auto-fill text box 540 and historical queries that may have been processed by response generator 214. Conversational agent 220 may generate and output data for auto-fill query suggestions 542 to include selectable indications of generated input query recommendations. Conversational agent 220 may trigger natural language response generation to a recommended input query of auto-fill query suggestions 542 based on detecting a selection of an indication for the recommended input query.

[0083] FIG. 6 is a flow diagram illustrating an example operation for generating a response to an input query, in accordance with techniques of this disclosure. FIG. 6 may be discussed with respect to FIG. 1 for example purposes only.

[0084] Document management system 102, or more specifically response generator 114, may identify, based on an input query requesting a response, a set of electronic documents from a plurality of electronic documents (e.g., electronic document database 116) (602). For example, response generator 114 may receive, from user device 108A via network 111, an input query that includes unstructured text data associated with a request for information of document data stored at electronic document database 116. Response generator 114 may identify a set of electronic documents from electronic document database 116 by, for example, generating a lexical query based on the input query. Response generator 114 may identify the set of electronic documents by determining, based on the lexical query, that lexical information included in the set of electronic documents matches lexical information associated with the input query.

[0085] Response generator 114 may, based on the set of electronic documents satisfying a threshold, generate a response based at least on the set of electronic documents (604). For example, response generator 114 may implement a threshold to determine whether the identified set of electronic documents includes enough information to respond to the input query (e.g., a threshold indicating a minimum number of documents to be included in the set of electronic documents to respond to the input query based on a query category assigned to the input query). In response to determining the set of electronic documents satisfies the threshold, response generator 114 may generate the response based at least on the set of electronic documents by, for example, generating a response prompt based no the input query and the set of electronic documents. Response generator 114 may generate, based at least on apply the response prompt to a machine learning model (e.g., a machine learning model of machine learning models 122), the response to include indications of the set of electronic documents as a response to the input query.

[0086] Response generator 114 may, based on the set of electronic documents not satisfying the threshold, determine, based on the input query, one or more vectors stored at a vector database (e.g., vector database 118). For example, response generator 114 may generate, based on applying a machine learning model (e.g., a machine learning model of machine learning models 122) to the plurality of electronic documents, a plurality of vectors characterizing semantic information of the plurality of electronic documents. Response generator 114 may store the plurality of vectors at the vector database. Response generator 114 may generate, based on the input query, a vector query. Response generator 114 may determine, based on the vector query, the one or more vectors. Response generator 114 may generate the response based at least on the one or more vectors by, for example, generating, based on the input query and the one or more vectors, a response prompt. Response generator 114 may generate, based at least on applying the response prompt to a machine learning model (e.g., a generative model of machine learning models 122), the response to include non-null text data indicating a response to the input query.

[0087] In some examples, response generator 114 may generate a response based on a query category. For example, response generator 114 may determine, based on the input query, a query category from a plurality of query categories. Response generator 114 may determine, based at least on the query category, context configuration data. Response generator 114 may generate, based at least on applying the context configuration data to one or more machine learning models (e.g., one or more machine learning models of machine learning models 122), the response.

[0088] Response generator 114 may output an indication of the response (610). For example, response generator 114 may generate data for a graphical user interface including text data or other information included in the response. Response generator 114 may output the data for the graphical user interface to the user device that sent the input query (e.g., user device 108A). In some examples, response generator 114 may output data indicating the response below a corresponding input query in a chat user interface.

[0089] In some instances, the input query may be a first input query, the set of electronic documents may be a first set of electronic documents, the one or more vectors may be first one or more vectors, and the response may be a first response. In such instances, response generator may identify, based on a second input query requesting a second response, a second set of electronic documents from electronic document database 116. Based on determining the second set of electronic documents satisfies the threshold, response generator 114 may generate the second response based at least on the second set of electronic documents and the first response. In some examples, based on determining the second set of electronic documents does not satisfy the threshold, response generator 114 may determine, based on the second input query, second one or more vectors stored at the vector database. Response generator 114 may generate, based at least on the second one or more vectors and the first response, the second response. Response generator 114 may output an indication of the second response (e.g., to user device 108A via network 111). In some instances, response generator 114 may generate and output one or more input query recommendations based at least on the first input query and the second input query.

[0090] Like reference characters denote like elements throughout the text and figures.

[0091] For processes, apparatuses, and other examples or illustrations described herein, including in any flowcharts or flow diagrams, certain operations, acts, steps, or events included in any of the techniques described herein can be performed in a different sequence, may be added, merged, or left out altogether (e.g., not all described acts or events are necessary for the practice of the techniques). Moreover, in certain examples, operations, acts, steps, or events may be performed concurrently, e.g., through multi-threaded processing, interrupt processing, or multiple processors, rather than sequentially. Further certain operations, acts, steps, or events may be performed automatically even if not specifically identified as being performed automatically. Also, certain operations, acts, steps, or events described as being performed automatically may be alternatively not performed automatically, but rather, such operations, acts, steps, or events may be, in some examples, performed in response to input or another event.

[0092] The detailed description set forth below, in connection with the appended drawings, is intended as a description of various configurations and is not intended to represent the only configurations in which the concepts described herein may be practiced. The detailed description includes specific details for the purpose of providing an understanding of the various concepts. However, it will be apparent to those skilled in the art that these concepts may be practiced without these specific details. In some instances, well-known structures and components are shown in block diagram form in order to avoid obscuring such concepts.

[0093] In accordance with one or more aspects of this disclosure, the term “or” may be interrupted as “and / or” where context does not dictate otherwise. Additionally, while phrases such as “one or more” or “at least one” or the like may have been used in some instances but not others; those instances where such language was not used may be interpreted to have such a meaning implied where context does not dictate otherwise.

[0094] In one or more examples, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored, as one or more instructions or code, on and / or transmitted over a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media, which corresponds to a tangible medium such as data storage media, or communication media including any medium that facilitates transfer of a computer program from one place to another (e.g., pursuant to a communication protocol). In this manner, computer-readable media generally may correspond to (1) tangible computer-readable storage media, which is non-transitory or (2) a communication medium such as a signal or carrier wave. Data storage media may be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, code and / or data structures for implementation of the techniques described in this disclosure. A computer program product may include a computer-readable medium.

[0095] By way of example, and not limitation, such computer-readable storage media can include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage, or other magnetic storage devices, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. Also, any connection is properly termed a computer-readable medium. For example, if instructions are transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. It should be understood, however, that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transient media, but are instead directed to non-transient, tangible storage media. Disk and disc, as used, includes compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0096] Instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general purpose microprocessors, application specific integrated circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuitry. Accordingly, the terms “processor” or “processing circuitry” as used herein may each refer to any of the foregoing structures or any other structure suitable for implementation of the techniques described. In addition, in some examples, the functionality described may be provided within dedicated hardware and / or software modules. Also, the techniques could be fully implemented in one or more circuits or logic elements.

[0097] The techniques of this disclosure may be implemented in a wide variety of devices or apparatuses, including a wireless handset, a mobile or non-mobile computing device, a wearable or non-wearable computing device, an integrated circuit (IC) or a set of ICs (e.g., a chip set). Various components, modules, or units are described in this disclosure to emphasize functional aspects of devices configured to perform the disclosed techniques, but do not necessarily require realization by different hardware units. Rather, as described above, various units may be combined in a hardware unit or provided by a collection of interoperating hardware units, including one or more processors as described above, in conjunction with suitable software and / or firmware.

Claims

1. A system for generating responses to input queries, the system comprising:processing circuitry; andcomputer readable media comprising instructions that, when executed, cause the processing circuitry to:generate, based on lexical information from an input query requesting a response, a lexical query associated with searching a plurality of electronic documents using the lexical information, wherein the input query is a natural language input;identify, based on the lexical query, a set of electronic documents from the plurality of electronic documents;based on a first determination that the set of electronic documents satisfies a threshold, generate the response based at least on the set of electronic documents, wherein the threshold indicates a measure of information associated with results of the lexical query;based on a second determination that the measure of information associated with the results of the lexical query does not satisfy the threshold:determine, based on the input query, one or more vectors stored at a vector database, the one or more vectors characterizing semantic information of one or more documents of the plurality of electronic documents, andgenerate, based at least on the one or more vectors, the response; andoutput an indication of the response.

2. The system of claim 1, wherein to generate the response, the instructions further cause the processing circuitry to:determine, based on the input query, a query category from a plurality of query categories;determine, based on the query category, context configuration data; andgenerate, based on the context configuration data, the response.

3. The system of claim 2, wherein context configuration data includes a context window, and wherein to determine the context configuration data, the instructions cause the processing circuitry to determine the context configuration data based on the query category being mapped to the context configuration data.

4. The system of claim 1, wherein to identify the set of electronic documents, the instructions cause the processing circuitry to:determine, based on the lexical query, that lexical information included in the set of electronic document matches the lexical information from the input query.

5. The system of claim 1, wherein to determine the one or more vectors, the instructions cause the processing circuitry to:generate, based on the plurality of electronic documents, a plurality of vectors characterizing semantic information of the plurality of electronic documents;store the plurality of vectors at the vector database;generate, based on the input query, a vector query; anddetermine, based on the vector query, the one or more vectors.

6. The system of claim 1, wherein the first determination that the set of electronic documents satisfies the threshold includes determining a number of documents identified in the set of electronic documents satisfies a minimum number of documents.

7. The system of claim 1, wherein to generate the response based at least on the set of electronic documents, the instructions cause the processing circuitry to:generate, based on the input query and the set of electronic documents, a prompt; andgenerate, based at least on applying the prompt to a machine learning model, the response to include indications of the set of electronic documents.

8. The system of claim 1, wherein the response is a natural language response including text data.

9. The system of claim 1, wherein the input query includes unstructured text data.

10. The system of claim 1, wherein the input query is a first input query, the set of electronic documents is a first set of electronic documents, the one or more vectors are first one or more vectors, and the response is a first response, and wherein the instructions further cause the processing circuitry to:identify, based on a second input query requesting a second response, a second set of electronic documents from the plurality of electronic documents;based on determining the second set of electronic documents satisfies the threshold, generate the second response based at least on the second set of electronic documents and the first response;based on determining the second set of electronic documents does not satisfy the threshold:determine, based on the second input query, second one or more vectors stored at the vector database, andgenerate, based at least on the second one or more vectors and the first response, the second response; andoutput an indication of the second response.

11. The system of claim 10, wherein the instructions further cause the processing circuitry to generate one or more input query recommendations based on the first input query and the second input query.

12. A method for generating responses to input queries, the method comprising:generating, by a document management system based on lexical information from an input query requesting a response, a lexical query associated with searching a plurality of electronic documents using the lexical information, wherein the input query is a natural language input;identifying, by the document management system and based on the lexical query, a set of electronic documents from one or more databases storing the plurality of electronic documents;determining, by the document management system, whether the set of electronic documents satisfies a threshold, wherein the threshold indicates a measure of information associated with results of the lexical query;based on a first determination that the set of electronic documents satisfies the threshold, generating, by the document management system, the response based at least on the set of electronic documents;based on a second determination that the measure of information associated with the results of the lexical query does not satisfy the threshold:determining, by the document management system and based on the input query, one or more vectors stored at a vector database, the one or more vectors characterizing semantic information of one or more documents of the plurality of electronic documents, andgenerating, by the document management system and based at least on the one or more vectors, the response; andoutputting, by the document management system, an indication of the response.

13. The method of claim 12, wherein generating the response further comprises:determining, based on the input query, a query category from a plurality of query categories;determining, based on the query category, context configuration data; andgenerating, based on the context configuration data, the response.

14. The method of claim 12, wherein identifying the set of electronic documents comprises:determining, based on the lexical query, that lexical information included in the set of electronic document matches the lexical information from the input query.

15. The method of claim 12, wherein determining the one or more vectors comprises:generating, based on the plurality of electronic documents, a plurality of vectors characterizing semantic information of the plurality of electronic documents;storing the plurality of vectors at the vector database;generating, based on the input query, a vector query; anddetermining, based on the vector query, the one or more vectors.

16. The method of claim 12, wherein the first determination that the set of electronic documents satisfies the threshold comprises determining a number of documents identified in the set of electronic documents satisfies a minimum number of documents.

17. Non-transitory computer-readable media encoded with instructions that, when executed by processing circuitry, cause the processing circuitry to:generate, based on lexical information from an input query requesting a response, a lexical query associated with searching a plurality of electronic documents using the lexical information, wherein the input query is a natural language input;identify, based on the lexical query, a set of electronic documents from one or more databases storing the plurality of electronic documents;based on a first determination that the set of electronic documents satisfies a threshold, generate the response based at least on the set of electronic documents, wherein the threshold indicates a measure of information associated with results of the lexical query;based on a second determination that the measure of information associated with the results of the lexical query does not satisfy the threshold:determine, based on the input query, one or more vectors stored at a vector database, the one or more vectors characterizing semantic information of one or more documents of the plurality of electronic documents, andgenerate, based at least on the one or more vectors, the response; andoutput an indication of the response.

18. The non-transitory computer-readable media of claim 17, wherein to generate the response, the instructions further cause the processing circuitry to:determine, based on the input query, a query category from a plurality of query categories;determine, based on the query category, context configuration data; andgenerate, based on the context configuration data, the response.

19. The non-transitory computer-readable media of claim 17, wherein to identify the set of electronic documents, the instructions cause the processing circuitry to:determine, based on the lexical query, that lexical information included in the set of electronic document matches the lexical information from the input query.

20. The non-transitory computer-readable media of claim 17, wherein to determine the one or more vectors, the instructions cause the processing circuitry to:generate, based on the plurality of electronic documents, a plurality of vectors characterizing semantic information of the plurality of electronic documents;store the plurality of vectors at the vector database;generate, based on the input query, a vector query; anddetermine, based on the vector query, the one or more vectors.

Citation Information

Patent Citations

  • Systems and methods for using a large language model for large documents

    US12417352B1

  • Systems and methods for agent-controlled federated retrieval-augmented generation

    US12450217B1

  • Method and system for retrieving documents with spoken queries

    US20050149516A1

  • Generating representative exemplars for indexing, clustering, categorization and taxonomy

    US20060242098A1

  • Structured cross-lingual relevance feedback for enhancing search results

    US20120158621A1