Graph-driven retrieval for table-text query answering

The graph-driven retrieval method integrates structured and unstructured data through a query-specific knowledge graph, addressing format disparities and computational challenges to provide accurate and cost-effective answers across diverse domains.

WO2026133341A1PCT designated stage Publication Date: 2026-06-25FUJITSU LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
FUJITSU LTD
Filing Date
2025-07-02
Publication Date
2026-06-25

AI Technical Summary

Technical Problem

Integrating structured and unstructured data for complex question-answering is challenging due to format disparities, data quality issues, and computational complexity, leading to unreliable and costly domain-specific solutions.

Method used

A graph-driven retrieval method that constructs a query-specific knowledge graph by combining structured tabular data and unstructured documents, using neural language models to generate accurate responses without domain-specific training.

Benefits of technology

Enhances data integration and consistency, improves accuracy, reduces computational costs, and adapts to various domains by efficiently merging and processing heterogeneous data types.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure IN2025050969_25062026_PF_FP_ABST
    Figure IN2025050969_25062026_PF_FP_ABST
Patent Text Reader

Abstract

According to an aspect, operations include acquiring an input query and context information, comprising tabular data and a set of documents, associated with the input query. The operations further include extracting first entity information from the input query, and further retrieving a subset of columns from the tabular data. The operations further include extracting second entity information from the set of documents, and further generating an entity-document graph. The operations further include obtaining a query-specific knowledge graph by combining the entity-document graph with the subset of columns, and further traversing the query-specific knowledge graph to extract paths associated with the input query. The operations further include constructing a prompt comprising the input query and the paths. The operations further include generating a response to the input query based on application of a neural language model on the prompt.
Need to check novelty before this filing date? Find Prior Art

Description

GRAPH-DRIVEN RETRIEVAL FOR TABLE-TEXT QUERY ANSWERINGFIELD

[0001] The embodiments discussed in the present disclosure are related to graph- driven retrieval for table-text query answering.BACKGROUND

[0002] In today’s data-driven world, integrating structured data (like tables and databases) with unstructured data (such as documents and articles) is crucial for comprehensive decision-making. Structured data is organized and easily searchable, while unstructured data offers rich, nuanced insights. Combining these data types helps address complex queries across various domains but presents challenges due to their differing formats. Structured data is highly organized, whereas unstructured data is free-form and context-dependent, complicating their alignment and merging. Ensuring data quality and consistency is also difficult, as unstructured data often contains ambiguities. Additionally, processing large volumes of diverse data is computationally complex.

[0003] To meet the demand for complex question-answering across structured and unstructured data, integrating structured and unstructured data is essential. Traditional methods relying on training data are limited across different domains. However, using Pre-trained Generative Decoders (for instance, Large Language Models (LLMs)) with efficient context-retrievers ensures scalability and adaptability. Conventional methods relying on LLMs often struggle with large context sizes of data and / or poor connections between data types. The struggle may lead to unreliableanswers. Additionally, the conventional methods for answering queries requiring training data are domain-specific and costly in terms of time and money.

[0004] The subject matter claimed in the present disclosure is not limited to embodiments that solve any disadvantages or that operate only in environments such as those described above. Rather, this background is only provided to illustrate one example technology area where some embodiments described in the present disclosure may be practiced.SUMMARY

[0005] According to an aspect of an embodiment, the method may include a set of operations which may include acquiring an input query and context information associated with the input query where the context information may include tabular data and a set of documents. The set of operations may further include extracting first entity information from the input query. The set of operations may further include retrieving a subset of columns from the tabular data based on a first mapping between the first entity information and header information in the tabular data. The set of operations may further include extracting second entity information from the set of documents. The set of operations may further include generating an entitydocument graph based on a second mapping between the second entity information and the set of documents. The set of operations may further include obtaining a query-specific knowledge graph by combining the entity-document graph with the subset of columns. The set of operations may further include traversing the queryspecific knowledge graph to extract, from the query-specific knowledge graph, one or more paths associated with the input query and further constructing a promptcomprising the input query and the one or more paths. The set of operations may further include generating a response to the input query based on application of a neural language model on the prompt.

[0006] The objects and advantages of the embodiments will be realized and achieved at least by the elements, features, and combinations particularly pointed out in the claims.

[0007] Both the foregoing general description and the following detailed description are given as examples and are explanatory and are not restrictive of the invention, as claimed.BRIEF DESCRIPTION OF THE DRAWINGS

[0008] Example embodiments will be described and explained with additional specificity and details through the use of the accompanying drawings in which:

[0009] FIG. 1 is a diagram representing an example environment related to graph- driven retrieval for table-text query answering;

[0010] FIG. 2 is a block diagram that illustrates an exemplary system for graph- driven retrieval for table-text query answering;

[0011] FIG. 3 is a diagram that illustrates a flowchart of an example steps for graph-driven retrieval for table-text query answering;

[0012] FIG. 4A, FIG. 4B, and FIG. 4C collectively illustrate a sequence diagram depicting stepwise operations involved in formation of query-specific knowledge graph for table-text query answering; and

[0013] FIG. 5 is a diagram that illustrates a flowchart of an example method for graph-driven retrieval for table-text query answering,

[0014] all according to at least one embodiment described in the present disclosure.DESCRIPTION OF EMBODIMENTS

[0015] Some embodiments described in the present disclosure relate to methods and systems for graph-driven retrieval for table-text query answering. In the present disclosure, an input query may be acquired. Further, context information associated with the input query may be acquired, where the context information may include tabular data and a set of documents. Thereafter, first entity information may be extracted from the input query. Based on a first mapping between the first entity information and header information in the tabular data, a subset of columns from the tabular data may be retrieved. Further, second entity information may be extracted from the set of documents. Based on a second mapping between the second entity information and the set of documents, an entity-document graph may be generated. Thereafter, by combining the entity-document graph with the subset of columns, a query-specific knowledge graph may be obtained. Thereafter, the query-specific knowledge graph may be traversed to extract, from the query-specific knowledge graph, one or more paths associated with the input query. Thereafter, a prompt including the input query and the one or more paths may be constructed. Based on application of a neural language model on the prompt, a response may be generated for the input query.

[0016] According to one or more embodiments of the present disclosure, the technological field of information retrieval and question answering may be improvedby configuring a computing system in a manner that the computing system is able to perform table-text query answering based on graph-driven retrieval.

[0017] For precise answering of complex queries and data-driven decision making, analysis of a variety of data domains related to the queries is required. Distinct data domains may include different data types such as structured data and unstructured data. Often, the structed data and the unstructured data maybe needed to be integrated with one another in order to derive to an appropriate response. The unstructured data may encompass text sources such as documents, articles, and reports. Integrating structured and unstructured data to answer questions using language models presents several challenges. Firstly, data format disparity is a significant issue; structured data is organized in predefined schemas like relational database tables, making it easy to query and analyze, whereas unstructured data includes text, images, and videos that lack a predefined structure, complicating the alignment and merging of these data types. Secondly, ensuring data quality and consistency across various sources is difficult, as unstructured data often contains ambiguities, redundancies, and inconsistencies that require resource-intensive and complex data cleansing and normalization processes. Thirdly, scalability and performance are concerns, as integrating large volumes of heterogeneous data can strain computational resources, necessitating scalable architectures and complex algorithms to maintain performance as data volume increases.

[0018] Additionally, data integration and transformation processes are complex, often requiring the mapping of unstructured data to structured formats to create unified data models that are coherent and usable for analysis. Storage and retrieval of integrated data also pose challenges, as structured data is typically stored inrelational databases, while unstructured data may reside in NoSQL databases, data lakes, or other storage solutions, necessitating a unified storage strategy for efficient querying and retrieval. Interoperability is another critical issue, requiring the standardization of data formats and protocols to ensure that different systems and tools can work together seamlessly, despite the diversity of data sources and technologies involved.

[0019] The disclosed method for graph-driven retrieval in table-text query answering offers several advantages. Firstly, the disclosed method may enhance data integration and consistency by efficiently merging structured and unstructured data in the query and the context (tables and documents) through a query-specific knowledge graph. This may ensure high data quality and consistency across varying data types, even when handling large volumes of heterogeneous data. Unlike traditional query answering models that require extensive domain-specific training, this method may generate responses based on the traversal of a query-specific knowledge graph, eliminating the need for domain-specific training, and making the system versatile and adaptable to various domains.

[0020] Moreover, the method may improve the accuracy of question answering by constructing a hybrid graph that connects table headers, relevant columns, rows, and corresponding paragraphs. This effective exploitation of interactions between structured and unstructured data may result in more accurate answers to queries over semi-structured data. Additionally, the method allows pruning contextual and relevant information from semi-structured data (tables and text) through questionspecific graph retrieval. This may reduce the context size, leading to more efficient processing and lower computational costs.

[0021] A key objective of this disclosure is to enhance multi-hop Table+Text question-answering by efficiently retrieving necessary and sufficient information from the context (Table+Text) while balancing the context length. This may be particularly beneficial for businesses, as the method enables customers to connect in-house data (PDFs, Excel sheets, and other documents) and ask questions that pertain to various information from multiple sources (structured and unstructured data). Furthermore, by reducing the context size, the method may lower the cost of API calls to advanced language models, making the disclosed method a cost-effective solution for businesses.

[0022] FIG. 1 is a diagram representing an example environment related to graph- driven retrieval for table-text query answering, arranged in accordance with at least one embodiment described in the present disclosure. With reference to FIG. 1, there is shown an environment 100. The environment 100 may include a system 102, a neural language model 104, an embedding model 106, a server 108, a database 110, a communication network 112, and a user device 114. The system 102, the server 108, the database 110, and the user device 114 may be communicatively coupled to each other, via the communication network 112. The server 108 or the database 110 may store multiple tabular datasets including tabular data 118-1 and multiple sets of documents including set of documents 118-2.

[0023] The system 102 may include suitable logic, circuitry, interfaces, and / or code that may be configured to acquire an input query 120 from a user 116 associated with the user device 114. The system 102 may further acquire context information 118 associated with the input query 120, where the context information 118 may include the tabular data 118-1 and the set of documents 118-2. The system 102 mayfurther process the context information 118 to obtain a query-specific knowledge graph (for instance, query-specific knowledge graph 418-1 of FIG. 4B). The system 102 may further traverse the query-specific knowledge graph 418-1 to obtain an appropriate response to the input query 120. Examples of the system 102 may include, but are not limited to, a desktop computer, a laptop, a computer workstation, a computing device, a mainframe machine, a mobile device, a server (such as a cloud server), or a group of servers. The system 102 may be implemented using hardware including a processor, a microprocessor (e.g., to perform or control performance of one or more operations), a field-programmable gate array (FPGA), or an applicationspecific integrated circuit (ASIC). In some other instances, the system 102 may be implemented using a combination of hardware and software.

[0024] The neural language model 104 may be a computational network or a system of artificial neurons arranged in a plurality of layers that may be used to generate an answer to an input query (such as the input query 120) in the form of a text or a multimodal input (e.g., text and images). The neural language model 104 may accept an input (e.g., a combination of the input query 120 and context extracted from a graph representation (e.g., the query-specific knowledge graph 418-1) of contextual information required to answer the input query.

[0025] In an exemplary embodiment, the neural language model 104 may refer to a computer-based system or method that employs artificial neural networks, such as transformer-based architectures, designed to process and generate human language text. The neural language model 104 may be characterized by the ability to understand and generate text by learning patterns and relationships within large datasets, enabling applications in natural language understanding, text generation,translation, and various other language-related tasks. Examples of the neural language model 104 may include, but are not limited to, a GPT (Generative Pretrained Transformer) model, a BERT (Bidirectional Encoder Representations from Transformers) model, an ELMo (Embeddings from Language) model, a ULMFiT (Universal Language Model Fine-tuning) model, an XLNet model, T5 (Text-to-Text Transfer Transformer) model, RoBERTa, CTRL (Conditional Transformer Language Model), or BART (Bidirectional and Auto-Regressive Transformers).

[0026] As an artificial deep neural network, the plurality of layers of the neural language model 104 include an input layer, one or more hidden layers, and an output layer. Each layer of the plurality of layers may include one or more nodes (or artificial neurons. Outputs of all nodes in the input layer may be coupled to at least one node of hidden layer(s). Similarly, inputs of each hidden layer may be coupled to outputs of at least one node in other layers of the neural language model 104. Outputs of each hidden layer may be coupled to inputs of at least one node in other layers of the neural language model 104. Node(s) in the final layer may receive inputs from at least one hidden layer to output a result. The number of layers and the number of nodes in each layer may be determined from hyper-parameters of the neural language model 104. Such hyper-parameters may be set before or after training the neural language model 104 on a training dataset.

[0027] Each node of the neural language model 104 may correspond to a mathematical function (e.g., a sigmoid function or a rectified linear unit) with a set of parameters, tunable during training of the neural language model 104. The set of parameters may include, for example, a weight parameter, a regularization parameter, and the like. Each node may use the mathematical function to compute anoutput based on one or more inputs from nodes in other layer(s) (e.g., previous layer(s)) of the neural language model 104. All or some of the nodes of the neural language model 104 may correspond to same or a different mathematical function.

[0028] The neural language model 104 may include electronic data, which may be implemented as, for example, a software component of an application executable on the system 102. The neural language model 104 may rely on libraries, external scripts, or other logic / instructions for execution by a processing device. The neural language model 104 may include code and routines configured to enable a computing device to perform one or more operations for question answer generation. Additionally, or alternatively, the neural language model 104 may be implemented using hardware including, but not limited to, a processor, a microprocessor (e.g., to perform or control performance of one or more operations), a field-programmable gate array (FPGA), or an application-specific integrated circuit (ASIC). Alternatively, in some embodiments, the neural language model 104 may be implemented using a combination of hardware and software.

[0029] The embedding model 106 may be a machine learning model designed to represent words, phrases, or entire documents as vectors, which are points in a continuous vector space. These vectors may encapsulate semantic meanings and relationships between text elements, facilitating more effective processing and analysis of natural language data. In this model, each word or text element may be represented as a dense vector of real numbers, typically of fixed length, such as 100, 200, or 300 dimensions. The core idea is that words or text elements with similar meanings are mapped to vectors that are close to each other in the vector space. Forinstance, the words “airport” and “flight” would have vectors that are closer to each other than the vectors for “airport” and “shop.”

[0030] Training the embedding model 106 may involve a large corpora of text data, where the embedding model 106 learns to position words in the vector space such that the distances between vectors reflect semantic relationships between the vectors. Common training methods include Word2Vec, which uses techniques like Continuous Bag of Words (CBOW) and Skip-gram to predict context words from a target word or vice versa, and GloVe (Global Vectors for Word Representation), which leverages word co-occurrence statistics from a corpus to learn embeddings. Examples of the embedding model 106 may include, but are not limited to, GloVe, Word2Vec, BERT (Bidirectional Encoder Representations from Transformers), GPT (Generative Pre-trained Transformer), ELMo (Embeddings from Language Models), and Transformer-XL.

[0031] The server 108 may include suitable logic, circuitry, and interfaces, and / or code that may be configured to acquire the context information 118 associated with the input query 120. The context information 118 may include the tabular data 118- 1 and the set of documents 118-2. Further, the acquired context information 118 may be shared with the system 102. The server 108 may execute operations through web applications, cloud applications, HTTP requests, repository operations, file transfer, and the like. Example implementations of the server 108 may include, but are not limited to, a database server, a file server, a web server, an application server, a mainframe server, or a cloud computing server.

[0032] In at least one embodiment, the server 108 may be implemented as a plurality of distributed cloud-based resources by use of several technologies that arewell known to those ordinarily skilled in the art. A person with ordinary skill in the art will understand that the scope of the disclosure may not be limited to the implementation of the server 108 and the system 102 as two separate entities. In certain embodiments, the functionalities of the server 108 can be incorporated in its entirety or at least partially in the system 102, without a departure from the scope of the disclosure. In certain embodiments, the server 108 may host the database 110. Alternatively, the server 108 may be separate from the database 110 and may be communicatively coupled to the database 110.

[0033] The database 110 may be configured to store the context information 118 including the tabular data 118-1 and references to the set of documents 118-2. The database 110 maybe derived from data off a relational or non-relational database, or a set of comma-separated values (csv) files in conventional or big-data storage. The database 110 may be stored or cached on a device, such as the server 108 or the system 102. The device storing the database 110 may be configured to receive a command from the system 102 for retrieving, based on the input query 120, the tabular data 118-1 and the set of documents 118-2. In response, the device of the database 110 may be configured to retrieve and provide the tabular data 118-1 and the set of documents 118-2 to the system 102 based on the received command. In some embodiments, the database 110 may be hosted on a plurality of servers stored at same or distinct locations. The operations of the database 110 may be executed using hardware including a processor, a microprocessor (e.g., to perform or control performance of one or more operations), a field-programmable gate array (FPGA), or an application-specific integrated circuit (ASIC). In some other instances, the database 110 may be implemented using software.

[0034] The communication network 112 may include a communication medium through which the system 102 may communicate with the server 108. Examples of the communication network 112 may include, but are not limited to, the Internet, a cloud network, a Wireless Fidelity (Wi-Fi) network, a Personal Area Network (PAN), a Local Area Network (LAN), and / or a Metropolitan Area Network (MAN). Various devices in the environment 100 may be configured to connect to the communication network 112, in accordance with various wired and wireless communication protocols. Examples of such wired and wireless communication protocols may include, but are not limited to, at least one of a Transmission Control Protocol and Internet Protocol (TCP / IP), User Datagram Protocol (UDP), Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP), ZigBee, EDGE, IEEE 802.11, light fidelity(Li-Fi), 802.16, IEEE 802.11s, IEEE 802.11g, multi-hop communication, wireless access point (AP), device to device communication, cellular communication protocols, and / or Bluetooth (BT) communication protocols, or a combination thereof.

[0035] The user device 114 may include a user-interface through which a user may interact with the system 102, send queries, feed commands instructions, and provide the input query 120 to the system 102. The user may be an authorized person associated with the system 102 or the server 108. The user device 114 may be fixed at a place or may be portable. Examples of the user device 114 may include, but not limited to, a smartphone, a wearable device, a personal computer, an admin terminal of a server, or a display device.

[0036] In operation, the system 102 may acquire the input query 120. In an embodiment, the user 116 may provide the input query 120 through a user interfaceof the user device 114. The system 102 may communicate with the user device 114 to receive the input query 120 from the user device 114. The input query 120 may be in the form of text in a particular language such as English. Details related to acquisition of the input query are further provided, for example, in FIG. 3 (at 304).

[0037] Upon acquisition of the input query 120, the system 102 may further acquire the context information 118 associated with the input query 120. The context information 118 may include the tabular data 118-1 and the set of documents 118-2. In an exemplary embodiment, each row of the tabular data 118-1 may represent a record and each column may represent a feature or attribute of the respective record. Examples of the tabular data 118-1 may include, but are not limited to, spreadsheets, SQL tables, or CSV files. The set of documents 118-2 may include multiple documents containing unstructured data. As an example, each document in the set of documents 118-2 may include at least one of textual content, image content, or a combination of the textual content and the image content. In some instances, each document may be a chunk of text that may be contextually relevant to the input query 120 and may be extracted from a large corpus of text. Details related to acquisition of the context information are further provided, for example, in FIG. 3 (at 304).

[0038] The system 102 may further extract first entity information from the input query 120. The first entity information may include a first set of entities included in the input query 120 and a set of entity types corresponding to the first set of entities. The process of extraction of the first entity information from the input query 120 may involve identifying and isolating specific pieces of data associated with the input query 120, where each piece of the isolated pieces may represent distinct entities ofthe first set of entities and related information such as entity-type of the set of entity types for all the entities present within the text associated with the input query 120.

[0039] In the context of Natural Language Processing (NLP), entities and entity types are concepts used in tasks such as Named Entity Recognition (NER). For instance, entities may be specific pieces of information extracted from a text that represent real-world objects, concepts, or phenomena. Such entities may include, for instance, names of people, organizations, locations, dates, quantities, and the like. For example, in the sentence “Apple Inc. was founded by Steve Jobs in Cupertino,” the entities are “Apple Inc.,” “Steve Jobs,” and “Cupertino.”

[0040] Entity types are categories or classes into which these entities may be grouped. Each entity type may represent a specific kind of information. Common entity types include Person (PER) for names of individuals, Organization (ORG) for names of companies or institutions, Location (LOC) for geographical locations, Date (DATE) for specific dates or time expressions, Time (TIME) for specific times of the day, Money (MONEY) for monetary values, Percent (PERCENT) for percentage values, and Miscellaneous (M1SC) for other entities that don’t fit into the above categories. For instance, consider the sentence: “Google® was founded by Larry Page and Sergey Brin in September 1998 in Menlo Park.” In this sentence, the entities are “Google,” “Larry Page,” “Sergey Brin,” “September 1998,” and “Menlo Park.” The corresponding entity types are Organization for “Google,” Person for “Larry Page” and “Sergey Brin,” Date for “September 1998,” and Location for “Menlo Park.” Further details related to extraction of the first entity information from the input query are further provided, for example, in FIG. 3 (at 306).

[0041] The system 102 may further retrieve a subset of columns from the tabular data 118-1 based on a first mapping between the first entity information and header information in the tabular data 118-1. For instance, the first mapping may include prompting the neural language model 104 with an input comprising the header information and the first entity information along with a base instruction to map the entities in the first entity information with headers (e.g., table name(s) and column names) based on contextual or semantic similarity. The neural language model 104 may form a set of entity-header pairs from the input, where each entity-header pair of the set of entity-header pairs may include an entity and a header that is semantically similar to the entity. Alternatively, instead of using the neural language model 104, a sematic similarity (e.g., cosine distance) may be computed between vector embeddings of the first set of entities (and entity types) and vector embeddings of the headers included in the header information. The entities or entity types with most similarity to the headers may form entity-header pairs. For such computation, the embedding model 106 may be used to compute the word or phrase embeddings.

[0042] In an exemplary embodiment, the subset of columns may be retrieved from the tabular data 118-1 by filtering the tabular data 118-1 using a set of headers included in the set of entity-header pairs. Details related to the retrieval of the subset of columns from the tabular data are further provided, for example, in FIG. 3 (at 310).

[0043] The system 102 may further extract second entity information from the set of documents 118-2. The second entity information may include a second set of entities. Each document of the set of documents 118-2 may include at least a subset of the second set of entities. The process of extraction of the second entityinformation from the set of documents 118-2 may involve parsing each document of the set of documents 118-2 and identifying and isolating specific pieces of data associated with the set of documents 118-2, where each piece may represent a distinct named entity of the second set of entities present within the set of documents 118-2. For example, consider a sentence in a document: “John Doe, a software engineer at Fujitsu®, attended the Al conference in San Francisco on September 15, 2021.” In this sentence, the entities that can be extracted are “John Doe” as a person, “software engineer” as a job title, “Fujitsu®” as an organization, “Al conference” as an event, “San Francisco” as a location, and “September 15, 2021” as a date. The process of entity extraction may involve several steps. For instance, the document’s text may be tokenized, which means the text may be broken down into individual words or tokens. Next, part-of-speech tagging may be performed, where each token may be assigned a part of speech, such as noun or verb. Finally, the entities may be recognized and classified based on predefined categories. The system 102 may utilize a Natural Language Model algorithm or a Retrieval Augmented Generation (RAG) based approach to extract the second entity information from the set of documents 118-2. Further details related to the extraction of the second entity information from the set of documents are further provided, for example, in FIG. 3 (at 306).

[0044] Upon extraction of the second entity information, the system 102 may generate an entity-document graph (for instance, entity-document graph 416 in FIG. 4B) based on a second mapping between the second entity information and the set of documents 118-2. The second mapping for the generation of the entity-document graph 416-1 may include initialization of the entity-document graph 416-1 by including a set of document nodes corresponding to the set of documents 118-2.Further, the second set of entities may be represented as a set of entity nodes in the entity-document graph 416-1. Further, links may be added between the set of document nodes and the set of entity nodes based on a source association between the set of documents 118-2 and the second set of entities. Details related to the generation of the entity-document graph 416-1 are further provided, for example, in FIG. 3 (at 308).

[0045] Further, the system 102 may obtain the query-specific knowledge graph 418-1 by combining the entity-document graph 416-1 with the subset of columns retrieved from the tabular data 118-1. The combination may include selection of an entity node from the set of entity nodes. Further, for the selected entity node, the system 102 may identify an entry from the subset of columns, such that the identified entry is semantically similar to the selected entity node. Further, the system 102 may extract a set of entries from the subset of columns such that the extracted set of entries is associated with the identified entry. Further, the system 102 may update the entity-document graph 416-1 to obtain the query-specific knowledge graph 418- 1 by including a set of entry nodes representing the extracted set of entries and linking the set of entry nodes to the selected entity node. The updating of the entitydocument graph 416-1 to obtain the query-specific knowledge graph 418-1 may also involve including a set of header nodes representing the set of headers and linking the set of header nodes to at least one node of the set of entry nodes or the entity node. Details related to the query-specific knowledge graph 418-1 are further provided, for example, in FIG. 3 (at 310).

[0046] Further, the system 102 may traverse the query-specific knowledge graph 418-1 to extract, from the query-specific knowledge graph 418-1, one or more pathsassociated with the input query 120. In an exemplary embodiment, the system 102 may use a n-hop Breadth-First Search (BFS) traversal to traverse the query-specific knowledge graph 418-1. Details related to the traversal of the query-specific knowledge graph 418-1 to extract the one or more paths are further provided, for example, in FIG. 3 (at 312).

[0047] Based on extraction of the one or more paths, the system 102 may construct a prompt, which may include the input query 120 and the one or more paths. The construction of prompt may result in creating a clear, concise, and specific input or question designed to elicit a desired response from the neural language model 104. The process of construction may include defining context, specifying required information, and prompt structuring in a way that may guide the neural language model 104 to generate relevant and accurate response to the input query 120. Details related to the construction of the prompt are further provided, for example, in FIG. 3 (at 316).

[0048] The system 102 may further generate a response to the input query 120 based on application of the neural language model 104 on the prompt. The prompt may be fed to the neural language model 104, and the neural language model 104 may process the prompt and tokenize text related to the prompt into smaller units like tokens. These tokens may then be converted into numerical representations, such as embeddings, which may capture semantic information. The neural language model 104 may further process these embeddings to understand the context and relationships between tokens. By analyzing the input prompt, the neural language model 104 may predict a required response. Details related to the generation of the response are further provided, for example, in FIG. 3 (at 316).

[0049] Modifications, additions, or omissions may be made to FIG. 1 without departing from the scope of the present disclosure. For example, the environment 100 may include more or fewer elements than those illustrated and described in the present disclosure. For instance, in some embodiments, the environment 100 may include the system 102 but not the database 110. In addition, in some embodiments, the functionality of the database 110 may be incorporated into the system 102, without a deviation from the scope of the disclosure.

[0050] FIG. 2 is a block diagram that illustrates an exemplary system for graph- driven retrieval for table-text query answering, arranged in accordance with at least one embodiment described in the present disclosure. FIG. 2 is explained in conjunction with elements from FIG. 1. With reference to FIG. 2, there is shown a block diagram 200 of a system 102. The system 102 may include a processor 202, a memory 204, a network interface 206, an input / output (I / O) device 208, and a display device 208A.

[0051] The processor 202 may include suitable logic, circuitry, and / or interfaces that may be configured to execute program instructions associated with different operations to be executed by the system 102. The processor 202 may be configured to acquire an input query 120. The processor 202 may be configured to acquire the context information 118 associated with the input query 120. The context information 118 may include the tabular data 118-1 and the set of documents 118-2. The processor 202 may be configured to extract first entity information from the input query 120. The processor 202 may be configured to retrieve a subset of columns from the tabular data 118-1 based on a first mapping between the first entity information and header information in the tabular data 118-1. The processor 202may be configured to extract second entity information from the set of documents 118-2. The processor 202 may be configured to generate the entity-document graph 416-1 based on a second mapping between the second entity information and the set of documents 118-2. The processor 202 may be configured to obtain the queryspecific knowledge graph 418-1 by combining the entity-document graph 416-1 with the subset of columns. The processor 202 may be configured to traverse the queryspecific knowledge graph 418-1 to extract, from the query-specific knowledge graph 418-1, one or more paths associated with the input query 120. The processor 202 may be configured to construct a prompt, which may include the input query 120 and the one or more paths. The processor 202 may be configured to generate a response to the input query 120 based on application of a neural language model on the prompt.

[0052] The processor 202 may include any suitable special-purpose or general- purpose computer, computing entity, or processing device including various computer hardware or software modules and may be configured to execute instructions stored on any applicable computer-readable storage media. For example, the processor 202 may include a microprocessor, a microcontroller, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a Field-Programmable Gate Array (FPGA), or any other digital or analog circuitry configured to interpret and / or to execute program instructions and / or to process data.

[0053] Although illustrated as a single processor in FIG. 2, the processor 202 may include any number of processors configured to, individually or collectively, perform or direct performance of any number of operations of the system 102, as describedin the present disclosure. Additionally, one or more of the processors may be present on one or more different electronic devices, such as different servers. In some embodiments, the processor 202 may be configured to interpret and / or execute program instructions and / or process data stored in the memory 204. Some of the examples of the processor 202 may be a Graphics Processing Unit (GPU), a Central Processing Unit (CPU), a Reduced Instruction Set Computer (RISC) processor, an ASIC processor, a Complex Instruction Set Computer (CISC) processor, a coprocessor, and / or a combination thereof.

[0054] The memory 204 may include suitable logic, circuitry, interfaces, and / or code that may be configured to store the the context information 118 including the tabular data 118-1 and the set of documents 118-2. The memory 204 may store program instructions executable by the processor 202. In certain embodiments, the memory 204 may be configured to store operating systems and associated application-specific information. The memory 204 may include computer-readable storage media for carrying or having computer-executable instructions or data structures stored thereon. Such computer-readable storage media may include any available media that may be accessed by a general-purpose or special-purpose computer, such as the processor 202. By way of example, and not limitation, such computer-readable storage media may include tangible or non-transitory computer- readable storage media including Random Access Memory (RAM), Read-Only Memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Compact Disc Read-Only Memory (CD-ROM) or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory devices (e.g., solid state memory devices), or any other storage medium which may be used to carry or storeparticular program code in the form of computer-executable instructions or data structures and which may be accessed by a general-purpose or special-purpose computer. Combinations of the above may also be included within the scope of computer-readable storage media. Computer-executable instructions may include, for example, instructions and data configured to cause the processor 202 to perform a certain operation or group of operations associated with the system 102.

[0055] The network interface 206 may comprise suitable logic, circuitry, interfaces, and / or code that may be configured to establish a communication between the system 102, the neural language model 104, the embedding model 106, the server 108, device of the database 110, and the user device 114 via the communication network 112. The network interface 206 may be implemented by use of various known technologies to support wired or wireless communication of the system 102, via the communication network 112. The network interface 206 may include, but is not limited to, an antenna, a radio frequency (RF) transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a coderdecoder (CODEC) chipset, a subscriber identity module (SIM) card, and / or a local buffer.

[0056] The network interface 206 maybe configured to communicate via wireless communication with networks, such as the Internet, an Intranet, a wireless network, a cellular telephone network, a wireless local area network (LAN), or a metropolitan area network (MAN). The wireless communication may be configured to use one or more of a plurality of communication standards, protocols and technologies, such as Global System for Mobile Communications (GSM), Enhanced Data GSM Environment (EDGE), wideband code division multiple access (W-CDMA), Long Term Evolution(LTE), 5th Generation (5G) New Radio (NR), code division multiple access (CDMA), time division multiple access (TDMA), Bluetooth, Wireless Fidelity (Wi-Fi) (such as IEEE 802.11a, IEEE 802.11b, IEEE 802.11g or IEEE 802. lln), voice over Internet Protocol (VoIP), light fidelity (Li-Fi), Worldwide Interoperability for Microwave Access (Wi-MAX), a protocol for email, instant messaging, and a Short Message Service (SMS).

[0057] The I / O device 208 may include suitable logic, circuitry, interfaces, and / or code that may be configured to receive the input query 120. The I / O device 208 may include various input and output devices, which may be configured to communicate with the processor 202 and other components, such as the network interface 206. Examples of the input devices may include, but are not limited to, a touch screen, a keyboard, a mouse, a joystick, and / or a microphone. Examples of the output devices may include, but are not limited to, a display (e.g., the display device 208A) and a speaker.

[0058] The display device 208A may comprise suitable logic, circuitry, interfaces, and / or code that may be configured to display the response generated to the input query 120. The display device 208A may be configured to receive the input query 120 from the user 116. In such cases the display device 208A may be a touch screen to receive user inputs associated with the input query 120. The display device 208A may be realized through several known technologies such as, but not limited to, a Liquid Crystal Display (LCD) display, a Light Emitting Diode (LED) display, a plasma display, and / or an Organic LED (OLED) display technology, and / or other display technologies.

[0059] Modifications, additions, or omissions maybe made to the example system 102 without departing from the scope of the present disclosure. For example, in some embodiments, the example system 102 may include any number of other components that may not be explicitly illustrated or described for the sake of brevity.

[0060] FIG. 3 is a diagram that illustrates a flowchart of an example method for graph-driven retrieval for table-text query answering, in accordance with an embodiment of the disclosure. FIG. 3 is described in conjunction with elements from FIG. 1 and FIG. 2. With reference to FIG. 3, there is shown a flowchart 300. The method illustrated in the flowchart 300 may start at 302 and may be proceed to 304. The method may be performed by any suitable system, apparatus, or device, such as, by the example system 102 of FIG. 1, or the processor 202 of FIG. 2.

[0061] Although illustrated with discrete blocks, the steps and operations associated with one or more of the blocks of the flowchart 300 may be divided into additional blocks, combined into fewer blocks, or eliminated, depending on the particular implementation.

[0062] At 304, input query and context information associated with the input query may be acquired. The user 116 may input a query through a user interface rendered on the user device 114. The query may be related to a particular topic (e.g., flights) and may be posed as a natural language query in a suitable language such as English.

[0063] In some instances, when a user inputs the query, there is no assurance that a single query will yield the relevant results. For the neural language model 104 to provide an accurate answer, the query may need to be divided into separate subqueries, retrieve results for each subquery, and then compile the results to form acomprehensive response. Thus, the processor 202 may be configured to divide the query into a set of sub queries based on application of the neural language model 104 on the query. In such a case, the input query for the neural language model 104 may be an individual sub query acquired from the set of sub queries. For instance, a user may query, “What are the key differences between the iPhone 12 and the iPhone 13 in terms of battery life, camera quality, and processing power?”. The system 102 may have multiple sources detailing various aspects of iPhone 12 and iPhone 13, but no source comparing the various aspects of iPhone 12 and iPhone 13. To answer the query, the query may need to be decomposed into multiple sub -queries such as - “what is the battery life of the iPhone 12 and the iPhone 13?”, “what is the camera quality of both the iPhone 12 and the iPhone 13?”, and “what is processing power of the iPhone 12 and the iPhone 13”.

[0064] The processor 202 may be further configured to acquire the context information 118 associated with the input query 120. The context information 118 may include the tabular data 118-1 and the set of documents 118-2. The tabular data 118-1 may be in the form of structured data, which may be organized in a table format, consisting of multiple rows and multiple columns. In an exemplary embodiment, each row of the multiple rows may represent a record and each column may represent a feature or attribute of the respective record. The tabular data 118-1 may include a single table or a plurality of linked tables. Examples of the tabular data 118-1 may include, but are not limited to, spreadsheets, database tables (e.g., SQL tables), and CSV files. Further, each document in the set of documents 118-2 may include unstructured data in the form of textual content or a combination of the textual content and image content.

[0065] In certain instances, when a user's query is unclear, the neural language model 104 may provide a less precise or even a vague response to the query. In some instances, the processor 202 may fail to extract any relevant entities from the query for mapping with header information in the tabular data 118-1. Therefore, the processor 202 may be configured to rephrase the query into the input query 120 by applying the neural language model 104 on the query with the header information in the tabular data 118-1 as an additional context input to the neural language model 104. The rephrased input query 120 may be in line with the header information in the tabular data 118-1. For example, consider a query, “How did Company X perform last year?” This query is vague and may lead to a variety of responses, including qualitative assessments, general comments, or a mix of financial and non -financial performance indicators. To make the query more definite, the query may be rephrased as, “Provide the revenue, net profit, and year-over-year growth rate for Company X for the fiscal year 2024.” This rephrased query may specify exactly what financial metrics are of interest (revenue, net profit, and year-over-year growth rate) and clearly states the time-period (fiscal year 2024).

[0066] In some instances, to acquire the context information 118, a semantic or vector search may be performed using the input query 120. The processor 202 may be configured to query a vector database, which may include a plurality of documents and a plurality of vector embeddings corresponding to the plurality of documents. The vector database may manage large volumes of high-dimensional vectors and may provide efficient storage and retrieval mechanisms. The plurality of vector embeddings may refer to the representation of words, phrases of each document of the plurality of documents, or each document of the the plurality of documents itselfas vectors (arrays of numbers) in a continuous vector space. The plurality of vector embeddings may aid in capturing the semantic meaning of text of each document of the plurality of documents in a way that can be easily processed by Natural Language Processing (NLP) and Machine Learning (ML) algorithms. The processor 202 may be further configured to generate a query vector embedding by applying the embedding model 106 on the input query 120. Each vector embedding may be a text embedding based on word embeddings (e.g., Word2Vec, GloVe) or sentence embeddings (e.g., BERT, Sentence-BERT, and the like).

[0067] The processor 202 may be further configured to acquire the set of documents 118-2 from the plurality of documents by performing a vector search using the query vector embedding on the vector database. The processor 202 may perform the vector search to find the set of documents 118-2 that are similar to the input query 120 by comparing the query vector embedding with each of the plurality of vector embeddings corresponding to the plurality of documents in the continuous vector space. Each document of the plurality of documents may be represented as a high-dimensional vector that captures its semantic meaning or features. During the vector search, the vector database may retrieve those documents of the plurality of documents whose vectors are closest to the query vector embedding. Such documents may be referred to as the set of documents 118-2. The closeness or similarity between the vectors may be computed using distance metrics such as Euclidean distance or cosine similarity.

[0068] At 306, a subset of columns may be retrieved. The processor 202 may be configured to extract first entity information from the input query 120. The first entity information may include a first set of entities included in the input query 120and a set of entity types corresponding to the first set of entities. The process of extraction of the first entity information from the input query 120 may involve identifying and isolating specific pieces of data associated with the input query 120, where each piece of the isolated pieces may represent distinct entities (e.g., named entities) of the first set of entities and related information such as entity-type of the set of entity types for all the entities present within the text associated with the input query 120. The process may typically include steps such as tokenization, where the text may be broken down into individual words or phrases, and named entity recognition (NER), which may use algorithms or machine learning models to classify these tokens into predefined categories such as names of people, organizations, locations, dates, and other relevant entities of the first set of entities. The goal is to accurately identify and categorize these entities to facilitate further processing or analysis. For example, in the query “Schedule a meeting with John in ABC compound on Monday,” the of the first set of entities may include ““John,” “ABC compound,” and “Monday”” and the corresponding set of entity-type may include ““person,” “location", and “date"".

[0069] The processor 202 may be further configured to retrieve a subset of columns from the tabular data 118-1 based on a first mapping between the first entity information and header information in the tabular data 118-1. In at least one embodiment, the first mapping may include prompting the neural language model 104 with the header information and the first entity information as an input. Prompting the neural language model 104 may involve providing the input as a prompt to the neural language model 104. The prompt may be in form of a word, phrase, sentence, or in a structured query format such as JSON (JavaScipt ObjectNotation). The neural language model 104, which has been trained on vast amounts of question-answer pair data, may use the prompt to determine which subset of column names from the header information match entities and / or entity types specified in the first entity information. Based on a response from the neural language model 104, the processor 202 may be further configured to retrieve a subset of columns from the tabular data 118-1.

[0070] In accordance with an embodiment, the neural language model 104 may form a set of entity-header pairs from the input (prepared for the first mapping). Each entity-header pair of the set of entity-header pairs may include an entity and a header that may be semantically similar to the entity. In an exemplary embodiment, the subset of columns may be retrieved from the tabular data 118-1 by filtering the tabular data 118-1 using a set of headers (e.g., column names) included in the set of entity-header pairs.

[0071] At 308, an entity-document graph may be generated. The processor 202 may be configured to extract second entity information from the set of documents 118-2. In an exemplary embodiment, the second entity information may include a second set of entities. Each document of the set of documents 118-2 may include at least a subset of the second set of entities.

[0072] The processor 202 may be further configured to generate the entitydocument graph 416-1 based on a second mapping between the second entity information and the set of documents 118-2. The second mapping for the generation of the entity-document graph 416-1 may include initialization of the entity-document graph 416-1 by including a set of document nodes corresponding to the set of documents 118-2. Further, the second set of entities may be represented as a set ofentity nodes in the entity-document graph 416-1. Further, links may be added between the set of document nodes and the set of entity nodes based on a source association between the set of documents 118-2 and the second set of entities, which may finally result in the generation of the entity-document graph 416-1.

[0073] By way of example, and not limitation, consider two text chunks, referred to as documents, from which entities may be extracted to create an entity-document graph. The first document states, “Apple Inc. announced the release of the new iPhone 13 in September 2021. The event was held in Cupertino, California.” From this document, we extract the entities: Apple Inc. (Organization), iPhone 13 (Product), September 2021 (Date), and Cupertino, California (Location). The second document reads, “Microsoft Corporation unveiled its latest Surface Pro model in October 2021. The launch event took place in Redmond, Washington.” The entities extracted from this document are Microsoft Corporation (Organization), Surface Pro (Product), October 2021 (Date), and Redmond, Washington (Location). In the entity-document graph, each document and entity may be represented as a node, with edges connecting documents to the respective entities. Document 1 is connected to Apple Inc., iPhone 13, September 2021, and Cupertino, California, while Document 2 is connected to Microsoft Corporation, Surface Pro, October 2021, and Redmond, Washington. This graph-based representation may allow us to visualize and analyze the relationships between the documents and the entities, making it easier to identify associations such as the companies and products mentioned, as well as the temporal and geographical contexts.

[0074] At 310, a query-specific knowledge graph may be obtained. The processor 202 may be configured to combine the entity-document graph 416-1 with the subsetof columns to obtain the query-specific knowledge graph 418-1. The process of combining may include selection of an entity node from the set of entity nodes. Further, for the selected entity node, the process may further include identification of an entry from the subset of columns, such that the identified entry is semantically similar to the selected entity node. Further, the process may further include extraction of a set of entries from the subset of columns, such that the extracted set of entries associated with the identified entry. Further, the process may further include updating of the entity-document graph 416-1 to obtain the query-specific knowledge graph 418-1 by including a set of entry nodes representing the extracted set of entries and linking the set of entry nodes to the selected entity node. The updating of the entity-document graph 416-1 to obtain the query-specific knowledge graph 418-1 may also involve including a set of header nodes representing the set of headers and linking the set of header nodes to at least one node of the set of entry nodes or the entity node.

[0075] For example, additional data from the retrieved subset of columns such as columns with columns “Event Name” and “Keynote Speaker,” and two records. The columns may contain the following records: “Apple Event” with keynote speaker Tim Cook, and “Microsoft Event” with keynote speaker Satya Nadella. Each cell in the column may be treated as an entity to create corresponding nodes in the graph. Document 1, which describes the release of the iPhone 13, may be connected to the entities “Apple Event” and “Tim Cook.” Document 2, detailing the unveiling of the Surface Pro, may be linked to the entities “Microsoft Event” and “Satya Nadella.” By adding these new nodes and establishing connections to the relevant documents, theentity-document graph 416-1 may be enriched with additional contextual information to obtain the query-specific knowledge graph 418-1.

[0076] At 312, the query-specific knowledge graph 418-1 may be traversed. The processor 202 may be configured to traverse the query-specific knowledge graph 418-1 to extract one or more paths from the query-specific knowledge graph 418-1. The traversal may be performed based on the input query 120 and each path may represent a context pruned from the query-specific knowledge graph 418-1 for answering the input query 120.

[0077] In an embodiment, the system 102 may use a n-hop Breadth-First Search (BFS) traversal to traverse the query-specific knowledge graph 418-1. The extracted one or more paths may be associated with the input query 120. The n-hop BFS traversal (e.g., 2-hop traversal) may explore each node of the set of document nodes and the set of entity nodes level by level, starting from a designated source node. The source node may be selected as an entity node from any of the set of entity nodes.

[0078] The n-hop BFS traversal may process the source node and may further enqueue all unvisited neighbor nodes. Further, one node of the neighbor nodes is again selected as the source node. This process iterates until the queue is empty. The systematic approach of the n-hop BFS traversal may ensure that all the nodes at a particular level are explored before moving on to the next level. It should be appreciated that though the BFS traversal is elaborated as an example, however the system 102 may work with other graph traversal algorithms, which may be well within the scope of the disclosure.

[0079] At 314, extraction of the one or more paths may be confirmed. The processor 202 may be configured to confirm whether the one or more pathsassociated with the input query 120 are extracted from the query-specific knowledge graph 418-1 or not. In an embodiment, when the extraction of the one or more paths from the query-specific knowledge graph 418-1 is confirmed, the processor 202 may be further configured to proceed to 316. When the extraction of the one or more paths from the query-specific knowledge graph 418-1 is not confirmed or it is confirmed that no path has been extracted from the query-specific knowledge graph 418-1, the processor 202 may be configured to proceed to 318.

[0080] At 316, a response (first response) may be generated. The processor 202 may be configured to construct a prompt that may include the input query 120 and the one or more paths. The construction of prompt may result in creating a clear, concise, and specific input or question designed to elicit a desired response from the neural language model 104. The process of construction may include defining context, specifying required information, and prompt structuring in a way that may guide the neural language model 104 to generate relevant and accurate response to the input query 120.

[0081] The processor 202 may be further configured to generate a first response to the input query 120 based on application of the neural language model 104 on the prompt. The neural language model 104 may process the prompt and tokenize text related to the prompt into tokens. These tokens may then be converted into numerical representations, such as embeddings, which may capture semantic information. The neural language model 104 may further process these embeddings through multiple neural networks layers, where each layer may apply complex mathematical transformations and attention mechanisms to understand the context and relationships between the tokens. By analyzing the input prompt, the neurallanguage model 104 may output a response in numerical form, which may be converted back to a human-readable text response. The response may be displayed on the user interface of the user device 114 as an answer to the input query 120.

[0082] At 318, another response (second response) may be generated. In case no path is extracted during the traversal, the processor 202 may be configured to generate a second response to the input query 120 based on application of the neural language model 104 on the query-specific knowledge graph 418-1. The neural language model 104 may process a prompt comprising the input query 120 and the query-specific knowledge graph 418-1 in a suitable graph description language. The neural language model 104 may tokenize text in the prompt into token which may be converted into numerical representations, such as embeddings. The neural language model 104 may further process the embeddings to understand the context and relationships between the tokens. By analyzing the prompt, the neural language model 104 may output the second response.

[0083] Although the flowchart 300 is illustrated as discrete operations, such as 302, 304, 306, 308, 310, 312, 314, 316, and 318. However, in certain embodiments, such discrete operations may be further divided into additional operations, combined into fewer operations, or eliminated, depending on the particular implementation without detracting from the essence of the disclosed embodiments.

[0084] FIG. 4A, FIG. 4B, and FIG. 40 collectively illustrate a sequence diagram for operations involved in formation of query-specific knowledge graph for table-text query answering. FIG. 4A, FIG. 4B, and FIG. 4C are described in conjunction with elements from FIG. 1, FIG. 2, and FIG. 3. With reference to FIG. 4A, FIG. 4B, and FIG. 4C, there is shown a sequence diagram 400. The operations illustrated in thesequence diagram 400 may be performed by any suitable system, apparatus, or device, such as, by the example system 102 of FIG. 1, or the processor 202 of FIG. 2.

[0085] Although illustrated with discrete blocks, the steps and operations associated with one or more of the blocks of the sequence diagram 400 may be divided into additional blocks, combined into fewer blocks, or eliminated, depending on the particular implementation.

[0086] At 402, the processor 202 may be configured to acquire the input query 120. In an exemplary embodiment, the user may provide the input query 120 in form of text such as, “The driver who finished in position 4 in the 2004 United States Grand Prix was of which nationality?”.

[0087] At 404, the the tabular data 118-1 may be acquired. As illustrated, the tabular data 118-1 includes records related to the given input query 120. In this instance, for the sake of brevity, the tabular data 118-1 is shown to include a table having two rows and six columns, however, it should be appreciated the tabular data 118-1 may include any number of rows and columns, which is well within the scope of the present disclosure.

[0088] At 406, the set of documents 118-2 may be acquired. As illustrated, the set of documents 118-2 includes two documents, i.e., Document 1 and Document 2, which may contain some pieces of information about the input query 120. Though in this instance, the set of documents 118-2 is shown to include only two documents, however, it should be appreciated the set of documents 118-2 may include any number of documents, which is well within the scope of the present disclosure.

[0089] At 408, entity and entity-type extraction from the input query 120 may be performed. As illustrated in FIG. 4A, the processor 202 may process the input query120 to extract entities from the input query 120, which may include “position 4, 2004, United States, Grand Prix”, and further the extracted entity-type associated with these entities include “driver and nationality”. The extracted entities maybe collated into a first set of entities and the extracted entity-type may be collated into a set of entity types.

[0090] At 410, entity extraction from the set of documents 118-2 may be performed. In an embodiment, the processor 202 may be configured to process each document of the set of documents 118-2 (here, Document 1 and Document 2) to extract entities specified in the set of documents 118-2. The extracted entities may be collated to obtain a second set of entities. In an embodiment, each document of the set of documents 118-2 may include at least a subset of the second set of entities. As illustrated in FIG. 4A, the extracted entities from the Document 1 and Document 2 may include “Jenson Button, British, 2009 Formula One World Championship” and other such entities.

[0091] At 412, the first entity information and table headers may be mapped. In an embodiment, the processor 202 may be configured to execute a first mapping between the first entity information and header information associated with the table headers in the tabular data 118-1. In an example embodiment, the first mapping may include prompting the neural language model 104 with the header information and the first entity information as an input. The neural language model 104 may further form a set of entity-header pairs from the input, where each entity-header pair of the set of entity-header pairs may include an entity and a header that is semantically similar to the entity. As illustrated in FIG. 4A, result obtained throughthe first mapping may include ““Pos”: Position 4, “Table-Name”: 2004, United States, Grand Prix, and “Driver”: Nil. Further, the processor 202 may proceed to point C.

[0092] At 414, relevant columns of the table may be retrieved. In an embodiment, the processor 202 may be configured to parse content of the table to retrieve a subset of columns. The processor 202 may retrieve the subset of columns from the tabular data 118-1 based on headers in the set of entity-header pairs. As illustrated at 414-1 in FIG. 4B, the retrieved subset of columns may include ““Pos”: Position 4, and “Driver”: Jenson”. Though in the above embodiments, the present disclosure elaborates on the retrieving of the relevant columns. However, the processor 202 may be configured to retrieve relevant rows as well based on the first mapping (in case the table headers are represented in the rows of the table), which is well within the scope of the present disclosure.

[0093] At 416, entities and documents may be linked. In an embodiment, the processor 202 may be configured to link the entities included in the second entity information with document nodes representing the set of documents 118-2 to obtain the entity-document graph 416-1. As illustrated in FIG. 4B, the set of document nodes associated with the Document 1 and the Document 2 may include “Docl” and “Doc2”. Further, the second set of entities may be represented as a set of entity nodes in the entity-document graph 416-1. The set of entity nodes may include ““Jenson Benton”, “1980”, “Juan Pablo”, and “1987””. Further, edges may be added between the set of document nodes and the set of entity nodes based on a source association between the set of documents 118-2 and the second set of entities. As shown, the edges are added between “Docl” and “Doc2” and “Jenson Benton”, “1980”, “Juan Pablo”, and “1987” to generate the entity-document graph 416-1.

[0094] At 418, the query-specific knowledge graph 418-1 may be obtained. In an embodiment, the the processor 202 may be configured to obtain the query-specific knowledge graph 418-1 by combining the entity-document graph 416-1 with the subset of columns (retrieved at the 414). The combining may include selection of an entity node from the set of entity nodes. As illustrated in FIG. 4B, an entity node “Jenson Benton” or “Juan Pablo” may be selected from the set of entity nodes including ““Jenson Benton”, “1980”, “Juan Pablo”, and “1987””. Next, for the selected entity node, an entry from the subset of columns may be identified, such that the identified entry is semantically similar to the selected entity node. As illustrated in FIG. 4B, entry “Jenson” from the subset of columns may be identified to be semantically similar to the selected entity node “Jenson Benton”. Further, a set of entries may be extracted from the subset of columns, such that the extracted set of entries is associated with the identified entry. As illustrated in FIG. 4B, the set of entries such as {“Pos”, “4”, “Driver”} associated with the identified entry “Jenson” may be extracted from the subset of columns. In another instance, entries such “Juan Pablo” and “Rubens” associated with {“Driver} and entries such as “5” associated with “Juan Pablo” and “Pos” may be extracted. Further, the entity-document graph 416-1 may be updated to obtain the query-specific knowledge graph 418-1 by including a set of entry nodes representing the extracted set of entries and linking the set of entry nodes to the selected entity node. As illustrated in FIG. 4B, the set of entries such as “Pos”, “4”, “Driver” may be represented as the set of entry nodes. Further, these entry nodes may be linked with a corresponding entity node “Jenson Benton.”

[0095] In an embodiment, the updating of the entity-document graph 416-1 to obtain the query-specific knowledge graph 418-1 may also involve including a set of header nodes representing the set of headers and linking the set of header nodes to at least one node of the set of entry nodes or the entity node. For instance, the set of header nodes representing the set of headers {“Pos,” “Driver”} may be linked to at least one node of the set of entry nodes or the entity node. As shown, the “Pos” header node may be linked to entry node (“5”] along with entry node (“4”] of the set of entry nodes, and the “Driver” header node may be linked to “Juan Pablo” and “Rubens” entity nodes along with the “Jenson Benton” entity node of the set of entity nodes.

[0096] At 420, the query-specific knowledge graph 418-1 may be traversed. In an embodiment, the the processor 202 may be configured to traverse the query-specific knowledge graph 418-1 based on the entity and entity-type extraction (in FIG. 4A] to extract one or more paths associated with the input query 120. As shown, for example, a path 420-1 may be extracted from the query-specific knowledge graph 418-1 based on traversal. In an embodiment, the processor 202 may use a n-hop Breadth-First Search (BFS) traversal to traverse the query-specific knowledge graph 418-1.

[0097] At 422, a response 422-1 to the input query may be generated. In an embodiment, the processor 202 may be configured to construct a prompt to include the extracted path 420-1 and the input query 402. The prompt may be provided as an input to the neural language model 104 to generate the response 422-1. As illustrated in FIG. 40, the response 422-1 may be generated as “British” for the input query 402 (i.e., “The driver who finished in position 4 in the 2004 United States Grand Prix was of which nationality?”].

[0098] Although, in FIG. 4A, FIG. 4B, and FIG. 4C, the sequence diagram 400 is illustrated as discrete operations, such as 402, 404, 406, 408, 410, 412, 414, 416, 418, 420, and 422. However, in certain embodiments, such discrete operations may be further divided into additional operations, combined into fewer operations, or eliminated, depending on the particular implementation without detracting from the essence of the disclosed embodiments.

[0099] FIG. 5 is a diagram that illustrates a flowchart of an example method for graph-driven retrieval for table-text query answering, in accordance with an embodiment of the disclosure. FIG. 5 is described in conjunction with elements from FIG. 1, FIG. 2, FIG. 3, FIG. 4A, FIG. 4B, and FIG. 4C. With reference to FIG. 5, there is shown a flowchart 500. The method illustrated in the flowchart 500 may start at 502 and may proceed to 504. The method may be performed by any suitable system, apparatus, or device, such as, by the example system 102 of FIG. 1, or the processor 202 of FIG. 2. Although illustrated with discrete blocks, the steps and operations associated with one or more of the blocks of the flowchart 500 may be divided into additional blocks, combined into fewer blocks, or eliminated, depending on the particular implementation.

[0100] At 504, input query may be acquired. In an embodiment, the processor 202 may be configured to acquire the input query 120. In an exemplary embodiment, the user 116 may provide the input query 120 through a user interface of the user device 114. The system 102 may communicate with the user device 114 to receive the input query 120 from the user device 114. The input query 120 may be in text in a first language.

[0101] At 506, context information may be acquired. In an embodiment, the processor 202 may acquire the context information 118 associated with the input query 120. The context information 118 may include the tabular data 118-1 and the set of documents 118-2. The tabular data 118-1 may pertain to structured data that may be organized in a table format, consisting of multiple rows and multiple columns. In an exemplary embodiment, each row of the multiple rows may represent a record and each column multiple columns may represent a feature or attribute of the respective record, and vice versa. Examples of the tabular data 118-1 may include spreadsheets, databases, and CSV files. On the other hand, the set of documents 118- 2 may include multiple documents containing structured data or unstructured data. Each document in the set of documents 118-2 may include at least one of textual content, image content, or a combination of the textual content and the image content. Further, each document in the set of documents 118-2 may include at least one of the structured data or the unstructured data or a combination of the structured data and the unstructured data.

[0102] At 508, first entity information from the input query may be extracted. The processor 202 may extract first entity information from the input query 120. The first entity information may include a first set of entities included in the input query 120 and a set of entity types corresponding to the first set of entities. The process of extraction of the first entity information from the input query 120 may involve identifying and isolating specific pieces of data associated with the input query 120, where each piece of the isolated pieces may represent distinct entities of the first set of entities and related information such as entity-type of the set of entity types for all the entities present within the text associated with the input query 120.

[0103] At 510, a subset of columns, from the tabular data, may be retrieved. In an embodiment, the processor 202 may retrieve a subset of columns from the tabular data 118-1 based on a first mapping between the first entity information and header information in the tabular data 118-1. The first mapping may include prompting the neural language model 104 with the header information and the first entity information as an input. The neural language model 104 may further form a set of entity-header pairs from the input, where each entity-header pair of the set of entityheader pairs may include an entity and a header that is semantically similar to the entity. In an exemplary embodiment, the subset of columns may be retrieved from the tabular data 118-1 by filtering the tabular data 118-1 using a set of headers included in the set of entity-header pairs.

[0104] At 512, a second entity information, from the set of documents, may be extracted. In an embodiment, the processor 202 may extract the second entity information from the set of documents 118-2. The second entity information may include a second set of entities. Each document of the set of documents 118-2 may include at least a subset of the second set of entities.

[0105] At 514, entity-document graph may be generated. In an embodiment, the processor 202 may generate the entity-document graph 416-1 based on a second mapping between the second entity information and the set of documents 118-2. The second mapping for the generation of the entity-document graph 416-1 may include initialization of the entity-document graph 416-1 by including a set of document nodes corresponding to the set of documents 118-2. Further, the second set of entities may be represented as a set of entity nodes in the entity-document graph 416-1. Further, links may be added between the set of document nodes and the set of entitynodes based on a source association between the set of documents 118-2 and the second set of entities.

[0106] At 516, query-specific knowledge graph may be generated. In an embodiment, the processor 202 may obtain the query-specific knowledge graph 418- 1 by combining the entity-document graph 416-1 with the subset of columns. The combining may include selection of an entity node from the set of entity nodes. Further, for the selected entity node, the system 102 may identify an entry from the subset of columns, such that the identified entry may be semantically similar to the selected entity node. Further, the system 102 may extract a set of entries from the subset of columns, such that the extracted set of entries associated with the identified entry. Further, the system 102 may update the entity-document graph 416-1 to obtain the query-specific knowledge graph 418-1 by including a set of entry nodes representing the extracted set of entries and linking the set of entry nodes to the selected entity node. The updating of the entity-document graph 416-1 to obtain the query-specific knowledge graph 418-1 may also involve including a set of header nodes representing the set of headers and linking the set of header nodes to at least one node of the set of entry nodes or the entity node.

[0107] At 518, one or more paths associated with the input query 120 may be extracted. In an embodiment, the processor 202 may traverse the query-specific knowledge graph 418-1 to extract the one or more paths from the query-specific knowledge graph 418-1, where the one or more paths may be associated with the input query 120. In an exemplary embodiment, the system 102 may use a n-hop Breadth-First Search (BFS) traversal to traverse the query-specific knowledge graph418-1.

[0108] At 520, a prompt may be constructed. In an embodiment, the processor 202 may construct the prompt, which may include the input query 120 and the one or more paths. The construction of prompt may result in creating a clear, concise, and specific input or question designed to elicit a desired response from the system 102. The process of construction may include defining context, specifying required information, and prompt structuring in a way that may guide the system 102 to generate relevant and accurate response to the input query 120.

[0109] At 522, a response may be generated. In an embodiment, the processor 202 may generate a response to the input query 120 based on application of the neural language model 104 on the prompt.

[0110] Although the flowchart 500 is illustrated as discrete operations, such as 502, 504, 506, 508, 510. 512, 514, 516, 518, 520, and 522. However, in certain embodiments, such discrete operations may be further divided into additional operations, combined into fewer operations, or eliminated, depending on the particular implementation without detracting from the essence of the disclosed embodiments.

[0111] Various embodiments of the disclosure may provide one or more non- transitory computer-readable storage media configured to store instructions that, in response to being executed, cause a system (such as, the example system 102) to perform operations. The operations may include acquiring an input query (such as, the input query 120 of FIG. 1). The operations may further include acquiring context information (such as, the context information 118 of FIG. 1) associated with the input query 120, the context information comprises tabular data (such as, the tabular data 118-1 of FIG. 1) and a set of documents (such as, the set of documents 118-2 of FIG.1). The operations may further include extracting first entity information from the input query 120. The operations may further include retrieving a subset of columns from the tabular data 118-1 based on a first mapping between the first entity information and header information in the tabular data 118-1. The operations may further include extracting second entity information from the set of documents 118- 2. The operations may further include generating an entity-document graph (such as, the entity-document graph 416-1 of FIG. 4B) based on a second mapping between the second entity information and the set of documents 118-2. The operations may further include obtaining a query-specific knowledge graph (such as, the queryspecific knowledge graph 418-1 of FIG. 4B) by combining the entity-document graph 416-1 with the subset of columns. The operations may further include traversing the query-specific knowledge graph 418-1 to extract, from the query-specific knowledge graph 418-1, one or more paths associated with the input query 120. The operations may further include constructing a prompt comprising the input query 120 and the one or more paths. The operations may further include generating a response to the input query 120 based on application of a neural language model on the prompt.

[0112] As used in the present disclosure, the terms “module” or “component” may refer to specific hardware implementations configured to perform the actions of the module or component and / or software objects or software routines that may be stored on and / or executed by general purpose hardware (e.g., computer-readable media, processing devices, etc.) of the system 102. In some embodiments, the different components, modules, engines, and services described in the present disclosure may be implemented as objects or processes that execute on the system 102 (e.g., as separate threads). While some of the system and methods described inthe present disclosure are generally described as being implemented in software (stored on and / or executed by general purpose hardware), specific hardware implementations or a combination of software and specific hardware implementations are also possible and contemplated. In this description, a “computing entity” may be any system 102 as previously defined in the present disclosure, or any module or combination of modulates running on the system 102.

[0113] Terms used in the present disclosure and especially in the appended claims (e.g., bodies of the appended claims) are generally intended as “open” terms (e.g., the term “including” should be interpreted as “including, but not limited to,” the term “having” should be interpreted as “having at least,” the term “includes” should be interpreted as “includes, but is not limited to,” etc.).

[0114] Additionally, if a specific number of an introduced claim recitation is intended, such an intent will be explicitly recited in the claim, and in the absence of such recitation no such intent is present. For example, as an aid to understanding, the following appended claims may contain usage of the introductory phrases "at least one" and "one or more" to introduce claim recitations. However, the use of such phrases should not be construed to imply that the introduction of a claim recitation by the indefinite articles "a" or "an" limits any particular claim containing such introduced claim recitation to embodiments containing only one such recitation, even when the same claim includes the introductory phrases "one or more" or "at least one" and indefinite articles such as "a" or "an" (e.g., “a” and / or “an” should be interpreted to mean “at least one” or “one or more”); the same holds true for the use of definite articles used to introduce claim recitations.

[0115] In addition, even if a specific number of an introduced claim recitation is explicitly recited, those skilled in the art will recognize that such recitation should be interpreted to mean at least the recited number (e.g., the bare recitation of "two recitations," without other modifiers, means at least two recitations, or two or more recitations). Furthermore, in those instances where a convention analogous to “at least one of A, B, and C, etc.” or “one or more of A, B, and C, etc.” is used, in general such a construction is intended to include A alone, B alone, C alone, A and B together, A and C together, B and C together, or A, B, and C together, etc.

[0116] Further, any disjunctive word or phrase presenting two or more alternative terms, whether in the description, claims, or drawings, should be understood to contemplate the possibilities of including one of the terms, either of the terms, or both terms. For example, the phrase “A or B” should be understood to include the possibilities of “A” or “B” or “A and B.”

[0117] All examples and conditional language recited in the present disclosure are intended for pedagogical objects to aid the reader in understanding the present disclosure and the concepts contributed by the inventor to furthering the art and are to be construed as being without limitation to such specifically recited examples and conditions. Although embodiments of the present disclosure have been described in detail, various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the present disclosure.

Claims

We claim:

1. A method, executable by a processor, comprising: acquiring an input query; acquiring context information associated with the input query, the context information comprising tabular data and a set of documents; extracting first entity information from the input query; retrieving a subset of columns from the tabular data based on a first mapping between the first entity information and header information in the tabular data; extracting second entity information from the set of documents; generating an entity-document graph based on a second mapping between the second entity information and the set of documents; obtaining a query-specific knowledge graph by combining the entitydocument graph with the subset of columns; traversing the query-specific knowledge graph to extract, from the queryspecific knowledge graph, one or more paths associated with the input query; constructing a prompt comprising the input query and the one or more paths; and generating a response to the input query based on application of a neural language model on the prompt.

2. The method according to claim 1, further comprising: receiving a first query from a user interface of a user device; anddividing the first query into a set of sub queries based on application of the neural language model on the first query, wherein the input query is a sub query acquired from the set of sub queries.

3. The method according to claim 1, further comprising: receiving a second query from a user interface of a user device; and rephrasing the second query into the input query by applying the neural language model on the second query with the header information in the tabular data as an additional context input to the neural language model.

4. The method according to claim 1, wherein the tabular data comprises a single table or a plurality of linked tables.

5. The method according to claim 1, further comprising: querying a vector database comprising a plurality of documents and a plurality of vector embeddings corresponding to the plurality of documents; generating a query vector embedding by applying an embedding model on the input query; and acquiring the set of documents from the plurality of documents by performing a vector search using the query vector embedding on the vector database.

6. The method according to claim 1, wherein each document in the set of documents includes at least one of textual content and image content, or a combination of the textual content and the image content.

7. The method according to claim 1, wherein the first entity information comprises a first set of entities included in the input query and a set of entity types corresponding to the first set of entities.

8. The method according to claim 1, wherein the first mapping comprises prompting the neural language model with the header information and the first entity information as an input to form a set of entity-header pairs from the input, wherein each entity-header pair of the set of entity-header pairs comprises an entity and a header that is semantically similar to the entity.

9. The method according to claim 8, wherein the subset of columns is retrieved from the tabular data by filtering the tabular data using a set of headers included in the set of entity-header pairs.

10. The method according to claim 1, wherein the second entity information comprises a second set of entities, and each document of the set of documents includes at least a subset of the second set of entities.

11. The method according to claim 10, wherein the generation of the entity-document graph comprises:initializing the entity-document graph by including a set of document nodes corresponding to the set of documents; representing the second set of entities as a set of entity nodes in the entity-document graph; and adding links between the set of document nodes and the set of entity nodes based on a source association between the set of documents and the second set of entities.

12. The method according to claim 11, wherein the combining further comprises: selecting an entity node from the set of entity nodes; identifying, for the selected entity node, an entry from the subset of columns that is semantically similar to the selected entity node; extracting, from the subset of columns, a set of entries associated with the identified entry; and updating the entity-document graph to obtain the query-specific knowledge graph by: including a set of entry nodes representing the extracted set of entries; and linking the set of entry nodes to the selected entity node.

13. The method according to claim 12, wherein the combining further comprises: extracting a set of headers from the subset of columns; and updating the entity-document graph to obtain the query-specific knowledge graph by:including a set of header nodes representing the set of headers; and linking the set of header nodes to at least one node of the set of entry nodes or the entity node.

14. The method according to claim 1, wherein the query-specific knowledge graph is traversed by using a n-hop Breadth-First Search (BFS) traversal.

15. The method according to claim 1, further comprising generating the response to the input query based on application of the neural language model on the queryspecific knowledge graph.

16. One or more non-transitory computer-readable storage media configured to store instructions that, in response to being executed, cause a system to perform operations, the operations comprising: acquiring an input query; acquiring context information associated with the input query, the context information comprising tabular data and a set of documents; extracting first entity information from the input query; retrieving a subset of columns from the tabular data based on a first mapping between the first entity information and header information in the tabular data; extracting second entity information from the set of documents;generating an entity-document graph based on a second mapping between the second entity information and the set of documents; obtaining a query-specific knowledge graph by combining the entitydocument graph with the subset of columns; traversing the query-specific knowledge graph to extract, from the queryspecific knowledge graph, one or more paths associated with the input query; constructing a prompt comprising the input query and the one or more paths; and generating a response to the input query based on application of a neural language model on the prompt.

17. The one or more non-transitory computer-readable storage media according to claim 16, wherein the operations further comprise: receiving a first query from a user interface of a user device; and dividing the first query into a set of sub queries based on application of the neural language model on the first query, wherein the input query is a sub query included in the set of sub queries.

18. The one or more non-transitory computer-readable storage media according to claim 16, wherein the operations further comprise: receiving a second query from a user interface of a user device; andrephrasing the second query into the input query by applying the neural language model on the second query with the header information in the tabular data as an additional context input to the neural language model.

19. The one or more non-transitory computer-readable storage media according to claim 16, wherein the operations further comprise: querying a vector database comprising a plurality of documents and a plurality of vector embeddings corresponding to the plurality of documents; generating a query vector embedding by applying an embedding model on the input query; and acquiring the set of documents from the plurality of documents by performing a vector search using the query vector embedding on the vector database.

20. A system, comprising: a memory configured to store instructions; and a processor, coupled to the memory, configured to execute the instructions to perform a process comprising: acquiring an input query; acquiring context information associated with the input query the context information comprising tabular data and a set of documents; extracting first entity information from the input query;retrieving a subset of columns from the tabular data based on a first mapping between the first entity information and header information in the tabular data; extracting second entity information from the set of documents; generating an entity-document graph based on a second mapping between the second entity information and the set of documents; obtaining a query-specific knowledge graph by combining the entitydocument graph with the subset of columns; traversing the query-specific knowledge graph to extract, from the query-specific knowledge graph, one or more paths associated with the input query; constructing a prompt comprising the input query and the one or more paths; and generating a response to the input query based on application of a neural language model on the prompt.