SYSTEM AND METHOD FOR REGULAR UPDATES TO COMPUTER-FORM FILES
Presented herein are systems and methods for generating computer-form files using a generative artificial intelligence (AI) model architecture and remote deposit capture (RDC). A method may include obtaining, by a computer at a preconfigured time interval, raw data containing a plurality of data records associated with a customer from a plurality of databases, and determining a data category indicated by a set of the data records, the data category corresponding to a computer-form file. The computer may generate, by executing a generative AI model, one or more computer-form inputs using the set of data records and external reference data retrieved from a knowledge database, and generate the computer-form file using the computer-form inputs. The plurality of data records may include a deposit record received from a user device, and the generative AI model may detect and correct errors in the deposit record.
Latest Citigroup Patents:
This application is a continuation-in-part of U.S. Patent Application Serial No. 19/468,831, filed Feb. 3, 2026, which is a continuation of U.S. Patent Application Serial No. 18/951,513, filed Nov. 18, 2024, now U.S. Patent No. 12,547,590, which is a continuation of U.S. Patent Application Serial No. 18/238,992, filed Aug. 28, 2023, now U.S. Patent No. 12,147,387, which is a continuation of U.S. Patent Application Serial No. 18/099,824, filed Jan. 20, 2023, now U.S. Patent No. 11,768,806, each of which is incorporated by reference herein in its entirety.
TECHNICAL FIELDThis application generally relates to managing databases for transactional data and automated generation of computer-generated form files from database records.
BACKGROUNDTax accounting and bookkeeping is an arduous manual process which has, in recent years, been automated with the help of tax accounting software. For instance, software programs can populate forms using information provided by a user. However, there are problems with conventional tax accounting software and systems. Conventional tax accounting software requires significant user input and suffers from large computing loads when taxes are calculated.
Computer-generated form files that incorporate various types of data from a variety of data sources are often prone to errors due to the difficulty in handling large amounts of data from the different sources. Generating computer-form files using a large amount of data represents a large processing burden, leading to delays in spotting and fixing errors.
SUMMARYA problem for servicing global banking clients is that the tax reporting obligations across different countries vary, and each of those reports can vary widely in the types of information they require. If the customer circumstances change, such as moving jurisdictions (e.g., US to Switzerland in the middle of the year), the customer’s obligatory reporting requirements for that specific tax year vary, as do the rules and information needed for the report. Conventional technical solutions cannot efficiently and accurately address these complications.
What is needed is a computing system that improves upon conventional software programs and computing systems, including systems and methods that solve technical problems of high processing burdens associated with periodic generation of computer-form files, as well as the technical problems of requiring extensive user input.
Embodiments discussed herein include a system that iteratively checks the client's data daily to prepare for completion of the requisite reporting data output and confirm whether there is a need to prepare different tax reporting output(s) for the client. The system may regularly (e.g., daily) collect, extract, and consolidate necessary reporting data and prepare necessary data (e.g., automated reconciliation bank income payments, withholding taxes, custodian income payments against tax jurisdictions or regime specific governments). The system may proactively and daily manage data quality exceptions, such as errors in the reporting data. The system may develop a hierarchy of data categories based on customizable software configurations for quickly identifying and preparing the data required for dynamically identified forms (e.g., FATCA, CRS, US 1099, US 1098, US 1042-S, US 1042, FBAR, UK BBSI/OI, CA T511) according to an identified jurisdiction(s). At a preconfigured tax preparation time, the system prepares tax reportable data output using an aggregation of the processed client data from each of the previous days throughout the entire relevant timeframe, such as a user-selected timeframe or a given tax-year, thereby saving time and reducing a likelihood of errors.
Embodiments disclosed herein may include a planning stage and a verification stage as first-class system components in the data categorization and form generation pipeline. The planning stage may include query planning operations in which the system analyzes an incoming query or data processing request, identifies the sub-components or sub-queries required to satisfy the request, and determines a processing strategy before executing the main retrieval or generation operations. The verification stage may include retrieval verification operations in which the system validates the relevance, accuracy, and completeness of retrieved data or generated outputs before finalizing them for downstream use. Empirical observations indicate that certain techniques yield larger quality improvements than others when implemented in the pipeline. Specifically, contextual enrichment and query decomposition techniques tend to yield larger quality improvements than reranking or prompt engineering techniques when used for data categorization and computer form-file and/or form data field generation operations. Accordingly, embodiments may prioritize implementation of contextual enrichment and query decomposition operations in the pipeline architecture.
Embodiments may include a computer-implemented method for generating computer-form files using a generative artificial intelligence (AI) model architecture. The method can be performed, for example, by one or more processors coupled to non-transitory memory. At a preconfigured time interval, raw data containing a plurality of data records associated with a customer can be obtained from a plurality of databases. A data category indicated by a set of one or more data records can be determined, the data category mapped to a computer-form file and at least one type of data field of the set of one or more data records. For the computer-form file corresponding to the data category, one or more computer-form inputs for the computer-form file can be generated by executing a generative AI model using the set of one or more data records indicating the data category. The computer-form file corresponding to the data category can be generated by executing the generative AI model using the one or more computer-form inputs generated for the computer-form file.
In some implementations, generating the computer-form file includes populating one or more fields of the computer-form file using a text or value of a computer-file input generated by the generative AI model based on the set of one or more data records indicating the data category. In some implementations, the generative AI model can be executed to generate an updated computer-file form in response to receiving one or more updated data records for the plurality of data records associated with the customer. In some implementations, the generative AI model includes a large-language model (LLM) for generating the one or more computer-form inputs and the computer-form file, and a retrieval-augmented generation model (RAG) for retrieving external reference data from a knowledge database according to the data category for the LLM to generate the one or more computer-form inputs. In some implementations, retrieving the external reference data includes executing the RAG of the generative AI model to retrieve a reporting requirement corresponding to the data category. In some implementations, generating the one or more computer-form inputs for the computer-form file includes executing the generative AI model to generate the one or more computer-form inputs based on a semantic comparison between the set of one or more data records and the external reference data retrieved by the RAG. In some implementations, the RAG retrieves the external reference data based on the data category indicated by the set of one or more data records and at least one jurisdiction associated with the customer. In some implementations, the RAG retrieves updated external reference data in response to a new jurisdictional reporting requirement in the knowledge database, and the generative AI model generates an updated computer-file form according to the updated external reference data. In some implementations, the plurality of data records includes a deposit record received from a user device, and the deposit record includes at least one of an image of an input document, textual data extracted from the input document, or metadata associated with the input document. In some implementations, an error in the deposit record can be detected, the error comprising at least one of an image quality error, a missing or incorrect field extracted from the deposited instrument, a misclassification of a type of the deposited instrument, or a discrepancy between extracted data and an expected data format. In some implementations, a correction for the error can be generated by executing the generative AI model based upon the deposit record and one or more correction rules. In some implementations, the deposit record can be updated according to the correction, in response to determining that a confidence score associated with the correction satisfies a threshold.
Embodiments may include a system for generating computer-form files using a generative artificial intelligence (AI) model architecture. The system can include a processor and a non-transitory, computer-readable medium comprising instructions. At a preconfigured time interval, the system can obtain raw data containing a plurality of data records associated with a customer from a plurality of databases. The system can determine a data category indicated by a set of one or more data records, the data category mapped to a computer-form file and at least one type of data field of the set of one or more data records. For the computer-form file corresponding to the data category, the system can generate, by executing a generative AI model, one or more computer-form inputs for the computer-form file using the set of one or more data records indicating the data category. The system can generate, by executing the generative AI model, the computer-form file corresponding to the data category using the one or more computer-form inputs generated for the computer-form file.
In some implementations, the system can execute the generative AI model to populate one or more fields of the computer-form file using a text or value of a computer-form input generated by the generative AI model based on the set of one or more data records indicating the data category. In some implementations, the system can execute the generative AI model to generate an updated computer-form file in response to receiving one or more updated data records for the plurality of data records associated with the customer. In some implementations, the generative AI model includes a large-language model (LLM) for generating the one or more computer-form inputs and the computer-form file, and a retrieval-augmented generation model (RAG) for retrieving external reference data from a knowledge database according to the data category for the LLM to generate the one or more computer-form inputs. In some implementations, the system can retrieve the external reference data by executing the RAG of the generative AI model to retrieve a reporting requirement corresponding to the data category. In some implementations, the system can generate the one or more computer-form inputs for the computer-form file by executing the generative AI model to generate the one or more computer-form inputs based on a semantic comparison between the set of one or more data records and the external reference data retrieved by the RAG. In some implementations, the system can retrieve, via the RAG, the external reference data based on the data category indicated by the set of one or more data records and at least one jurisdiction associated with the customer. In some implementations, the system can retrieve, using the RAG, updated external reference data in response to a new jurisdictional reporting requirement in the knowledge database, and generate, using the generative AI model, an updated computer-form file according to the updated external reference data. In some implementations, the plurality of data records includes a deposit record received from a user device, and the deposit record includes at least one of an image of an input document, textual data extracted from the input document, or metadata associated with the input document. In some implementations, the system can detect an error in the deposit record, the error comprising at least one of an image quality error, a missing or incorrect field extracted from the deposited instrument, a misclassification of a type of the deposited instrument, or a discrepancy between extracted data and an expected data format. In some implementations, the system can generate, using the generative AI model, a correction for the error based upon the deposit record and one or more correction rules. In some implementations, the system can update, using the generative AI model, the deposit record according to the correction, in response to determining that a confidence score associated with the correction satisfies a threshold.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are intended to provide further explanation of the embodiments described herein.
The accompanying drawings constitute a part of this specification, illustrate an embodiment, and together with the specification, explain the subject matter of the disclosure.
Reference will now be made to the embodiments illustrated in the drawings, and specific language will be used here to describe the same. It will nevertheless be understood that no limitation of the scope of the disclosure is thereby intended. Alterations and further modifications of the features illustrated here, and additional applications of the principles as illustrated here, which would occur to a person skilled in the relevant art and having possession of this disclosure, are to be considered within the scope of the disclosure.
Current technological solutions do not include a centralized automated system, tool, or platform that performs various automated processes. Embodiments described herein include systems and methods that perform these automated processes. The system may collect various types of data based on customer reporting requirements from any number of data sources, and extract and consolidate the requisite types of data to satisfy the customer reporting requirements. The system may prepare the necessary types of data (e.g., bank income payment data, withholding taxes data, custodian income payments) based on reporting requirements (e.g., jurisdictional tax data reporting requirements). Preparing the necessary data includes performing automated daily evaluation of customer data records and reporting requirements, and, if necessary, performing reconciliation of the types of data and forms against updated reporting requirements. The system may proactively manage data quality and data quality exceptions, which may include proactively reconciling or modifying data inputs and formats according to exception management configurations, which may be entered into the system from client devices via a user interface. In operation, the system may ensure correctness and accuracy of the data to be reported and included in the computer-generated forms.
The system may run the reconciliation, updating, or modification processes on a daily basis to improve efficiency in network environment resources and end-users by imposing data quality standards on a daily basis. Additionally or alternatively, the system may generate outputs containing the various types of reporting data, which may include completing or otherwise generating the computer-generated form files containing the requisite output data. For instance, the system may determine based on certain location data in the customer’s data records that indicate which jurisdiction reporting requirements pertain to the customer data. The system may determine certain form files (e.g., ATCA, CRS, US 1099, 1098, 1042-S (FDAP and BDI), 1042, FBAR, UK BBSI/OI (Section 17/18), Canadian T511) must be prepared on behalf of the customer. The system may generate the selected computer-generated form files using the requisite types of reporting data.
Embodiments disclosed herein generally include systems and methods for regularly (e.g., hourly, daily, weekly) evaluating and updating computer-form files using data from various data sources. Regularly evaluating and updating computer-form files solves the technical problem of high processing burdens associated with conventionally longer periods between processes for generating computer-form files. For example, generating computer-form files once a year, where the generation of the computer-form files involves processing a substantially larger number of data records (e.g., thousands of data records for a year compared to a dozen or so for a day) represents a significant processing burden. Such processing burdens prevent efficient data analysis and identification of errors in the data records. Furthermore, mass processing of data records introduces errors into the processing of the data records, resulting in errors in the computer-form files. Regularly updating computer-form files represents a technical solution to the problem of high processing burdens due to periodic generation of the computer-form files.
Furthermore, automatic categorization of the data records solves the technical problem of assigning the data records to the computer-form files for generating the computer-form files. The data records may include data records of various types having various parameters. Categorizing the data records based on various different types of data records and/or parameters of data records may prevent errors in assigning data records to computer-form files, reducing the processing burden associated with generating the computer-form files. Conventional systems require significant user input for determining how data records should be assigned to various computer-form files. Automatic categorization of the data records for regularly updating computer-form files represents an improvement in the field of generating computer-form files.
Furthermore, automatic categorization of the data records may be used to detect new customer data requirements. New customer data requirements may be caused by one or more events, which may be automatically detected based on the automatic categorization of the data records. The new customer data requirements may require the addition, deletion, or modification of one or more computer-form files from a list of computer-form files to be generated. The addition, deletion, or modification of one or more computer-form files form the list of computer-form files to be generated may cause a cascade of alterations or modifications in the assignment of data records to the computer-form files. Regularly updating the computer-form files and the accompanying updating of the list of the computer-form files to be generated as informed by the automatically detected events may prevent errors caused by erroneous assignment of data records to computer-form files. In this manner, the processing burden and time required to generate the computer-form files may be decreased. This improves the function of a computer used to generate the computer-form files and represents an improvement to the field of generating computer-form files.
Embodiments may implement computer-executed operations for generating computer-form files using generative artificial intelligence (AI) model architectures that can process data records from multiple databases and produce structured reporting outputs. Computing systems can receive data records from a plurality of data sources, where the data records can include demographic data, transaction data, and other types of data associated with a customer. The computing systems can categorize data entries of the data records into data categories based on preconfigured mappings between data types and the data categories. The data categories can correspond to one or more computer-form files, such as tax forms or other regulatory reporting documents. Computing systems can generate the computer-form files at a preconfigured time using the categorized data entries accumulated over a series of regular time intervals. A generative AI model, such as a large language model (LLM) operating within a retrieval-augmented generation (RAG) architecture, can be used to generate computer-form inputs and computer-form files based on categorized data entries and external reference data retrieved from a knowledge database. The data records processed by the computing systems can originate from various sources, including databases associated with different jurisdictions, entities, or financial institutions, and can also include deposit records received from user devices, where the deposit records can include image data of input documents, textual data extracted from the input documents, or metadata associated with the input documents.
However, conventional approaches to generating computer-form files from data records present several technical challenges. Conventional systems often rely on static rule-based pipelines that require manual configuration of data categorization logic, field population logic, and jurisdiction-specific reporting rules. When data records originate from multiple jurisdictions or financial institutions, the data records can differ in format, field naming conventions, and data type representations, and conventional systems can require separate manual configurations for each combination of data source format and target computer-form file. Conventional systems also face challenges when processing deposit records derived from input documents captured at user devices, because the textual data extracted from the input documents can contain errors arising from image quality deficiencies, misclassifications of document types, missing or incorrectly extracted field values, or discrepancies between extracted data and expected data formats. Conventional error detection and correction approaches often rely on predefined rule sets that do not adapt to new error patterns, new document formats, or new regulatory requirements without manual reconfiguration. Furthermore, when regulatory reporting requirements change or when a customer acquires a new reporting obligation due to a change in jurisdiction, conventional systems can require manual identification of the new requirement and manual reconfiguration of the data categorization and form generation pipelines, which can introduce processing delays and errors.
The techniques described herein provide approaches for generating computer-form files using a generative AI model architecture that can categorize data entries, generate computer-form inputs, and generate computer-form files based on data records obtained from a plurality of databases. The generative AI model architecture can include an LLM for generating the computer-form inputs and the computer-form files, and a RAG component for retrieving external reference data from a knowledge database according to a data category indicated by a set of one or more data records. The LLM can receive the retrieved external reference data as context input and can generate the computer-form inputs grounded in the retrieved external reference data, such that the generated computer-form inputs reflect current regulatory requirements without requiring manual reconfiguration of the data categorization or form generation logic. The techniques described herein can also process deposit records received from user devices, detect errors in the deposit records, and generate corrections for the detected errors using the generative AI model.
To implement the techniques described herein, a computing system can obtain raw data containing a plurality of data records associated with a customer from a plurality of databases at a preconfigured time interval. The computing system can determine a data category indicated by a set of one or more data records, where the data category corresponds to a computer-form file. The RAG component of the generative AI model architecture can retrieve external reference data from the knowledge database based on the data category and at least one jurisdiction associated with the customer. In some implementations, the computing system may execute query decomposition operations prior to retrieval, in which a planning model parses or splits multi-part reporting queries into atomic sub-queries before any embedding extraction occurs, and each atomic sub-query is retrieved independently by the RAG. In some implementations, the computing system may execute query routing by type operations, in which a classifier model directs lookup queries, synthesis queries, and comparative queries to different retrieval strategies based on the query type. In some implementations, the computing system may execute iterative retrieval operations, in which the generative AI model emits a sufficiency signal indicating whether the retrieved context is adequate to answer the query, and the system triggers follow-up retrievals until coverage is adequate or a maximum iteration count is reached. The LLM can receive the categorized data entries and the retrieved external reference data and can generate one or more computer-form inputs for the computer-form file based on a semantic comparison between the data records and the retrieved external reference data. The LLM can then generate the computer-form file by populating one or more fields of the computer-form file using the generated computer-form inputs. When the plurality of data records includes a deposit record received from a user device, the computing system can extract textual data from image data of an input document included in the deposit record, categorize the extracted data entries using the preconfigured mapping, and detect errors in the deposit record by comparing the extracted data entries against data configurations, data-exception configurations, or field schemas associated with the computer-form files. The generative AI model can generate a proposed correction for a detected error based on the deposit record and one or more correction rules and can update the deposit record according to the proposed correction in response to determining that a confidence score associated with the proposed correction satisfies a threshold.
In doing so, the techniques described herein can generate computer-form files that reflect current regulatory requirements by grounding the generation of computer-form inputs in external reference data retrieved by the RAG component at inference time, rather than relying on static rule-based configurations that require manual reconfiguration when regulatory requirements change. The techniques described herein can reduce errors in computer-form files generated from deposit records received from user devices by using the generative AI model to detect and correct errors in the deposit records, including image quality errors, missing or incorrect field values, document type misclassifications, and discrepancies between extracted data and expected data formats. The techniques described herein can reduce the processing burden associated with generating computer-form files across multiple jurisdictions by using the LLM to generate computer-form inputs conditioned on jurisdiction-specific reference data retrieved by the RAG component, such that a single generative AI model architecture can generate computer-form files for multiple jurisdictions without requiring separate manual configurations for each jurisdiction. The techniques described herein provide a technical improvement over conventional approaches by adapting to new regulatory requirements, new document formats, and new error patterns through updates to the knowledge database accessed by the RAG component, rather than through manual reconfiguration of data categorization logic or form generation pipelines.
The data records may include demographic data, entity data, transaction data, and other kinds or types of data. Data types may be defined based on other data entries associated with a particular data entry and/or parameters of the particular data entry including a source of the particular data record, a custodian of the particular data record, and other parameters. Each data entry may be associated with one data type. Each data entry may be associated with multiple data types. In some implementations, a first data entry of a data record is associated with a first data type and a second data entry of a data record is associated with a second data type.
The server 140 includes any computing device comprising hardware and software components capable of performing the various processes described herein. Non-limiting examples of the server 140 include a server computer, workstation computer, tablet computer, and the like. The server 140 receives the various types of data from the databases 110 and/or computer-form files database 150, and performs various operations including categorizing the received data from the databases 110 using data mappings stored in the mapping database 130 or generated by the server 140; detecting a new customer data requirement based on the received data; updating the computer-form files from the computer-form files database 150; and, at a preconfigured time, generating the one or more computer-form files based on the categorized data.
The server 140 receives the data records at regular preconfigured intervals (e.g., daily, weekly) or continuously. Using the data records, the server 140 categorizes data entries of the data records at the preconfigured interval or continuously. The server 140 categorizes the data entries of the data records according to, for example, a data type, or types of data entries and/or data records.
The regular interval may be any short-term timeframe in which the server 140 can categorize the data entries of the data records received during the timeframe. For example, the regular interval may be daily if the server 140 can categorize the data entries of the data records for a given day so as to avoid CPU bottlenecking. In some cases, the regular interval may be adjusted dynamically based on the number of data records received and the processing resources of the server 140. In this way, the server 140 avoids delays caused by CPU bottlenecking due to attempting to process large amounts of data. Further, the server 140 may categorize the data entries of the data records without visible delay, allowing for detection and correction of errors.
The server 140 may categorize the data entries into data categories based on a preconfigured mapping between data types and the data categories. The server 140 may use the mapping from the mapping database 130 to determine one or more data categories for each data entry based on the data type or data types associated with each data entry. For example, the server 140 may categorize a transaction data entry as income-based data based on determining that the type of transaction data entry indicates a receipt of income funds. The server 140 may use the mapping for each data entry to determine the data category for each data entry. In some cases, the mapping specifies one or more data categories for each data type. In some cases, the mapping specifies a data category for each data entry based on multiple data types of the data entry. For example, the server 140 categorizes a transaction as a transfer based on a first type of the transaction being a receipt of funds and a second type of the transaction being a transfer of funds. The data categories may correspond to or indicate computer-form files. For example, a data category of income may correspond to one or more tax forms for reporting income.
The server 140 may perform a filter extraction operation to extract structured constraints from a query prior to executing a vector similarity search, thereby constraining the search space to records satisfying the extracted structured constraints before any semantic similarity computation is performed. Filter extraction addresses limitations of dense bi-encoder embedding models, which encode queries and documents into fixed-length vector representations that capture semantic meaning but cannot reliably distinguish closely related discrete values, such as adjacent calendar years (e.g., 2024 versus 2025), adjacent fiscal quarters (e.g., Q3 versus Q4), or similar entity identifiers. By extracting structured constraints from the query and applying the extracted structured constraints as metadata predicates before vector similarity computation, the server 140 ensures that retrieved records satisfy exact-match criteria for the structured constraints regardless of the semantic similarity scores computed by the embedding model.
In some configurations, the filter extraction operations may include software routines for executing a filter extraction model, which may be a named entity recognition model, a regular expression parser, a rule-based extractor, or a lightweight language model, to identify and extract structured constraints from the query. The structured constraints extracted by the filter extraction model may include an entity identifier associated with the customer or a related party, a calendar year or fiscal year, a calendar quarter or fiscal quarter, a jurisdiction identifier such as a country code or state code, a document type identifier such as a form number or regulatory filing type, and/or a date range indicating or corresponding to a start date and an end date for timestamps or chronological data in the relevant records. The server 140 may normalize the extracted structured constraints to a canonical format before using the extracted structured constraints as metadata predicates. For example, the server 140 may normalize jurisdiction identifiers to standardized country codes, normalize date values to a standardized date format, and normalize entity identifiers to a canonical entity identifier format used in a database (e.g., knowledge repository database). The server 140 may use the normalized structured constraints as metadata predicates to filter the candidate document set before executing the vector similarity search, such that the vector similarity search is performed only against documents having metadata that satisfies each of the extracted structured constraints. In some implementations, the server 140 may reference the structured constraints as hard filters that exclude non-matching documents from the candidate dataset, or may reference the structured constraints as soft filters that demote non-matching documents in a comparative ranking and select a subset of a number of documents according to the comparative ranking values.
The server 140 may analyze the data records to detect new customer data requirements. In some implementations, the server 140 may detect the new customer data requirements by determining that a data category of a data entry of a data record indicates a computer-form file not included in a list of computer-form files. In some implementations, the server 140 may detect the new customer data requirements based on a change in data records received, a data record indicating a new customer data requirement, and/or a combination of data records. For example, the server may receive data records associated with a new address of a customer, where the new address is located in a jurisdiction requiring the new customer data requirement (e.g., new data types, new computer-form files). In another example, the server may receive data records associated with a new entity associated with a customer, where the new data requirement includes information associated with the new entity.
The server 140 updates the one or more computer-form files associated with each data category based on detecting the new customer data requirements. The server 140 may update the one or more computer-form files by retrieving additional computer-form files from the computer-form files database 150. The server 140 may update the one or more computer-form files by retrieving updated computer-form files from the computer-form files database 150. In some implementations, updating the one or more computer-form files includes updating the categories used for categorizing the data records.
The databases 110 may be located in various different jurisdictions and/or contain types of data relevant to particular jurisdictions. For example, database A 110a may be located in a first jurisdiction, database B 110b may be located in a second jurisdiction, and database C 110c may be located in a third jurisdiction. The data records from the databases 110 may be tagged with or include a parameter indicating from which jurisdiction and/or from which database the server 140 receives the data records. In some implementations, the data records and or the data entries of the data records may differ in format based on from which database and/or jurisdiction the server 140 receives the data records. The data records may include transaction data. The databases 110 may be associated with various different entities. The databases 110 may include transaction data for the various different entities. In some implementations, the database A 110a may include demographic information of a customer, including place of residence, citizenship, and other demographic information. In some implementations, each respective data record may include a first data entry representing demographic information and a second data entry representing transaction data. The demographic information may be received by the server 140. The demographic information may affect the categorization of the data records and/or the list of computer-form files updated by the server 140.
The server 140 may implement retrieval configurations and operations for enforcing access-control policies during retrieval operations that prevent unauthorized data from being provided to the generative AI model. In some implementations, the server 140 may associate access-control tags with each data record or document stored in the knowledge repository database, where each access-control tag indicates one or more authorized users, user roles, or access levels permitted to access the associated data record or document. When the server 140 receives a query from a requesting user or process, the server 140 may determine an access-control identifier associated with the requesting user or process, such as a user identifier, a role identifier, or an access level indicator. Prior to executing the vector similarity search, the server 140 may filter the candidate document set based on the access-control identifier by comparing the access-control identifier against the access-control tags associated with each candidate document and excluding candidate documents for which the access-control identifier does not satisfy the access-control tag. The server 140 may execute the vector similarity search against the filtered candidate document set, such that documents that the requesting user or process is not authorized to access are excluded from the similarity search results before any semantic similarity computation is performed. By enforcing access-control filtering as a prerequisite operation to the similarity search, the server 140 can prevent unauthorized data content from entering the context window of the generative AI model, which could otherwise constitute a data leakage event.
In some implementations, one or more of the databases 110 may host or otherwise include a knowledge repository database, sometimes referred to as a knowledgebase. The knowledge repository database may store reference data used by the server 140 and/or a generative AI model executed by the server 140 to condition the generation of computer-form inputs and computer-form files. The reference data stored in the knowledge repository database may include regulatory rule documents, jurisdiction-specific reporting requirements, asset classification hierarchies, form templates, field formatting specifications, historical correction records, historical user feedback entries, and/or previously generated computer-form files. The knowledge repository database may be co-located with one of the databases 110 or distributed across multiple of the databases 110. For example, a first portion of the knowledge repository database storing jurisdiction-specific regulatory rule documents associated with a first jurisdiction may be hosted by database A 110a, while a second portion of the knowledge repository database storing jurisdiction-specific regulatory rule documents associated with a second jurisdiction may be hosted by database B 110b. The knowledge repository database may be updated continuously or periodically as new regulatory requirements are published, new data records are received from the databases 110, new user corrections are provided via the client device 142, and/or new computer-form files are generated by the server 140. A retrieval component of a retrieval-augmented generation (RAG) architecture executed by the server 140 may query the knowledge repository database to retrieve context data for conditioning inference operations of a large language model (LLM) of the generative AI model, as described further herein. Documents or other form of repository data stored in the knowledge repository database may be represented as vector embeddings to facilitate similarity-based retrieval by the retrieval component of the RAG architecture, where the retrieval component converts a query derived from a data category and/or a jurisdiction associated with a customer into a query vector embedding, performs a similarity search against the vector embeddings of documents stored in the knowledge repository database, and retrieves one or more documents having relevance scores that exceed a relevance threshold for provision to the LLM as context input.
In some implementations, prior to embedding extraction or query operations, the server 140 may perform contextual chunk enrichment by executing a language model to prepend one to three sentences of document-level context to each data chunk, where the document-level context may include an entity identifier, a time period, a jurisdiction, and/or a section identifier associated with the source document. Prepending document-level context to each chunk before embedding enables the embedding model to generate vector representations that capture the broader document context in addition to the local chunk content. In some cases, the knowledge repository database may employ multi-representational indexing, in which the same content is indexed under multiple representation types including dense single-vector embeddings, sparse BM25 representations over contextualized text, multi-vector late-interaction representations, and hierarchical summary representations. The multiple representation types may be fused at query time to leverage the complementary strengths of each representation type. The knowledge repository database may maintain index versioning by a full tuple comprising an embedding model identifier, a chunk configuration, an enrichment model identifier, and a corpus hash. Index versioning by the full tuple prevents silent embedding drift that may occur when embedding models or chunk configurations are updated, and prevents unnecessary re-ingestion of content that has not changed.
The system 100 may include a client device 142. The client device 142 may be any device including a memory and a processor capable of communicating, via the network 120 with the server 140. The client device 142 may allow a user, via a user interface, to add, remove, and/or edit configurations of the server 140. In some implementations, the configurations may modify the mapping, the data categories, and/or the one or more computer-form files. For example, the user may, via the user interface, modify the mapping of a particular data type to a particular data category based on an update to a particular computer-form file. In another example, the user may, via the user interface, modify the mapping of dividend income from short-term gains to long-term gains based on an update to a tax form for reporting dividend income. In some implementations, the configurations may modify the generation of the one or more computer-form files based on the categorized data entries. For example, a configuration may include one or more algorithms for generating the one or more computer-form files based on the categorized data entries. The user may, via the user interface, add or remove one or more databases of the databases 110. The user may, via the user interface, add or remove intended recipients of the one or more computer-form files. For example, the user may add or remove jurisdictions for reporting tax forms.
The server 140 may automatically detect and correct errors in the data records. In some implementations, the server 140 may automatically detect the errors in the data records by reconciling the data records against data configurations associated with the computer-file forms. For example, the server 140 may automatically perform reconciliation of bank income payments, withholding taxes, custodian income payments, etc. against tax jurisdiction or government-specific regulations associated with tax forms. The server may automatically correct the errors in the data records. For example, the server interface may provide automatic preemptive reconciliation and exception management via the user interface. The server may generate an alert on the user interface of the client device 142 to correct the errors. The server may request additional data records from the databases 110 to correct the errors. The server may iteratively correct the errors until no errors remain.
The server 140 may perform a relevance grading or scoring operation, such as Corrective Retrieval-Augmented Generation (CRAG) operations, to determine a relevance classification for each document or data chunk retrieved by the retrieval component of the RAG architecture. Relevance grading operations evaluate retrieved content prior to sending or feeding retrieved content to the generative AI model that performs generation operations, such that the relevance grading operation filters out or otherwise precludes irrelevant or inaccurate retrieved content that could otherwise degrade the quality of outputs generated by the generative AI model. In a CRAG-style relevance grading operation, the server 140 includes software routines for executing a grading model, which may be a lightweight language model or classifier distinct from the primary generative AI model, to evaluate each retrieved record and classify the retrieved record into relevance classes or buckets, such as correct, ambiguous, and incorrect, among others. The grading model may evaluate each retrieved record based on semantic similarity (e.g., feature vector similarity or distance) between the retrieved record and the query, factual consistency of the retrieved record with known ground truth data, temporal validity of the retrieved record relative to current reporting requirements, and/or jurisdictional applicability of the retrieved record to the customer associated with the query.
Based on the relevance bucket classification generated by the grading model, the server 140 may execute different downstream actions to each retrieved record. As an example, for records classified as correct, the server 140 retains the record for provision to the generative AI model as context input during generation operations. As another example, for records classified as ambiguous, the server 140 may rewrite the query to clarify the information need, retry the retrieval operation using the rewritten query, and evaluate the newly retrieved records using the grading model. As another example, for records classified as incorrect, the server 140 may discard the record from the retrieval result set, fall back to an alternative data source or retrieval strategy, or flag the record for manual review.
The server 140 generates a report based on the categorized data entries. The server 140 may generate the report at a predetermined time, such as at a tax preparation time. The server 140 may generate the report in response to user input via the user interface. The report may include the one or more computer-form files, generated using the categorized data entries. For example, the report output data may include computer-fillable files representing tax forms (e.g., FATCA, CRS, US 1099, US 1098, US 1042S (FDP and BDI), US 1042, US FBAR, UK BBSI/OI (Section 17/18), CA T511) relative to a given jurisdiction that the server 140 determines are relevant to the customer. The user may, via the user interface of the client device 142, add or remove a computer-form file from the report. The user may, via the user interface of the client device 142, add or remove a set of computer-form files from the report. For example, the user may, via the user interface, add or remove tax forms associated with jurisdictions from the report.
The server 140 may perform a coverage check operation to evaluate whether the retrieved context is sufficient to answer a query or generate a requested output before the
generative AI model produces any substantive output, thereby eliminating a class of confident hallucinations that occur when the generative AI model generates plausible-sounding but unsupported outputs in the absence of adequate retrieved context. Confident hallucinations are particularly problematic in regulatory reporting contexts because the generative AI model may produce outputs that appear authoritative and well-formed but are not grounded in the retrieved regulatory requirements or customer data records. By executing the coverage check before any substantive generation occurs, the server 140 prevents the generative AI model from producing outputs when the retrieved context does not adequately support the requested generation. In some implementations, the server 140 may execute a coverage check model, which may be a lightweight language model or classifier, to evaluate the retrieved context against the query or generation request and determine a coverage sufficiency classification. The coverage check model may evaluate coverage sufficiency based on whether the retrieved context contains information responsive to each component of the query, whether the retrieved context contains information for each required field of the computer-form file, whether the retrieved context contains current regulatory requirements applicable to the customer’s jurisdiction, and/or whether the retrieved context contains customer data records for the relevant reporting period. The coverage check model may output a binary sufficiency classification (sufficient or insufficient) or a multi-level sufficiency classification (e.g., fully sufficient, partially sufficient, or insufficient). Based on the coverage sufficiency classification, the server 140 may execute different downstream actions. If the coverage check determines that the retrieved context is sufficient, the server 140 may proceed with generation operations by providing the retrieved context to the generative AI model. If the coverage check determines that the retrieved context is insufficient, the server 140 may trigger additional retrieval operations using rewritten or expanded queries, request additional data records from the databases 110, present an indication to the user via the user interface of the client device 142 that additional information is required, or decline to generate the requested output and return an explanation of the information gap to the user. In some implementations, if the coverage check determines that the retrieved context is partially sufficient, the server 140 may generate a partial output for the fields or components for which sufficient context exists and flag the remaining fields or components for user review or additional retrieval. The coverage check eliminates confident
hallucinations at low incremental cost because the coverage check requires only a single inference call to the coverage check model before generation, and the incremental latency and computational cost of the coverage check is substantially lower than the cost of correcting erroneous outputs after generation.
The server 240 may categorize data entries of the data records 242 or determine a data category for each data entry of the data records 242. The server 240 may include a category A 246a, a category B 246b, and a category C 246c, referred to collectively as categories 246. In some implementations, the categories 246 may be a plurality of categories.
The server 240 may determine a category for each of the data entries of the data records 242 by using the mapping data 244 on the data entries. The mapping data 244 may be a preconfigured mapping between data types of the data entries and the categories 246. For example, the mapping data 244 may map funds received to an income category. The server may categorize the data entries based on a source of the data records and/or a custodian of the data records. For example, the mapping data 244 may map funds received to a transfers category based on the funds being sent from a first account of a customer to a second account of a customer. In some implementations, the server 240 may determine the data types of the data entries to use the mapping data 244 on the data entries. In some implementations, the server 240 may use the mapping data 244 to determine the data types of the data entries and the categories 246 corresponding to the data types to categorize the data entries. The server 240 may receive the data records 242 at a daily interval and categorize the data entries of the data records 242 at the daily interval. In this way, the server 240 may avoid CPU-bottlenecking caused by categorizing more than an efficient, manageable, daily amount of the data entries of the data records 242 at one time.
The categories 246 may be organized hierarchically. The category A 246a may include the category B 246b such that all data entries mapped to the category B 246b are also mapped to the category A 246a. For example, a category “US transactions” may include a category “US income” such that all data entries mapped to the category “US income” are also mapped to the category “US transactions.” The hierarchy of categories may include any number of levels. In some implementations, the server 240 may determine categories for the data entries iteratively, per level of the hierarchy of categories.
The server 240 uses the categorized data entries for the computer-form files. The server 240 may use the categorized data entries to populate one or more fields of the computer-form files. In some implementations, the server 240 may use a first subset of the data entries corresponding to the category A 246a to populate a first subset of fields of one or more computer-form files 248 and the server 240 may use a second subset of the data entries corresponding to the category B 246b to populate a second subset of fields of the one or more computer-form files 248. For example, demographic information corresponding to a first category may be used to populate first fields of a particular computer-form file and transaction information corresponding to a second category may be used to populate second fields of the particular computer-form file. In some implementations, the server 240 may use the categorized data entries for the computer-form files 248 when the computer-form files 248 are generated. For example, the server 240 may store the categorized data entries and a list of the computer-form files 248 and, at a preconfigured time, or based on user input, generate the computer-form files 248 based on the categorized data entries. In some implementations, the server 240 may regularly use the categorized data entries for the computer-form files 248, such as daily.
The categories 246 may each correspond to the computer-form files 248 on a one-to-one basis. For example, the category A 246a may correspond to a first computer-form file of the computer-form files 248 and the category B 246b may correspond to a second computer-form file of the computer-form files 248. The categories 246 may correspond to different portions or fields of the computer-form files 248. The server 240 may determine one category of the categories 246 for each data entry. The server 240 may determine multiple categories of the categories 246 for one or more data entries of the data records 242. The server 240 may split a data record of the data records 242 into a first sub-record and a second sub-record and assign the data entries of the first sub-record to the category A 246a and the data entries of the second sub-record to the category B 246b.
The server 240 may update the computer-form files based on detecting a new customer data requirement. In some implementations, the server 240 may detect the new customer data requirement based on the mapping data 244. The mapping data 244 may map one or more data entries of the data records 242 to the category C 246c corresponding to a missing computer-form file not found in the computer-form files 248. The server 240 may determine that the one or more data entries of the data records 242 represent a new customer data requirement. The server 240 may update the computer-form files 248 to include the missing computer-form file. The server 240 may detect the new customer data requirement based on the data records 242 received in a time period, such as a day. The server 240 may update the computer-form files 248 such that the data entries received in a subsequent time period, such as a subsequent day, may be categorized according to the categories 246 and the corresponding computer-form files 248. By detecting new customer data requirements based on daily data records 242 and updating the computer-form files 248 accordingly, the server 240 avoids incorrectly categorizing the data entries, failing to categorize the data entries, or experiencing CPU bottlenecking due to attempting to categorize more than a daily amount of the data entries at one time.
At operation 310, a server, at a daily interval, obtains raw data containing a plurality of data records associated with a customer from a plurality of databases. The plurality of data records includes a plurality of data entries. The data entries may include various data types. For example, a first data entry may be demographic information, and a second data entry may be transaction data. The server can identify, parse, or categorize data entries as indicated by data type. Obtaining the raw data at a daily interval offers the technical advantage of reducing a processing burden on the server associated with receiving and categorizing the data records.
At operation 320, the server, for each data record, determines a data category indicating one or more computer-form files for a data entry of the data record based upon a preconfigured mapping between a type of data of the data entry mapped to the data category. In some cases, the server determines the type of data or data type of the data entry in order to map the data entry to a data category. The server may use the mapping data to determine the type of data of the data entry and maps the type of data to the data category. For example, the mapping data may include a mapping between data formats and data types as well as a mapping between data types and data categories.
In some implementations, the server determines the type of data of the data entry based on an indication in the data record of the type of data. For example, the data record may be marked or tagged as including income or transfer transactions. In some implementations, the data category includes or corresponds to a recipient of a subset of the one or more computer-form files. For example, the subset of the one or more computer-form files may be intended for the recipient and the data category may indicate the recipient of the subset of the one or more computer-form files.
In operation, the server may determine the data category for the data entry by requesting, from one or more databases of the plurality of databases, additional information associated with the data entry and/or the data record of the data entry. For example, an incomplete data entry or data record may require requesting a corrected data entry or a corrected data record from the plurality of databases. In another example, an incorrect data entry or data record may require requesting a corrected data entry or a corrected data record from the plurality of databases. Beneficially, receiving and processing data records on a daily interval prevents or mitigates CPU bottlenecking and/or network bottlenecking caused by categorizing a large number of data records and/or requesting a large number of corrected data entries and/or data records from the plurality of databases.
In some implementations, the server splits a data entry into a first sub-entry and a second sub-entry based on the data entry being mapped to a particular data category in the preconfigured mapping, wherein the first sub-entry is mapped to a first data category and the second sub-record is mapped to a second data category in the preconfigured mapping. In some implementations, the first sub-entry and the second sub-entry are the same. In some implementations, the first sub-entry and the second sub-entry are different. In an example, a transaction is copied to be used for a first computer-form file in a first format and used for a second computer-form file in a second format. In another example, a first portion of a transaction is mapped to a first category and a second portion of a transaction is mapped to a second category.
At operation 330, the server, in response to detecting a new customer data requirement, updates the one or more computer-form files associated with each data category according to each data record of each daily interval. The server may detect the new customer data requirement by comparing the one or more computer-form files to a list of active computer-form files and determining that the one or more computer-form files are not present in the list of active computer-form files. In some implementations, the server generates an alert in response to detecting the new customer data requirement. For example, the server may send a notification to a user to notify the user and/or customer that a new customer data requirement has been detected. The user and/or customer may verify the new customer data requirement.
At operation 340, the server, at a preconfigured time, generates the one or more computer-form files based upon each data category using each data record of each daily interval. The server references the data records containing the categorized data entries to generate the one or more computer-form files at the preconfigured time. For example, the server may generate a computer-form file associated with income using data entries categorized as income in the data records. The server may generate the one or more computer-form files and regularly (e.g., daily) evaluates and, if needed, modifies the one or more computer-form files being used or data field(s) of the one or more computer-form files, based on the categorized data entries or changes to the data entries.
The server may, in response to a user input, complete the data fields, or otherwise generates, the one or more computer-form files based upon each data category using each data record, as evaluated each daily interval. A user may generate the computer-form files at any time to view the computer-form files generated using the data records, allowing the user to verify the accuracy of the computer-form files. This is made possible by daily categorization of the data entries of the data records and represents an improvement in the field of computer-form file generation.
In some implementations, the server updates a report based on the categorized data entries of the plurality of data records and verifies, at the preconfigured time, the one or more computer-form files using the report. In an example, the report may represent an aggregation of data entries which are used to generate the one or more computer-form files and the report may be used to verify an accuracy of generating the one or more computer-form files.
At operation 410, a server receives records generated on a first day. The server may receive the records from a plurality of databases. The records may include demographic information and/or transaction information. Each of the records may include a plurality of data entries, where each data entry has a data type. Receiving records generated on a first day reduces the computing resources required to receive and process the records, reducing CPU bottlenecking.
At operation 420, the server, for each respective record, determines a data entry type of a data entry of the respective record based on one or more parameters of the data entry. The server may determine the data entry type based on one or more parameters of the data entry. The server may determine the data entry type based on one or more related data entries. The server may determine the data entry type based on one or more parameters of the respective record. The server may determine the data entry type based on any combination of the above.
At operation 430, the server assigns the data entries to categories based on a mapping between the data types and the categories. In some implementations, the server maintains a data structure for each respective category within which the data entries corresponding to the respective category are stored. In some implementations, the server tags the data entries with a tag corresponding to the categories to which the data entries are assigned. In some implementations, the server generates an indexed ledger indicating which data entries are assigned to which categories.
At operation 440, the server assigns the data entries to computer-form files based on the categories. The server assigns the data entries based on configurations indicating the particular computer-form files. In some implementations, the server maintains a preliminary version of each computer-form file of the computer-form files and incorporates the data entries into their assigned computer-form files. In some implementations, the server tags the data entries with a tag corresponding to the computer-form files. Additionally or alternatively, the server generates an indexed ledger indicating which data entries are assigned to which computer-form files.
At operation 450, the server filters the assigned data entries based on one or more characteristics of the computer-form files. The server may filter the data entries such that a data entry may be used in generating a first computer-form file to which the data entry is assigned and not used in generating a second computer-form file to which the data entry is assigned. The server may mark filtered data entries as not to be used in generating a particular computer-form file. In other implementations, the server does not incorporate the filtered data entries into a preliminary version of the particular computer-form file. In operation, the server filters data entries assigned to a particular computer-form file based on the particular computer-form file being associated with an entity which requires inclusion of some data entries, but not other data entries in the computer-form file.
As an example, transactions associated with mortgage interest payments may be included in US tax forms, but not UK tax forms. The mortgage interest payment transactions may be assigned to the UK tax forms based on their category, but filtered out so they are not used in generating the UK tax forms. In another example, the server receives records associated with relocation of a customer from a first address to a second address, where the second address is associated with different computer-form files than the first address. Subsequent transactions required by the computer-form files associated with the first address but not required by the computer-form files associated with the second address are filtered out, such that they are not used in generating the computer-form files associated with the second address.
At operation 460, the server generates the computer-form files based on the filtered data entries. The server may generate the computer-form files using only the data entries that are not filtered-out by the server for each computer-form file. The server may update previously generated computer-form files based on the filtered data entries.
In one example, a tax form server may receive a plurality of data records from a plurality of databases each day. The plurality of data records each includes data entries affecting one or more tax forms for a customer. The customer has customer data requirements dictating which tax forms are required. The tax form server determines a data category for each data entry of each data record on a daily basis. By categorizing the data entries on a daily basis, the tax form server avoids processing delays and CPU bottlenecking caused by attempting to categorize a larger number of data entries at a time. The tax form server may categorize the data entries using a preconfigured mapping between data types of the data entries and the data categories. The categories correspond to tax forms required for the customer.
The server detects, based on the data entries and/or the data records, that the customer has a new customer data requirement requiring the inclusion of a new tax form. The tax form server updates the tax forms to include the new tax form and updates the categories to include a new category for the new tax form. At the end of a tax year, the tax form server generates the tax forms required for the customer based upon each category using each data record of each daily interval.
Implementing Artificial Intelligence (AI) for Computer-Form Files
Turning back to
The machine-learning architecture may include a planning stage and a verification stage as first-class system components in the data categorization and form generation pipeline. A “first-class system” component includes a software component and/or components of a machine-learning architecture of the server 140 that is treated as an explicit, independently configurable stage of an executable pipeline architecture, rather than being implemented as an implicit side effect, ad hoc logic, or optional enhancement layered on top of other components. By implementing the planning stage and the verification stage as first-class system components, the server 140 (or other components of a system infrastructure) provides dedicated computational resources, explicit interfaces, and independent evaluation metrics for these stages, enabling systematic optimization and monitoring of each stage separately from the retrieval and generation stages.
The planning stage may include query planning operations performed by a planning model or module of the machine learning infrastructure prior to executing main retrieval or generation operations. In some implementations, the planning model analyzes an incoming query or data processing request, identifies the sub-components or sub-queries required to satisfy the request, and determines a processing strategy before executing the main retrieval or generation operations. For example, when the server 140 receives a query requesting generation of a multi-jurisdictional tax report, the planning model may decompose the query into a first sub-query directed to retrieving reporting requirements for a first jurisdiction, a second sub-query directed to retrieving reporting requirements for a second jurisdiction, and a third sub-query directed to retrieving customer data records applicable to both jurisdictions. The planning model may determine an execution order for the sub-queries and may determine dependencies between sub-queries. For example, the planning model may determine that the third sub-query should be executed after the first and second sub-queries so that the customer data records can be filtered based on the retrieved reporting requirements. The planning stage may output a query plan data structure that specifies the sub-queries, their execution order, their dependencies, and the retrieval strategies to be used for each sub-query.
The server 140 may execute a verification stage that includes retrieval verification operations performed by a verification model or module of the machine learning infrastructure after retrieval operations and before or during generation operations. In some implementations, the server 140 may execute the verification model to validate the relevance, accuracy, and completeness of retrieved data before the retrieved data is provided to the generative AI model for generation operations. For example, after the retrieval component of the RAG architecture retrieves a set of regulatory rule documents from the knowledge repository database, the server 140 may execute the verification model to evaluate each retrieved document to determine whether the document is relevant to the query, whether the document contains accurate and current regulatory information, and whether the set of retrieved documents provides sufficient coverage of the information required to answer the query. The server 140 may execute the verification model to classify each retrieved document or chunk into a relevance category, such as correct, ambiguous, or incorrect, and the server 140 may execute different downstream actions based on the relevance category. For documents classified as correct, the server 140 may retain the document for provision to the generative AI model. For documents classified as ambiguous, the server 140 may rewrite the query and trigger a follow-up retrieval operation. For documents classified as incorrect, the server 140 may discard the document or fall back to an alternative retrieval strategy.
The server 140 may also execute the verification stage to validate generated outputs by comparing the generated outputs against the retrieved context to determine whether the generated outputs are grounded in the retrieved context. For example, after the generative AI model generates a computer-form input, the server 140 may execute the verification model to compare the generated computer-form input against the retrieved regulatory rule documents to determine whether the generated value is supported by the retrieved context. The server 140 may flag generated outputs that are not supported by the retrieved context for user review or for regeneration with additional retrieved context.
The server 140 may execute iterative retrieval operations in which the server 140 performs multiple retrieval iterations until a sufficiency condition is satisfied or a maximum iteration count is reached. Iterative retrieval addresses scenarios in which a single retrieval pass does not return sufficient context to answer a query or generate requested outputs, such as when the query is complex, when relevant documents are distributed across multiple regions of the knowledge repository database, or when the initial query formulation does not adequately capture the information need. In some implementations, after performing an initial retrieval operation and before performing generation operations, the server 140 may execute a sufficiency evaluation model to determine whether the retrieved context is adequate to answer the query. The sufficiency evaluation model may be a lightweight language model or classifier that evaluates the retrieved context against the query and generates a sufficiency signal indicating whether the retrieved context provides sufficient coverage of the information required to answer the query.
The sufficiency signal generated by the sufficiency evaluation model may be a binary classification (sufficient or insufficient), a multi-level classification (e.g., fully sufficient, partially sufficient, or insufficient), or a numerical sufficiency score within a predefined range (e.g., 0.0 to 1.0). The sufficiency evaluation model may determine the sufficiency signal based on one or more sufficiency criteria, including whether the retrieved context contains information responsive to each component of a multi-part query, whether the retrieved context contains information for each required field of a computer-form file being generated, whether the retrieved context contains current regulatory requirements applicable to each jurisdiction associated with the customer, and/or whether the retrieved context contains data records for each reporting period specified in the query. In some implementations, the sufficiency evaluation model may identify specific information gaps in the retrieved context by comparing the retrieved context against a structured representation of the query or against a schema of the computer-form file, and may output an information gap indicator specifying which components of the query or which fields of the computer-form file lack sufficient retrieved context.
In response to the sufficiency signal indicating that the retrieved context is insufficient, the server 140 may execute a follow-up retrieval operation to obtain additional context. The server 140 may generate a refined query for the follow-up retrieval operation based on the information gap indicator output by the sufficiency evaluation model. For example, when the information gap indicator specifies that the retrieved context lacks regulatory requirements for a particular jurisdiction, the server 140 may generate a refined query specifically directed to retrieving regulatory requirements for that jurisdiction. In some implementations, the server 140 may expand the original query by adding additional search terms, relaxing filter constraints, or increasing a top-k retrieval parameter to retrieve a larger set of candidate documents. In some implementations, the server 140 may reformulate the original query using query rewriting techniques, such as generating synonyms for key terms, decomposing the query into more specific sub-queries, or using a language model to generate an alternative query formulation that may better match the vocabulary of documents in the knowledge repository database.
The server 140 may maintain an iteration counter that tracks the number of retrieval iterations performed for a given query. The server 140 may increment the iteration counter after each follow-up retrieval operation and may compare the iteration counter against a maximum iteration count threshold stored in a configuration parameter accessible to the server 140. In response to the iteration counter reaching the maximum iteration count threshold, the server 140 may terminate the iterative retrieval process regardless of whether the sufficiency signal indicates that the retrieved context is sufficient. The maximum iteration count threshold may be a preconfigured value (e.g., 3, 5, or 10 iterations) or may be dynamically adjusted based on computational resource availability, query complexity, or latency requirements. When the iterative retrieval process terminates due to reaching the maximum iteration count threshold before satisfying the sufficiency condition, the server 140 may proceed with generation operations using the accumulated retrieved context from all retrieval iterations, may present an indication to a user via a user interface of the client device 142 that the retrieved context may be incomplete, and/or may flag the generated outputs for user review.
In some implementations, the server 140 may aggregate the retrieved context from multiple retrieval iterations into a combined context set before providing the combined context set to the generative AI model for generation operations. The server 140 may deduplicate the combined context set to remove duplicate documents or chunks that were retrieved in multiple iterations. The server 140 may rerank the combined context set using a reranking model to order the aggregated documents or chunks by relevance to the query. The server 140 may apply context ordering operations to the combined context set, as described herein, to position highest-confidence chunks at the beginning and end of the context window. In some implementations, the server 140 may track retrieval provenance metadata for each document or chunk in the combined context set, including an iteration number indicating which retrieval iteration produced the document or chunk and a query formulation used for that retrieval iteration, such that the generative AI model or a downstream verification model can evaluate the reliability of each retrieved document or chunk based on the retrieval provenance metadata.
The server 140 may prioritize implementation of certain operations based on empirical observations indicating that certain techniques yield larger quality improvements than others when implemented in the data categorization and form generation pipeline. Specifically, contextual enrichment and query decomposition techniques tend to yield larger quality improvements than reranking or prompt engineering techniques when used for data categorization and form generation tasks. The server 140 may execute contextual enrichment operations that add document-level or corpus-level context to individual data chunks or records before embedding or retrieval, such as prepending entity identifiers, time periods, jurisdictions, or section identifiers to each chunk. The server 140 may execute query decomposition operations that split complex multi-part queries into simpler atomic sub-queries that can be retrieved and processed independently before aggregating the results. The server 140 may execute reranking operations that use a secondary ranking model to reorder retrieved results after an initial retrieval pass. The server 140 may execute prompt engineering operations that modify the instructions or examples provided to a generative AI model to influence the format or content of generated outputs. Based on the empirically observed leverage hierarchy, the server 140 may prioritize implementation of contextual enrichment and query decomposition operations over reranking and prompt engineering operations when allocating computational resources or when selecting techniques to execute in the pipeline. For example, the server 140 may allocate a larger portion of computational resources to contextual enrichment operations performed during indexing and to query decomposition operations performed during the planning stage, and may allocate a smaller portion of computational resources to reranking operations performed after retrieval.
In some implementations, human analysis or cataloging is not required. In an example, the machine learning infrastructure may be trained using the historical data without human intervention. In some implementations, the historical data may be curated using user input. In some implementations, an output of the machine learning infrastructure may be reviewed by a user, resulting in feedback which is used to update the machine learning infrastructure. The amount of data typically collected from the databases 110 may include thousands to tens of thousands of data items for each user. A team of humans would not be able to catalog or analyze the data in any useful manner. Thus, the machine learning infrastructure of the server 140 or other components of the system 100 is needed to process the large volumes of complex data.
The machine learning infrastructure may analyze the plurality of data records from the databases 110. The machine learning infrastructure may be used on the plurality of data records to detect errors. The machine learning infrastructure may learn from transaction patterns in the plurality of data records to identify common errors and exceptions. In an example, the machine learning infrastructure may identify a pattern of errors in data records from a particular bank or in data records associated with a particular type of transaction. The machine learning infrastructure may correct errors based on detected patterns. The machine learning infrastructure may learn from historical corrections (automatic or human-based) to correct the errors and exceptions. The machine learning infrastructure may be trained used historical user input. The machine learning infrastructure may perform various actions to identify and/or correct errors. The machine learning infrastructure may request additional data from the databases 110 and/or external entities to identify and/or correct an error. In an example, the machine learning infrastructure may identify a potential error in a data record and request additional information from a bank from which the data record originated in order to determine whether the potential error is an error. In an example, the machine learning infrastructure may identify an error in a data record and request a bank, from which the data record originated, to resend the data record and/or to send additional information to correct the error.
The machine learning infrastructure may present a detected error and a proposed correction to a user. The user may verify the error and/or the correction. The machine learning infrastructure may learn from the user verification of the error and/or the correction. The user may modify the correction and/or provide a different correction. The machine learning infrastructure may be updated based on the modified correction and/or the different correction. The user may provide an explanation of the error, the modified correction, and/or the different correction. The machine learning infrastructure may be updated based on the explanation.
The machine learning infrastructure may identify patterns and/or errors that are not observable by a human or not observable without a large amount of comparison data. In an example, the machine learning infrastructure may identify correlations between asset classifications that are not observable without analyzing a large subset of the plurality of data records, which a human could not do in a reasonable amount of time, such as within the daily interval. The machine learning infrastructure may identify data anomalies, including errors in data entries by identifying correlations between data records and/or data entries that are not observable without a large amount of comparison data. The machine learning infrastructure may detect hidden relationships between data records to collect additional data and/or correct errors in the data records. In some implementations, the machine learning infrastructure may identify one or more relationships between entities and correct the error based on the one or more relationships. In an example, the machine learning infrastructure may determine an employment relationship between two entities and correct the error based on the employment relationship. In an example, the machine learning infrastructure may determine common ownership of two bank accounts and correct a determination of income as a transfer.
In an example, the machine learning system is used to correct human errors when collecting data records, verifying a quality or accuracy of the data records, classifying assets, and/or determining data categories for data entries. The machine learning infrastructure may identify and correct errors made by humans by comparing textual data of the plurality of the data records with the human classification and/or categorization. The machine learning infrastructure may employ techniques such as Natural Language Processing (NLP) and deep neural networks. These types of algorithms or processes may be used for analyzing the textual data of the data records. The textual data may include transaction descriptions, notes, or other narrative elements associated with each data record. Machine learning models trained on this textual data can extract meaningful information, detect hidden relationships, and identify potential discrepancies that are missed by the humans. For example, if human errors were made when categorizing data entries, NLP models could identify and correct these errors by comparing the textual data of the data records and/or the data entries with the assigned categories.
The machine learning infrastructure may be used to identify and correct human labeling or identification of fraudulent interactions or users. For example, if a human analyst has incorrectly labelled a user or interaction, or failed to identify a fraudulent user or interaction, a machine learning algorithm can be used to identify the error and correct the labels.
The machine learning infrastructure may be used on the plurality of data records to detect the new customer data requirement. The machine learning infrastructure may be trained based on historical user identification of new customer data requirements and/or historical identifications of new data requirements by the server 140. In some implementations, the machine learning infrastructure may identify the new customer data requirement based on updated rules or regulations. In some implementations, the machine learning infrastructure may identify the new customer data requirement based on an origin of the plurality of data records. In an example, the machine learning infrastructure may identify the new customer data requirement based on one or more data records originating from a specific jurisdiction, bank, or entity.
The machine learning infrastructure may continually receive feedback and be continually updated. The machine learning infrastructure may accumulate a set of feedback entries over a preconfigured feedback collection period and use the accumulated set of feedback entries as labeled training data to retrain one or more machine learning models of the machine learning infrastructure based on the received feedback.
Software programming may perform system monitoring operations at all stages. The real-time vigilance by machine learning models ensures data accuracy and reliability at all stages of the system process monitoring and reliability. Operations for data integrity and reconciliation involve machine learning algorithms that cross-verify information from multiple sources in real-time. These algorithms continually update their data reconciliation rules based on evolving data patterns and regulatory changes, such that the generated documents maintain high levels of accuracy. Real-time error detection and rectification rely on machine learning to monitor the form generation process continuously. Anomaly detection algorithms identify deviations from expected patterns and immediately trigger corrective actions, such as flagging errors for review or suggesting corrections.
The server 140 may execute software routines for evaluating performance of the data categorization and form generation pipeline using decomposed evaluation metrics that are mapped to specific pipeline stages, and may execute software routines for validating reliability of automated evaluators by tracking judge-human agreement. The server 140 may store, in a metrics database or other database 110 accessible to the server 140, a decomposed set of evaluation metrics, where each evaluation metric is associated with a pipeline stage identifier indicating which stage of the pipeline the evaluation metric measures. The decomposed set of evaluation metrics may include recall at k mapped to the index and retrieval stage, where recall at k measures or indicates a proportion of relevant documents that are retrieved within a top-k retrieval results. The decomposed set of evaluation metrics may include context precision mapped to the retrieval stage, where context precision measures a proportion of retrieved documents that are relevant to the query. The decomposed set of evaluation metrics may include faithfulness mapped to the generation stage, where faithfulness measures whether text generated by the generative AI model is supported by the retrieved context provided to the generative AI model. The decomposed set of evaluation metrics may include answer relevance mapped to the generation stage, where answer relevance measures whether the generated output addresses the information need expressed in the query. The decomposed set of evaluation metrics may include correctness mapped to a joint evaluation across multiple stages, where correctness measures end-to-end accuracy of the pipeline from query input to generated output.
The server 140 may compute each evaluation metric for a set of test queries and may store the computed metric values in the metrics database in association with a timestamp and the pipeline stage identifier. When the server 140 detects degraded performance based on the computed metric values, the server 140 may identify which pipeline stage is responsible for the degraded performance by determining which pipeline-stage-specific metric values have decreased relative to historical metric values stored in the metrics database. A single aggregate accuracy metric does not localize failures to specific pipeline stages; the decomposed evaluation metrics enable identification of which pipeline stage is responsible for degraded performance. In some implementations, when the server 140 uses a language model as an automated evaluator to compute one or more of the evaluation metrics, the server 140 may track judge-human agreement as an independent metric to validate reliability of the language model evaluator. The server 140 may periodically select or sample a subset of evaluation instances and route the sampled instances to human reviewers (e.g., at a graphical user interface of a client device 142 of an administrator) to generate or provide evaluator feedback inputs. Optionally, the server 140 may compute a judge-human agreement score by comparing evaluation outputs generated by the language model evaluator against evaluation feedback inputs provided from the client device 142, by a human reviewer, for the sampled instances. The server 140 may store the judge-human agreement score in the metrics database and may generate an alert when the judge-human agreement score falls below a predefined agreement threshold, indicating that the language model evaluator may require recalibration or replacement.
The machine learning infrastructure may monitor rules and regulations related to taxation and financial assets. The machine learning infrastructure may obtain information related to the rules and regulations and analyze the information. The machine learning infrastructure may use NLP algorithms to determine content of the rules and regulations. The machine learning infrastructure may generate rulesets based on the content of the rules and regulations. The machine learning infrastructure may generate natural language rules and/or mathematical rules. The generated rulesets may be used to collect the plurality of data records, provide asset classifications, categorize the data entries, and/or train the machine learning infrastructure. The machine learning infrastructure may identify changes to the rules and regulations. The machine learning infrastructure may update the processing rules and/or be updated based on the changes to the rules and regulations.
The machine learning infrastructure may correct errors in the data records based on the content of the rules and regulations. The machine learning infrastructure may update the computer-form files based on the content of the rules and regulations. The machine learning infrastructure may generate filings of tax documents and/or re-filings of tax documents based on the rules and regulations and/or the changes to the rules and regulations. The machine learning infrastructure may generate corrections and/or payments based on the rules and regulations and/or the changes to the rules and regulations. The machine learning infrastructure may generate re-filings, corrections, and/or payments for superseded or historic rules and regulations. In an example, the machine learning infrastructure may generate a one-time payment for a superseded tax rule which will not be used in future years.
The machine learning infrastructure may identify hidden relationships in complex business structure. The machine learning infrastructure may be used on the plurality of data records to identify the hidden relationships. The machine learning infrastructure may obtain additional data related to business entities and/or relationships between business entities. The machine learning infrastructure may identify ownership of business entities and/or contractual relationships between business entities. The machine learning infrastructure may detect anomalies in the relationships between the business entities. In an example, the machine learning infrastructure may identify a discrepancy between one or more transactions between two business entities and a relationship between the two business entities. The machine learning infrastructure may correct the plurality of data records based on the hidden relationships and/or provide recommendations for modifying the relationships between business entities.
The machine learning infrastructure may identify the new customer data requirement based on the hidden relationships. In an example, the machine learning infrastructure may determine that a hidden relationship between business entities requires a modified approach to tax reporting. The machine learning infrastructure may modify the computer-form files and/or the generated rulesets based on the hidden relationship and/or the new customer data requirement.
Machine learning involves a module comprising algorithms that may learn from existing data by analyzing, categorizing, or identifying the data. Such machine-learning algorithms operate by first constructing a model from training data to make predictions or decisions expressed as outputs. In example embodiments, the training data includes data for one or more identified features and one or more outcomes, for example using user purchasing histories and geolocations to offer real-time incentives for purchases with a payment instrument to an identified high spend event to users likely to switch payment instruments. Although example embodiments are presented with respect to a few machine-learning algorithms, the principles presented herein may be applied to other machine-learning algorithms.
Data supplied to a machine learning algorithm can be considered a feature, which can be described as an individual measurable property of a phenomenon being observed. The concept of feature is related to that of an independent variable used in statistical techniques such as those used in linear regression. The performance of a machine learning algorithm in pattern recognition, classification and regression is highly dependent on choosing informative, discriminating, and independent features. Features may comprise numerical data, categorical data, time-series data, strings, graphs, or images.
In general, there are two categories of machine learning problems: classification problems and regression problems. Classification problems, also referred to as categorization problems, aim at classifying items into discrete category values. Training data teaches the classifying algorithm how to classify. In example embodiments, features to be categorized may include transaction data, which can be provided to the classifying machine learning algorithm and then placed into categories of, for example, transactions with a particular payment instrument, transactions at a particular geolocation, or incentives provided that prompted a change in payment instrument. Regression algorithms aim at quantifying and correlating one or more features. Training data teaches the regression algorithm how to correlate the one or more features into a quantifiable value.
Generative artificial intelligence (AI) refers to a category of machine learning models that generate new data outputs, such as text, structured data, code, and/or formatted documents, based on patterns learned from training data. Generative AI models can be distinguished from discriminative models, which classify or predict labels for input data, in that generative AI models learn statistical distributions of the training data and generate new outputs that conform to the learned distributions. Types of generative AI model architectures may include variational autoencoders (VAEs), generative adversarial networks (GANs), diffusion models, and/or transformer-based generative models. Training processes for generative AI models may include pre-training on large corpora of data and fine-tuning on domain-specific datasets. In the context of the embodiments disclosed herein, generative AI models may be used to generate computer-form inputs, populate structured form fields, generate formatted reporting outputs, detect and propose corrections for data anomalies, and/or generate rulesets from regulatory text.
A large language model (LLM) is a type of generative AI model based on a transformer architecture, trained on large text corpora, and capable of performing natural language understanding, natural language generation, text summarization, translation, and/or structured data extraction tasks. The transformer architecture underlying an LLM may include self-attention mechanisms, multi-head attention layers, positional encodings, and/or feed-forward neural network layers. The self-attention mechanisms can determine contextual relationships between tokens in an input sequence by computing attention weights that indicate a degree of relevance between each pair of tokens in the input sequence. The multi-head attention layers can execute multiple parallel self-attention operations, each operating on a different learned linear projection of the input sequence, and concatenate the outputs of the parallel self-attention operations to capture different types of contextual relationships within the input sequence. The positional encodings can encode a position of each token within the input sequence, such that the transformer architecture can differentiate tokens based on their sequential positions. The feed-forward neural network layers can perform non-linear transformations to the outputs of the attention layers to generate refined representations of the input data.
Training phases for an LLM may include pre-training using unsupervised or self-supervised objectives on large-scale text datasets, supervised fine-tuning using labeled domain-specific data, and/or reinforcement learning from human feedback (RLHF) for aligning model outputs with desired objectives. During pre-training, the LLM can learn general-purpose language representations by predicting masked tokens or next tokens within training sequences drawn from the large-scale text datasets. During supervised fine-tuning, the LLM can receive labeled input-output pairs from a domain-specific dataset, such as pairs of data record fields and corresponding computer-form input values, and adjust model parameters to reduce a loss function computed between predicted outputs and labeled outputs. RLHF can involve generating candidate outputs from the LLM, receiving preference signals from a human reviewer or a reward model indicating which candidate outputs are preferred, and updating the LLM parameters to increase a likelihood of generating preferred outputs.
Inference and prompting techniques for an LLM may include zero-shot prompting, few-shot prompting, chain-of-thought prompting, and/or system-level instruction prompting. In zero-shot prompting, the LLM can receive a task instruction without any labeled examples and generate an output based on the task instruction and the LLM's learned representations. In few-shot prompting, the LLM can receive a task instruction along with a small number of labeled input-output examples, and generate an output that follows the pattern established by the labeled examples. In chain-of-thought prompting, the LLM can receive a task instruction that directs the LLM to generate intermediate reasoning steps prior to generating a final output, which can improve accuracy for tasks involving multi-step data transformations. In system-level instruction prompting, the LLM can receive a persistent instruction that conditions all subsequent outputs of the LLM within a given session, such as an instruction to format all generated outputs according to a specified computer-form file schema. Prompt engineering may be used to direct LLM outputs toward generating structured computer-form inputs, extracting field values from unstructured data records, and/or interpreting regulatory text for ruleset generation.
In some implementations, an LLM may be a multimodal LLM capable of ingesting and generating outputs across multiple data modalities, such as text annotations, tabular data, and/or structured document formats. A multimodal LLM can receive heterogeneous data records from various data sources, including client devices and databases (e.g., database A 110a, database B 110b, database C 110c), having varying formats and can generate a unified set of structured outputs from the heterogeneous data records. For example, a multimodal LLM can receive a combination of free-text transaction descriptions, delimited tabular income data, and formatted XML document fragments, and generate computer-form inputs that correspond to one or more fields of a computer-form file using information extracted from the combination of data modalities. In the context of the embodiments disclosed herein, an LLM may be used to perform NLP operations to determine textual data of data records (e.g., transaction descriptions, narrative elements), monitor rules and regulation changes to generate or update rulesets, detect discrepancies between data entries and assigned categories, and/or generate natural language rules and/or mathematical rules from regulatory content.
A retrieval-augmented generation (RAG) model is a type of architecture that includes executable software programming or routines of a retrieval or search engine component for a generative AI model. The retrieval component of the RAG can retrieve relevant context by querying documents and/or data records from an external knowledge source, such as a knowledge repository database (e.g., database 110, document repository, feature vector store), and provides the retrieved context as input to the generative AI model to condition the generation of outputs. The retrieval component may perform vector embedding of documents and vector-based queries, similarity search using distance metrics (e.g., cosine similarity, Euclidean distance, etc.), indexing using indexing structures for efficient retrieval (e.g., approximate nearest neighbor indices), and/or ranking of retrieved documents by relevance score. For example, the retrieval component can convert a query, such as a request to generate computer-form inputs for a specified computer-form file type and jurisdiction, into a vector embedding, and perform a similarity search against vector embeddings of documents stored in the external knowledge source to identify documents having relevance scores that exceed a relevance threshold.
The retrieval component may employ late-interaction retrieval as a primary retrieval mechanism and may use three-way Reciprocal Rank Fusion to combine results from dense retrieval, sparse retrieval, and late-interaction retrieval, thereby leveraging the complementary strengths of each retrieval method to improve retrieval accuracy across diverse query types. Late-interaction retrieval, such as ColBERT-style multi-vector matching, represents each document and each query as multiple vectors corresponding to individual tokens rather than as a single aggregated vector. At query time, the retrieval component computes relevance scores via token-level interactions between query token vectors and document token vectors, such as by computing a maximum similarity score for each query token against all document tokens and summing the maximum similarity scores across query tokens. Late-interaction retrieval captures fine-grained semantic relationships between query terms and document terms that may be lost in single-vector dense retrieval, which compresses the entire query or document into a single fixed-length vector representation.
In some implementations, a retrieval component (e.g., retrieval operations of a RAG architecture) may employ late-interaction retrieval as a primary retrieval method that operates directly over an index of multi-vector document representations, rather than as a secondary re-ranker used on results retrieved by a separate primary retrieval method. By employing late-interaction retrieval as a primary retrieval method, the retrieval component may retrieve documents that would be missed by dense single-vector retrieval due to vocabulary mismatch or semantic compression. In some implementations, the retrieval component may use three-way Reciprocal Rank Fusion (RRF) to combine retrieval results from three retrieval methods: dense single-vector retrieval, sparse lexical retrieval (e.g., BM25), and late-interaction multi-vector retrieval. RRF computes a fused score for each document based on the reciprocal of the document’s rank position in each retrieval result list, such that documents appearing at higher rank positions in multiple retrieval result lists receive higher fused scores. In some configurations, a three-way RRF may be executed as a default fusion operation for the retrieval component, such that retrieval operations automatically leverage the complementary strengths of dense retrieval (semantic similarity), sparse retrieval (exact lexical matching), and late-interaction retrieval (fine-grained token-level matching) without requiring manual selection of a retrieval method for each query.
In a RAG architecture, the generative AI model (e.g., an LLM) can receive the retrieved context concatenated with and/or otherwise conditioned on a query or task instruction, and generate an output that is grounded in the retrieved context. Grounding the output in the retrieved context can reduce hallucination and improve factual accuracy of the generated output relative to a generative model operating without retrieved context. For example, the generative AI model can receive retrieved regulatory rule text pertaining to a specified jurisdiction along with a task instruction to generate computer-form inputs for a computer-form file associated with the specified jurisdiction, and generate the computer-form inputs in accordance with the retrieved regulatory rule text rather than relying on the generative AI model's parametric memory alone.
The external knowledge source used by the retrieval component may include databases of historical data records, mapping configuration data, regulatory rule documents, previously generated computer-form files, historical user corrections, asset classification hierarchies, and/or jurisdiction-specific reporting requirements. The external knowledge source may be updated continuously or periodically as new data records are received, new regulations are published, and/or new user corrections are provided. For example, when a user provides a correction to a computer-form input generated by the generative AI model, the correction can be stored in the external knowledge source, such that the retrieval component can retrieve the correction as context for subsequent generation operations involving similar data records and/or computer-form file types.
In the context of the embodiments disclosed herein, a RAG architecture may be used to retrieve jurisdiction-specific rules and regulation data to condition the generative AI model when generating computer-form inputs for a particular computer-form file. The RAG architecture may retrieve historical correction data to condition error detection and correction operations performed by the generative AI model. The RAG architecture may retrieve asset classification data to condition categorization of data entries by the generative AI model. The RAG architecture may retrieve previously generated computer-form files to detect new customer data requirements by comparing retrieved active computer-form files against currently indicated computer-form files. Grounding generated outputs in current regulatory data and historical records stored in the external knowledge source can allow the generative AI model to generate outputs that reflect current regulations without retraining of the generative AI model each time regulations or data configurations change. Providing the generative AI model with relevant contextual data at inference time via the retrieval component can reduce errors in generated computer-form inputs. Maintaining a record of the retrieved context used to generate each output can improve transparency and auditability of the generated outputs.
The generative AI model, which may include an LLM operating within a RAG architecture, may be executed on the server 140 or on a computing device in communication with the server 140. The generative AI model may interface with various databases 110 (e.g., the mapping database 130, the computer-form files database 150, databases 110) to retrieve context data for generating computer-form inputs and computer-form files. For example, the generative AI model can query the mapping database 130 to retrieve mapping configuration data indicating which data types map to which data categories, and use the retrieved mapping configuration data as context when generating computer-form inputs for a specified computer-form file. In some implementations, the generative AI model can query the computer-form files database 150 to retrieve a template of a computer-form file and generate computer-form inputs that conform to field identifiers and formatting constraints of the retrieved template.
User verification, user corrections, and/or user-provided explanations may be used to update the external knowledge source of the retrieval component and/or to fine-tune the generative AI model. For example, when a user modifies a computer-form input generated by the generative AI model via a user interface of the client device 142, the modification and any accompanying explanation provided by the user can be stored in the external knowledge source, such that the retrieval component can retrieve the modification as context for conditioning subsequent generation operations. In some implementations, a set of accumulated user corrections can be used as training data to fine-tune the generative AI model, such that the generative AI model adjusts one or more model parameters to increase a likelihood of generating outputs consistent with the user corrections.
The generative AI model operating within a RAG architecture may be used across the operations described with respect to the methods of the disclosed embodiments. For example, the generative AI model may be used during data categorization to determine data categories for data entries based on retrieved mapping configuration data and/or regulatory rule data. The generative AI model may be used during error detection and correction to identify errors in data records by comparing data entries against retrieved data configurations and to generate proposed corrections conditioned on retrieved historical correction data. The generative AI model may be used during new customer data requirement detection to compare currently indicated computer-form files against retrieved lists of active computer-form files. The generative AI model may be used during computer-form input generation and computer-form file generation to populate fields of computer-form files using generated computer-form inputs conditioned on retrieved jurisdiction-specific rules. The generative AI model may be used during regulatory monitoring to determine content of retrieved regulatory documents using NLP operations and to generate or update rulesets based on the determined content.
In some implementations, the server 140 or other computing device executing the retrieval operations may include software routines that the generative AI model invokes dynamically during generation, such that the generative AI model need not rely upon a fixed pipeline for context data ingestion that precedes generation. When the retrieval is implemented as a dynamically invocable software routine, the generative AI model may determine during the generation process that additional context is required, invoke the retrieval operations to obtain the additional context, and continue generation conditioned on the retrieved context. In this way, the generative AI model retrieves information on demand for generating outputs, rather than requiring all data context retrieval to occur before generation operations begin. In some configurations, extended context windows may complement rather than replace retrieval. The generative AI model may use retrieval to select which documents or document portions enter the context window, and may use the extended context window to fit more of the selected content once selected. Extended context windows enable the generative AI model to attend over longer retrieved context, but retrieval remains necessary to select relevant content from corpora that exceed even extended context window limits.
The machine learning infrastructure may receive feedback from one or more sources and update one or more machine learning models of the machine learning infrastructure based on the received feedback. The feedback may include user corrections to generated computer-form inputs, user modifications to data category assignments, user verifications of proposed error corrections, and/or user-provided explanations of errors or corrections. The machine learning infrastructure may store the received feedback in the external knowledge source accessible to the retrieval component of a RAG architecture, such that the retrieval component can retrieve the stored feedback as context for conditioning subsequent generation operations performed by the generative AI model. In some implementations, the machine learning infrastructure may accumulate a set of feedback entries over a preconfigured feedback collection period and use the accumulated set of feedback entries as training data to fine-tune one or more machine learning models of the machine learning infrastructure at the end of the preconfigured feedback collection period. For example, a set of user corrections to computer-form inputs generated for a particular data category over a thirty-day period may be aggregated and used as labeled training data to adjust one or more model parameters of the generative AI model, such that the generative AI model increases a likelihood of generating computer-form inputs consistent with the aggregated user corrections for subsequent generation operations involving the particular data category. In some implementations, the machine learning infrastructure may update one or more machine learning models in response to each individual feedback entry received from a user, without waiting for the preconfigured feedback collection period to elapse. For example, when a user provides a correction to a data category assignment via the user interface of the client device 142, the machine learning infrastructure may update a classification model of the machine learning infrastructure to increase a likelihood of assigning subsequent data entries having similar data types to the corrected data category.
The method 500 may include a planning stage and a verification stage as first-class operations in the data categorization and form generation pipeline. In the planning stage, the computer may execute a planning model to analyze a query or data processing request before executing the main retrieval or generation operations. The planning model may identify the sub-components or sub-queries required to satisfy the request, determine dependencies between sub-queries, and output a query plan data structure specifying the execution order and retrieval strategies for each sub-query. In the verification stage, the computer may execute a verification model to validate retrieved data before providing the retrieved data to the generative AI model and to validate generated outputs before finalizing the outputs. The verification model may classify retrieved documents into relevance categories and execute different downstream actions based on the relevance category, and may compare generated outputs against retrieved context to determine whether the generated outputs are grounded in the retrieved context.
At operation 510, at a preconfigured time interval (e.g., daily interval), the computer obtains raw data containing a plurality of data records associated with a customer from a plurality of databases. The plurality of data records may include a plurality of data entries having various data types. For example, a first data entry may represent demographic information and a second data entry may represent transaction data associated with one or more financial instruments. The preconfigured time interval may be a daily interval, a weekly interval, or any other regular interval at which the computer can receive and categorize the data entries of the data records without incurring CPU bottlenecking. In some implementations, the preconfigured time interval may be adjusted dynamically based on a volume of incoming data records and/or available processing resources of the computer. The computer may obtain the plurality of data records from a knowledge repository database or any other database (e.g., database A 110a, database B 110b, database C 110c) via network 120, where the data records from each respective database may differ in format based on a jurisdiction and/or entity associated with that database.
In some implementations, prior to executing retrieval or generation operations, the computer may execute a planning stage operation in which the computer analyzes the query or data processing request to determine a processing strategy. The planning stage operation may include query decomposition, in which a planning model of the generative AI model architecture splits a multi-part query into atomic sub-queries before any embedding occurs. Each atomic sub-query may be retrieved independently using retrieval parameters optimized for that sub-query. For example, when the computer receives a request to generate computer-form files for a customer having reporting obligations across multiple jurisdictions, the planning model may decompose the request into a first sub-query for retrieving regulatory requirements for a first jurisdiction, a second sub-query for retrieving regulatory requirements for a second jurisdiction, and a third sub-query for retrieving customer data records applicable to the identified jurisdictions. The planning model may determine that the third sub-query depends on the results of the first and second sub-queries, and may specify an execution order in which the first and second sub-queries are executed before the third sub-query. The planning stage operation may output a query plan specifying the sub-queries, their dependencies, their execution order, and the retrieval strategies to be used for each sub-query.
At operation 520, the computer determines a data category indicated by a set of one or more data records, the data category mapped to a computer-form file (e.g., electronic tax form) and at least one type of data field of the one or more data records. The computer may determine the data category based upon a preconfigured mapping between a type of data of a data entry of the set of one or more data records and the data category. For example, the computer may use mapping data to determine that a transaction data entry indicating a receipt of dividend income maps to a data category corresponding to an income-reporting computer-form file. In some implementations, the computer may determine the data category by evaluating multiple data types associated with a single data entry and selecting the data category based on a combination of the multiple data types. The data category may correspond to one or more computer-form files according to the mapping, and may indicate a recipient of a subset of the one or more computer-form files, such as a jurisdiction-specific government entity. In some implementations, the computer may execute a generative AI model to determine the data category by performing a natural language processing (NLP) operation to extract a data type indicator from an unstructured text field of a data entry and mapping the extracted data type indicator to the data category using the preconfigured mapping. For example, the generative AI model may receive a free-text transaction description from a data entry and generate a structured data type label, such as "dividend income" or "capital gain," that the computer maps to the corresponding data category.
The computer may execute software routines for improving retrieval accuracy on technical corpora or database by generating and including a hypothetical answer to the query prior to performing similarity search, a technique referred to as Hypothetical Document Embeddings (HyDE). The HyDE operations address a vocabulary mismatch problem that occurs when a user query is expressed in different terminology than the target documents, causing dense retrieval models to assign low similarity scores to relevant documents despite semantic relevance. When executing HyDE, the computer may receive a query from a requesting user or process and may execute a generative AI model, such as an LLM, to generate a hypothetical answer to the query based on the query content. The generative AI model may generate the hypothetical answer by predicting what a relevant document or passage responding to the query would contain, without accessing the knowledge repository database during generation. The computer may execute an embedding extraction model to generate or extract a feature vector embedding as a hypothetical answer embedding. The hypothetical answer embedding may be generated by converting the generated hypothetical answer (e.g., text data, image data) into a feature vector representation in the same embedding space as the document embeddings stored in the knowledge repository database.
The computer may execute the retrieval component to perform a vector similarity search using the hypothetical answer embedding as the query vector, computing similarity scores between the hypothetical answer embedding and the document embeddings stored in the knowledge repository database. The computer may retrieve one or more documents having similarity scores that exceed a relevance threshold based on the similarity search using the hypothetical answer embedding. Embedding the hypothetical answer reduces semantic distance to target documents on technical corpora because the hypothetical answer is expressed in language and structure that more closely resembles the language and structure of relevant documents than the original query. In some implementations, the computer may concatenate the hypothetical answer embedding with an embedding of the original query to generate a combined query embedding, and may perform the similarity search using the combined query embedding to leverage both the original query semantics and the hypothetical answer semantics. In some implementations, the computer may generate multiple hypothetical answers to the query by executing the generative AI model multiple times with different sampling parameters, generate a respective embedding for each hypothetical answer, and aggregate the multiple embeddings into a single aggregated query embedding for the similarity search.
In some implementations, the computer may execute a large language model (LLM) to determine the mapping for the data category. The LLM may receive as input one or more data entries of the set of one or more data records along with an LLM-directed instruction that directs the LLM to classify each data entry according to a set of predefined data categories. For example, the LLM-directed instruction may include mapping data comprising a list of data category identifiers and corresponding descriptions for types of data, and the LLM may generate an output token sequence that indicates a selected data category identifier for each data entry based on the content of the data entry. In some implementations, the LLM may receive the data entries via few-shot prompting, where a small number of labeled input-output mapping examples are provided alongside the data entries to condition the LLM to generate data category labels consistent with the labeled mapping examples. In some implementations, the LLM may use chain-of-thought prompting to generate intermediate reasoning steps prior to generating the data category label, which may increase accuracy when a data entry includes mappings indicating data types that correspond to more than one data category.
In some implementations, the computer may execute a retrieval-augmented generation (RAG) architecture to determine the data category. The RAG architecture may include a retrieval component that queries an external knowledge source, such as a knowledge repository database storing mapping configuration data, jurisdiction-specific reporting requirements, and/or historical categorization records, to retrieve context data relevant to the set of one or more data records. For example, the retrieval component may convert a query derived from one or more data entries into a vector embedding, perform a similarity search against vector embeddings of documents or files stored in the external knowledge source, and retrieve one or more documents having relevance scores determined by the RAG that exceed a relevance threshold. The retrieved documents or files may include a mapping configuration file containing mapping data that indicates which data-types map to which data categories and/or computer-form files for a specified jurisdiction. The LLM of the RAG architecture may receive the retrieved mapping configuration file concatenated with the data entries and generate the data category label according to the retrieved mapping configuration file. In this way, the LLM may generate the data category mapping labels in accordance with current mapping configuration data retrieved from the external knowledge source.
In some implementations, determining the data category at operation 520 includes determining an asset classification corresponding to a data record of the set of one or more data records by using a classification hierarchy data structure on the data record, and determining the data category based at least in part on the asset classification. The classification hierarchy data structure may provide multiple hierarchical levels of asset classifications, such as stock, dividend-yielding stock, and Class A share, organized according to tax treatment or other regulatory characteristics of the assets. The computer may use a decision tree corresponding to the classification hierarchy on the data record, such that each node of the decision tree evaluates a feature of the data record and routes the data record to a more specific asset classification. The computer may update the classification hierarchy data structure based on user input received via the user interface of the client device and/or based on updated rules or regulations retrieved by the retrieval component of the RAG architecture from the knowledge repository database. The generative AI model may receive the asset classification as additional context input when generating computer-form inputs (at operation 530), such that the generated computer-form inputs reflect the asset classification assigned to the underlying data record.
At operation 530, for the computer-form file corresponding to the data category, the computer generates, by executing a generative AI model, one or more computer-form inputs for the computer-form file using the set of one or more data records indicating the data category. The generative AI model may receive as input the categorized data entries and one or more parameters of the computer-form file, such as field identifiers, field formatting constraints, and/or jurisdiction-specific rules associated with the computer-form file. For example, the generative AI model may receive a set of income transaction data entries categorized under an income data category and generate corresponding field values, such as a gross income amount, a withholding amount, and/or an income type code, formatted according to the field requirements of the computer-form file. In some implementations, the generative AI model may generate the one or more computer-form inputs by executing an NLP operation to extract structured data from unstructured or semi-structured text fields within the data records. In some implementations, the generative AI model may be trained using historical data records, historical computer-form inputs, and/or historical user corrections to the computer-form inputs, such that the generative AI model generates computer-form inputs that reflect patterns learned from the historical data.
In some implementations, the computer may execute an LLM to generate the one or more computer-form inputs for the computer-form file. The LLM may receive as input a prompt that includes the categorized data entries, a schema of the computer-form file specifying field identifiers and field data type constraints, and a task instruction directing the LLM to generate a structured set of field values corresponding to the schema. For example, the LLM may receive a prompt that includes a set of transaction data entries categorized under a withholding tax data category along with a schema specifying a gross income field, a tax rate field, and a net amount field, and the LLM may generate a structured output including computed values for each specified field. In some implementations, the LLM may implement zero-shot prompting to generate the computer-form inputs when the task instruction and schema provide sufficient specification of the expected output format. In some implementations, the LLM may implement few-shot prompting, where the prompt includes one or more labeled examples of prior data entry sets and corresponding computer-form inputs, to condition the LLM to generate computer-form inputs consistent with the labeled examples.
In some implementations, the computer may execute a RAG architecture to generate the one or more computer-form inputs. The retrieval component of the RAG architecture may query the external knowledge source to retrieve jurisdiction-specific rules, reporting requirement documents, and/or historical computer-form inputs associated with the data category and/or the computer-form file. For example, the retrieval component may retrieve a regulatory rule document specifying withholding tax rates applicable to a particular income type for a particular jurisdiction, and the LLM of the RAG architecture may receive the retrieved regulatory rule document along with the categorized data entries to generate the computer-form inputs in accordance with the retrieved withholding tax rates. In some implementations, the retrieval component may retrieve one or more historical user corrections associated with similar data entries and/or similar computer-form file types, and the LLM may receive the retrieved historical user corrections as additional context to generate the computer-form inputs. Grounding the generation of the computer-form inputs in the retrieved context from the external knowledge source may reduce errors in the generated computer-form inputs relative to generation that relies on the parametric memory of the LLM without retrieved context.
In some implementations, after the retrieval component retrieves external reference data and before the LLM generates the computer-form inputs, the computer may execute a verification stage operation in which the computer validates the relevance, accuracy, and completeness of the retrieved data. The verification stage operation may include executing a verification model to evaluate each retrieved document or chunk and classify the retrieved document or chunk into a relevance category. The relevance categories may include a correct category for documents that are relevant and accurate, an ambiguous category for documents whose relevance is uncertain, and an incorrect category for documents that are not relevant or that contain inaccurate information. Based on the relevance category, the verification model may execute different downstream actions: for documents classified as correct, the verification model may retain the document for provision to the LLM; for documents classified as ambiguous, the verification model may rewrite the query and trigger a follow-up retrieval operation; for documents classified as incorrect, the verification model may discard the document or fall back to an alternative retrieval strategy. The verification stage operation may also include a coverage check in which the verification model evaluates whether the set of retrieved documents provides sufficient information to answer the query or generate the requested computer-form inputs before any substantive generation is performed.
In some implementations, after the retrieval component retrieves external reference data and before the LLM generates the computer-form inputs, the computer may execute iterative retrieval operations in which the computer performs multiple retrieval iterations until a sufficiency condition is satisfied or a maximum iteration count is reached. The computer may execute a sufficiency evaluation model to evaluate the retrieved context and generate a sufficiency signal indicating whether the retrieved context provides sufficient coverage of the information required to generate the requested computer-form inputs. The sufficiency evaluation model may determine the sufficiency signal based on whether the retrieved context contains information for each required field of the computer-form file, whether the retrieved context contains current regulatory requirements applicable to each jurisdiction associated with the customer, and/or whether the retrieved context contains data records for each reporting period specified in the query.
In response to the sufficiency signal indicating that the retrieved context is insufficient, the computer may execute a follow-up retrieval operation to obtain additional context. The computer may generate a refined query for the follow-up retrieval operation based on an information gap indicator output by the sufficiency evaluation model, where the information gap indicator specifies which components of the query or which fields of the computer-form file lack sufficient retrieved context. For example, when the information gap indicator specifies that the retrieved context lacks withholding rate data for a particular income type, the computer may generate a refined query specifically directed to retrieving withholding rate specifications for that income type. The computer may expand or reformulate the original query by adding search terms, relaxing filter constraints, increasing a top-k retrieval parameter, or using a language model to generate an alternative query formulation.
The computer may maintain an iteration counter that tracks the number of retrieval iterations performed for the query. The computer may compare the iteration counter against a maximum iteration count threshold and may terminate the iterative retrieval process in response to the iteration counter reaching the maximum iteration count threshold, regardless of whether the sufficiency signal indicates sufficient coverage. When the iterative retrieval process terminates due to reaching the maximum iteration count threshold before satisfying the sufficiency condition, the computer may proceed with generation operations using the accumulated retrieved context from all retrieval iterations and may flag the generated computer-form inputs for user review. The computer may aggregate the retrieved context from multiple retrieval iterations into a combined context set, deduplicate the combined context set, and apply context ordering operations to position highest-confidence chunks at positional extremes of the context window before providing the combined context set to the LLM for generation operations.
In some circumstances, the generative AI model determines, for the particular customer, that the plurality of data records triggers reporting obligations in preparing a plurality of computer-form files across multiple jurisdictions. The computer generates computer-form inputs for the plurality of computer-form files corresponding respectively to the multiple jurisdictions using the same set of one or more data records. For example, the retrieval component of the RAG architecture may retrieve, from the external knowledge source, a first set of jurisdiction-specific reporting requirements associated with a first jurisdiction and a second set of jurisdiction-specific reporting requirements associated with a second jurisdiction, and the LLM may generate a first set of computer-form inputs conformant with the first set of jurisdiction-specific reporting requirements and a second set of computer-form inputs conformant with the second set of jurisdiction-specific reporting requirements. As an example, the generative AI model determines that demographic data in the data records of the customer indicate residency in a first jurisdiction and transaction data in the data records of the customer indicate income sourced from a second jurisdiction. In this example, the generative AI model determines that the customer’s reporting obligations require the generative AI model to generate a first computer-form file associated with the first jurisdiction and a second computer-form file associated with the second jurisdiction. The generative AI model generates respective computer-form inputs for each computer-form file in a single execution of the generative AI model using data records corresponding to the data category related to the computer-form files.
At operation 540, the computer generates, by executing the generative AI model, the computer-form file corresponding to the data category using the one or more computer-form inputs generated for the computer-form file. The computer may populate one or more fields of the computer-form file with the one or more computer-form inputs (as generated at operation 530). For example, the computer may populate a payee name field, an income amount field, and a tax identification number field of the computer-form file using the respective computer-form inputs generated by the generative AI model. In some implementations, the computer may generate the computer-form file by executing the generative AI model to assemble the computer-form inputs into a structured output format corresponding to the computer-form file, such as an extensible markup language (XML) document, a portable document format (PDF) file, and/or a delimited text file.
The computer may execute software routines for ordering the retrieved context data (or chunks) within the context window of the generative AI model to mitigate against a lost-in-the-middle effect, where the software routines order or position highest-confidence chunks (having comparatively higher or better confidence scores or query scores) at the beginning and end of the context window and position lower-confidence chunks (having comparatively lower or worse confidence scores or query scores) in the middle of the context window. The lost-in-the-middle effect refers to the tendency of transformer-based language models to attend (or “focus”) more strongly to tokens at positional extremes of the context window (the beginning and end) than to tokens in the middle of the context window, which can cause the generative AI model to underweight or ignore relevant retrieved content positioned in the middle of the context window.
In some implementations, after the retrieval component retrieves a set of context chunks from the knowledge repository database, the computer may execute a context ordering module to reorder the retrieved context chunks based on confidence scores associated with each chunk. The computer may determine a confidence score for each retrieved context chunk based on the relevance score computed during the similarity search, a verification score generated by a verification model, and/or a source reliability score associated with the document from which the chunk was extracted. The computer may rank the retrieved context chunks by confidence score and may partition the ranked chunks into a high-confidence subset, a medium-confidence subset, and a low-confidence subset based on confidence score thresholds. The computer may construct an ordered context sequence by placing chunks from the high-confidence subset at the beginning of the context sequence, placing chunks from the low-confidence subset in the middle of the context sequence, and placing chunks from the medium-confidence subset at the end of the context sequence. In some configurations, the computer may interleave chunks from the high-confidence subset at both the beginning and the end of the context sequence, such that the positional extremes of the context window contain the most relevant retrieved content. The computer may concatenate the ordered context sequence with the query or task instruction and may provide the concatenated input to the generative AI model for generation operations. By positioning the highest-confidence chunks at the positional extremes where the generative AI model attends most strongly, the context ordering operations improve the likelihood that the generative AI model will incorporate the most relevant retrieved context into the generated output, thereby reducing errors in the generated computer-form inputs that could otherwise result from the generative AI model ignoring relevant context positioned in the middle of the context window.
In some implementations, the computer may execute an LLM to generate the computer-form file. The LLM may receive a template of the computer-form file retrieved from the computer-form files database 150 along with the one or more computer-form inputs, and the LLM may generate a populated version of the template by inserting each computer-form input into a corresponding field of the template. For example, the LLM may receive a template specifying a field layout for an income-reporting computer-form file along with the generated computer-form inputs, and the LLM may generate an XML document or other structured output in which each template field identifier is associated with the corresponding computer-form input value. In some implementations, the LLM may detect an inconsistency between two or more of the computer-form inputs and generate a corrected computer-form input based on one or more learned correction patterns prior to populating the computer-form file. For example, the LLM may detect that a numerical income amount in a first computer-form input is inconsistent with a written income description in a second computer-form input and may generate a corrected value for the numerical income amount based on correction patterns learned during training.
In some implementations, the computer may execute a RAG architecture to generate the computer-form file. The retrieval component of the RAG architecture may query the external knowledge source to retrieve a current version of a computer-form file template, one or more formatting specifications associated with the computer-form file, and/or one or more previously generated computer-form files of the same type for the same customer. For example, the retrieval component may retrieve a formatting specification that indicates a required field ordering, a required decimal precision for monetary fields, and/or a required date format for the computer-form file, and the LLM of the RAG architecture may receive the retrieved formatting specification along with the computer-form inputs to generate the computer-form file in conformance with the retrieved formatting specification. In some implementations, the retrieval component may retrieve a previously generated computer-form file for the same customer for a prior reporting period, and the LLM may receive the retrieved prior computer-form file as context to detect changes between reporting periods and to populate fields that carry forward from the prior reporting period. The computer may store the generated computer-form file in the computer-form files database 150 and/or transmit the generated computer-form file to a downstream reporting system.
In some implementations, after the generative AI model generates the computer-form file and before the computer finalizes the computer-form file, the computer may execute a post-generation verification operation in which the computer validates that the generated outputs are grounded in the retrieved context. The post-generation verification operation may include comparing the generated computer-form inputs against the retrieved external reference data to determine whether each generated value is supported by the retrieved context. For example, the verification model may compare a generated withholding rate value against withholding rate specifications contained in the retrieved regulatory rule documents to verify that the generated withholding rate value matches the applicable regulatory requirements. The verification model may flag generated outputs that are not supported by the retrieved context for user review, for regeneration with additional retrieved context, or for discarding. The verification model may determine a grounding score for each generated output, where the grounding score indicates a degree to which the generated output is supported by the retrieved context. The computer may compare the grounding score against a grounding threshold and may finalize the computer-form file in response to the grounding score satisfying the grounding threshold. In response to the grounding score not satisfying the grounding threshold, the computer may present the generated computer-form file to a user for review, trigger additional retrieval operations to obtain additional context, or regenerate the computer-form inputs using the additional context.
The computer may determine a confidence score associated with the one or more computer-form inputs and/or the computer-form file generated by the generative AI model, where the confidence score indicates a likelihood that the generated outputs are accurate based on the set of one or more data records and the retrieved external reference data. The computer may determine the confidence score based on a degree of agreement between multiple candidate outputs generated by the generative AI model, a degree of correspondence between the generated outputs and the retrieved external reference data, and/or a learned confidence estimation output of the LLM. In response to determining that the confidence score satisfies a predefined confidence threshold, the computer may autonomously finalize the computer-form file without user review, including storing the generated computer-form file in a database (e.g., computer-form files database 150) and/or transmitting the generated computer-form file to a downstream reporting system. In response to determining that the confidence score does not satisfy the predefined confidence threshold, the computer may generate a draft computer-form file and present the draft computer-form file to a user via a user interface of the client device for review, modification, and/or approval prior to finalization. The generative AI model may populate and finalize computer-form files based on confidence thresholds while routing lower-confidence outputs to the user for verification.
In some implementations, the computer executes the generative AI model to monitor changes to rules and regulations applicable to the computer-form files and to automatically generate updated rulesets based on the monitored changes. The retrieval component of the RAG architecture may periodically query the external knowledge source for newly published regulatory guidance, updated jurisdiction-specific reporting requirements, and/or amendments to existing regulatory rule documents. The LLM may receive the retrieved new regulatory guidance as input and may parse the retrieved new regulatory guidance using NLP operations to generate natural-language rules and/or mathematical rules corresponding to the content of the retrieved new regulatory guidance. The LLM may compare the generated rules against an existing ruleset stored in the external knowledge source to identify differences between the generated rules and the existing ruleset and may generate a proposed update to the existing ruleset based on the identified differences. The computer may either automatically implement the proposed update in response to a confidence score associated with the proposed update satisfying a predefined confidence threshold or present the proposed update to a user via the user interface of the client device for approval prior to implementation. During subsequent iterations of the method 500, the computer may use the updated ruleset for determining of the data category (at operation 520), generating the one or more computer-form inputs (at operation 530), and/or generating the computer-form file (at operation 540), such that computer-form files generated by the generative AI model reflect current regulatory requirements without manual reconfiguration of the data categorization logic or the form generation logic.
Remote Deposit Capture and Preparing Computer-Form Files
Turning back to
The server 140 may receive deposit records from the client device 142 as part of the data records 242. A deposit record can be a data record that includes data derived from an input document captured at the client device 142, where the input document may be a financial instrument such as a check, a receipt, a statement, or another document type. The deposit record may include at least one of: an image of the input document, textual data extracted from the input document, and/or metadata associated with the input document. For example, the deposit record may include an image of a check captured by a camera of the client device 142, textual data extracted from the check via optical character recognition (OCR), and/or metadata such as a timestamp, geolocation data, and/or a device identifier associated with the client device 142. In some cases, the server 140 receives deposit records from a mobile device, such as a mobile phone or tablet having a camera, where the mobile device captures image data of the input document and transmits the image data to the server 140 via the network 120; and in some cases, the server 140 retrieves the deposit records from a database 110 (e.g., database A 110a, database B 110b, database C 110c) or other storage device.
The server 140 may receive the deposit record via the network 120 and categorize one or more data entries of the deposit record into data categories using the mapping data 244. The server 140 may incorporate the categorized data entries derived from the deposit record into one or more computer-form files 248 in the same manner as other data records obtained from the database 110. For example, the server 140 may receive a deposit record that includes textual data extracted from a deposited check, determine that the textual data corresponds to an income transaction data type based on the mapping data 244, and assign the data entry to an income data category that maps to one or more income-reporting computer-form files 248.
The server 140 may extract the textual data from the image of the input document by executing an optical character recognition (OCR) operation on the image data. The OCR operation may detect and convert printed and/or handwritten characters within the image data into machine-readable text strings corresponding to one or more fields of the input document. For example, the server 140 may execute the OCR operation on an image of a check to extract a payee name, a numerical deposit amount, a written deposit amount, a routing number, an account number, and/or a check number from corresponding regions of the image data. In some implementations, the server 140 may execute a pre-processing operation on the image data prior to executing the OCR operation, where the pre-processing operation may include at least one of a contrast adjustment, a de-skewing transformation, a noise reduction filter, and/or a resolution scaling operation to improve legibility of the characters within the image data.
The server 140 may execute a machine learning model (e.g., an object recognition model) trained to detect attributes of the input document, such as lines, data fields, boxes, pictures, holograms, and/or watermarks. The server 140 may execute the machine learning model to identify field boundaries within the image data of the input document, where each field boundary corresponds to a spatial region of the image data containing a respective data field of the input document. For example, the machine learning model may detect a rectangular region corresponding to a numerical amount field, a linear region corresponding to a payee name field, and/or a lower-edge region corresponding to a machine-readable character line of a check. The server 140 may execute the OCR operation on each detected field boundary region to extract a respective text string for each data field of the input document. In some implementations, the server 140 may select a field-specific OCR configuration for each detected field boundary region based on a field type classification generated by the machine learning model, where the field-specific OCR configuration specifies a character set, a font model, and/or a text layout orientation corresponding to the field type. For example, the server 140 may select a numeric-only character set for a detected numerical amount field boundary region and an alphanumeric character set for a detected payee name field boundary region. The server 140 may generate one or more data entries from the extracted textual data, where each data entry corresponds to a respective field of the input document and includes the machine-readable text string extracted from that field.
The server 140 may determine one or more data categories for the deposit record using the data extracted from the input document or other attributes of the input document. The server 140 may categorize each generated data entry using the mapping data by determining a data type for the data entry based on the field from which the textual data was extracted and mapping the determined data type to a data category. For example, the server 140 may determine that a text string extracted from a deposit amount field of a check corresponds to an income transaction data type and may map the income transaction data type to a data category associated with one or more income-reporting computer-form files. The server 140 may process the deposit record by using the mapping data on each data entry of the deposit record to determine a data type and a corresponding data category and may populate one or more fields of the computer-form files using the categorized data entries derived from the deposit record. For example, the server 140 may extract a deposit amount from the textual data of the deposit record, classify the deposit amount as an income data entry based on the mapping data 244, and populate an income amount field of a corresponding computer-form file of the computer-form files 248 using the classified deposit amount.
The deposit record may include metadata that the server 140 or another device receives with or derives from the deposit record data. The metadata of the deposit record may indicate a source device identifier, a capture timestamp, and/or a geographic location associated with the source device at a time of capture of the input document. In some cases, the metadata may include device attributes or parameters of the client device 142, such as a camera resolution, an operating system version, and/or a network connection type used to transmit the deposit record to the server 140.
The server 140 may use the metadata to determine one or more parameters for categorizing the data entries of the deposit record. For example, the server 140 may determine a jurisdiction associated with the deposit record based on the geographic location indicated in the metadata and may select a subset of the mapping data corresponding to that jurisdiction when categorizing the data entries of the deposit record into a category. The server 140 may use an image capture timestamp of the metadata to associate the data entries of the deposit record with a particular time interval (e.g., daily interval), such that the data entries of the deposit record are included in the set of data entries categorized during that time interval. The server 140 may use the source device identifier to associate the deposit record with a particular customer account stored in one or more of the databases 110 and may retrieve additional data records associated with the particular customer account from the database 110 to execute data categorization operations of the data entries of the deposit record.
The server 140 may detect an error in the deposit record and generate a correction for the error. An error in the deposit record can be a discrepancy, omission, or inaccuracy detected in one or more data entries derived from the input document. The error may include at least one of an image quality error that renders extracted data unreliable, a missing or incorrect field value extracted from the input document, a misclassification of the type of the input document, or a discrepancy between extracted data and an expected data format associated with the computer-form files. As an example, the server 140 may detect that a deposit amount field extracted from a check image is blank or contains characters that do not conform to a numerical format expected by the corresponding computer-form file. As another example, the server 140 may detect that the input document has been classified as a check when the extracted data fields do not match the expected layout of a check.
In some implementations, the server 140 may detect the error by comparing one or more data entries of the deposit record against corresponding data entries for the customer stored in one or more databases. For example, the server 140 may compare an account number extracted from the deposit record against account records for the customer stored in one of the databases 110, and may detect the account number as an error when no matching account record for the customer (or, in some configurations, any customer) can be located in the databases 110.
In some implementations, the server 140 may detect the error by comparing the deposit record against one or more data configurations associated with the computer-form files, including one or more operations for generating the computer-form files 248. Additionally or alternatively, the server 140 may detect the error by comparing the deposit record against one or more data-exception configurations for corresponding data types. For example, when a data entry of the deposit record indicates a transaction amount that falls outside of a permissible range threshold defined by a data-exception configuration for the corresponding data type, the server 140 may detect the data entry as an error.
In some implementations, the server 140 may detect the error based on the determined data category for the deposit record. For example, the server 140 may determine that a data type indicated by a categorized data entry of the deposit record fails to match, or is inconsistent with, the data category to which the data entry has been assigned based on the mapping data. The server 140 may compare the data type of the categorized data entry against a set of permissible data types defined for the assigned data category, and may detect the data entry as an error when the data type does not match any permissible data type within the set permissible data types. For instance, the server 140 may detect the error when a data entry derived from a deposit record maps to a first data category under the mapping data but includes one or more field values that conform to a field schema associated with a (different) second data category. For example, a data entry extracted from a check image may be assigned to an income data category based on a transaction type indicator, but the server 140 may detect that the data entry includes a field value formatted as a transfer reference code rather than an income amount, indicating an inconsistency between the assigned data category and the data type of the field value.
The server 140 may detect the error by using the mapping data on the deposit record and determining that one or more data entries of the deposit record map to a data category that does not match, or is inconsistent with, a document type classification assigned to the input document from which the deposit record was derived. For example, the server 140 may assign a document type classification of “check” to the input document based on detected attributes of the image data (e.g., a detected MICR line region, a detected payee line, and/or a detected numerical amount field), and may subsequently determine that a data entry extracted from the input document maps, under the mapping data, to a data category associated with a wire transfer computer-form file rather than a check deposit computer-form file. In some implementations, the server 140 may compare the data category to which the data entry maps against a set of permissible data categories defined for the document type classification assigned to the input document, and may detect the data entry as an error when the data category does not appear within the set of permissible data categories for that document type classification. In some implementations, the server 140 may detect the error when multiple data entries of the deposit record map to data categories associated with different and mutually exclusive document type classifications, indicating that the input document was misclassified and/or that one or more data entries were extracted from an incorrect region of the image data.
In some implementations, the server 140 may detect the error by performing a field-level validation on each data entry of the deposit record, where the field-level validation compares a value of the data entry against a field schema specifying a permissible data format, a permissible character set, a permissible value length, and/or a permissible numeric range for the corresponding field of the computer-form files. For example, the server 140 may compare a routing number extracted from a check image against a field schema that specifies a nine-digit numeric format, and may flag the routing number as an error when the extracted routing number contains fewer than nine digits and/or contains non-numeric characters.
Optionally, the server 140 may execute a RAG architecture to perform the field-level validation by querying an external knowledge repository database or any other database 110 (e.g., database A 110a, database B 110b, database C 110c) hosting a knowledgebase that stores regulatory requirements associated with the input document type and the data category to which the data entry maps. The retrieval component of the RAG architecture may convert a query derived from one or more field identifiers of the deposit record into a vector embedding, perform a similarity search against vector embeddings of regulatory requirement documents stored in the external knowledge source, and retrieve one or more regulatory requirement documents having relevance scores that exceed a relevance threshold. The retrieved regulatory requirement documents may specify jurisdiction-specific permissible value constraints for corresponding fields of the input document, such as a minimum and/or maximum character length for an account number field, a permissible set of institution identifiers for a routing number field, and/or a required decimal precision for a monetary amount field. An LLM of the RAG architecture may receive, as an LLM-directed prompt instruction, the retrieved regulatory requirement documents or outputs from the RAG and the data entries of the deposit record, which the LLM uses to generate a validation output indicating, for each data entry extracted from the input document, whether the value of the data entry satisfies the permissible value constraints specified in the retrieved regulatory requirement documents. The server 140 may detect a data entry as an error when the validation output generated by the LLM indicates that the value of the data entry does not satisfy one or more of the permissible value constraints specified in the retrieved regulatory requirement documents for the corresponding field.
In some implementations, the server 140 may detect the error by performing a cross-field consistency check that evaluates a relationship between two or more data entries within the deposit record. For example, the server 140 may compare a numerical amount data entry extracted from a numerical amount field of a check against a written amount data entry extracted from a written amount field of the same check, and may detect both data entries as an error when the numerical amount data entry and the written amount data entry do not correspond to a same monetary value.
The server 140 may generate, by executing a generative AI model, a correction for the error based upon the deposit record and one or more correction operation configurations. The one or more correction operation configurations may be retrieved from a knowledge repository database accessible to the server 140, and may include operation configurations specifying, for example, permissible value ranges, expected field formats, and/or expected relationships between fields of a computer-form file of the computer-form files. The generative AI model may receive as input the deposit record, an indication of the detected error, and the one or more correction operation configurations, and may generate a proposed corrected value for the erroneous data entry. For example, the server 140 may execute the generative AI model to compare the erroneous deposit amount against other data fields extracted from the same input document (e.g., a written amount field and a numerical amount field of a check), and may generate a proposed corrected deposit amount based on the comparison and on one or more correction rules retrieved from the knowledge repository database.
The generative AI model of the server 140 may determine a confidence score associated with the proposed correction, where the confidence score indicates a likelihood that the proposed correction is accurate based on the deposit record and the one or more correction operation configurations. The confidence score may be a numerical value within a predefined range (e.g., 0.0 to 1.0; 0.0 to 100.0) that the generative AI model generates based on a comparison between the proposed corrected value and one or more reference values derived from the deposit record, the mapping data, and/or the one or more correction operation configurations retrieved from knowledge repository database or other database. In some configurations, the generative AI model may determine the confidence score based on a degree of agreement between multiple independent correction candidates generated by the generative AI model for the same erroneous data entry, where a higher degree of agreement among the multiple independent correction candidates corresponds to a higher confidence score. For example, the generative AI model may generate three candidate corrected values for an erroneous deposit amount data entry, and may determine the confidence score based on whether two or more of the three candidate corrected values match one another. In some configurations, the generative AI model may determine the confidence score based on a similarity between the proposed corrected value and a value extracted from a different field of the same deposit record. For example, the generative AI model may compare a proposed corrected numerical deposit amount against a written deposit amount extracted from a written amount field of the same input document, and may assign a higher confidence score when the proposed corrected numerical deposit amount corresponds to the written deposit amount.
The server 140 may update the deposit record according to the proposed correction in response to determining that the confidence score satisfies a predefined confidence threshold. The server 140 may implement the proposed correction on one or more data entries of the deposit record by replacing the erroneous value of the data entry with the proposed corrected value generated by the generative AI model. For example, the server 140 may replace an erroneous deposit amount extracted from a numerical amount field of a check image with the proposed corrected deposit amount generated by the generative AI model, and may re-categorize the updated data entry using the mapping data to determine whether the data category assignment for the updated data entry remains consistent with the corrected value. In some embodiments, the server 140 may store the proposed correction and the corresponding confidence score in the external knowledge source accessible to a retrieval component of the RAG architecture, such that the retrieval component can retrieve the stored correction as context for conditioning subsequent generation operations performed by the generative AI model on similar deposit records and/or similar data entry types. The server 140 may propagate the corrected data entry to the data records of the customer and/or one or more computer-form files that reference the data category to which the corrected data entry maps, such that fields of the one or more computer-form files reflect the corrected value rather than the erroneous value.
Optionally, the server 140 may present the proposed correction to a user via a user interface of the client device 142 for verification when the confidence score does not satisfy the predefined confidence threshold. The server 140 may generate a graphical user interface element at the client device 142 that displays the erroneous data entry, the proposed corrected value generated by the generative AI model, and/or the confidence score associated with the proposed correction, such that the user can evaluate the proposed correction in context with the deposit record from which the erroneous data entry was derived. The user may verify the proposed correction by selecting a confirmation input via the user interface, modify the proposed correction by entering a different value for the erroneous data entry via the user interface, and/or provide an explanation of the error and/or the modification via a text input field of the user interface. In some embodiments, the server 140 may store the user verification, the modified correction, the different correction, and/or the user-provided explanation in the external knowledge source accessible to the retrieval component of the RAG architecture, such that the retrieval component can retrieve the stored user feedback as context for conditioning subsequent generation operations performed by the generative AI model on similar deposit records and/or similar data entry types. The generative AI model may be updated based on the user verification, the modified correction, and/or the different correction provided by the user. For example, the server 140 may accumulate a set of user corrections and/or user-provided explanations over a preconfigured feedback collection period and use the accumulated set as labeled training data to fine-tune one or more model parameters of the generative AI model, such that the generative AI model increases a likelihood of generating proposed corrections consistent with the accumulated user corrections for subsequent error correction operations involving similar data entry types and/or similar deposit record formats.
The server 140 may iteratively detect and correct errors in the deposit record until no errors remain, where each iteration includes executing the generative AI model to generate a proposed correction and determining whether a confidence score for the proposed correction satisfies the predefined confidence threshold. The server 140 may request additional data records from one or more of the databases 110 to correct the error, such as by requesting a resend of data associated with the input document and/or by requesting supplemental data from a financial institution associated with the input document.
The method 600 may include a planning stage and a verification stage as first-class operations in the data categorization and form generation pipeline. The planning stage may include query planning operations performed prior to retrieval or generation operations. The verification stage may include retrieval verification operations performed after retrieval and before generation, and may include post-generation verification operations performed after generation and before finalization. The planning stage and verification stage may be used for processing of remote deposit capture data in the same manner as processing of other data records obtained from the plurality of databases.
At operation 610, the computer obtains raw data containing a plurality of data records associated with a customer from a plurality of databases. The plurality of data records may include demographic data, account data, transaction data, tax classification data, and jurisdiction-related data. The raw data may be obtained at a preconfigured time interval, such as a daily interval. The plurality of data records associated with the customer may include deposit records containing remote deposit capture (RDC) data (or deposit data) associated with the customer. The RDC data may include image data of an input document (e.g., financial instrument, check), textual data for text extracted from the input document, and metadata associated with the input document or image-capture of the input document (e.g., source device metadata), among other types of metadata. For example, the RDC data may include a packaged image of a check captured by a mobile client device, device metadata identifying the mobile client device, and one or more validation indicators associated with the check capture process.
The computer may pre-process the RDC data to validate and prepare the RDC data for data extraction. The computer may execute one or more pre-processing operations on image data included in the RDC data to improve the legibility of characters within the image data prior to data extraction, including at least one of a contrast adjustment, a de-skewing transformation, a noise reduction filter, and/or a resolution scaling operation. The computer may validate the metadata included in the RDC data by determining whether required metadata fields, such as a source device identifier, a capture timestamp, and/or a geographic location, are present and well-formed, and may flag the RDC data as non-processable when one or more required metadata fields are missing or malformed. The computer may execute a machine learning model trained to classify an input document type depicted in the image data (e.g., check, receipt, statement), and may associate the RDC data with the determined input document type for downstream processing. In some implementations, the computer may associate the RDC data with a particular customer account based on the source device identifier and/or other metadata, and may retrieve additional data records associated with the particular customer account from the plurality of databases to provide context for subsequent operations of the method 600.
At operation 620, the computer extracts input document data from the RDC data and generates one or more data records based on the extracted input document data. The computer may extract the input document data by executing an optical character recognition (OCR) operation on image data included in the RDC data to convert printed and/or handwritten characters depicted within the image data into machine-readable text strings. The extracted input document data may include, for example, a transaction amount, payer information, payee information, account information, institution information, date information, routing information, and/or check number information.
The computer may execute a machine learning model (e.g., object recognition model) trained to detect field boundaries within the image data of the input document, where each detected field boundary corresponds to a spatial region of the image data containing a respective data field. For example, the machine learning model may detect a rectangular region corresponding to a numerical amount field, a linear region corresponding to a payee name field, and/or a lower-edge region corresponding to a machine-readable character line of a check, and the computer may execute the OCR operation on each detected field boundary region to extract a respective text string for that data field. The computer may generate a data entry for each extracted text string, where each data entry corresponds to a respective field of the input document and includes the machine-readable text string extracted from that field. The computer may incorporate the one or more data records generated from the RDC data into the data records associated with the customer, such that the data entries derived from the input document are categorized using the mapping data and assigned to one or more categories.
At operation 630, the computer determines a data category indicated by a set of one or more data records of the plurality of data records, where the data category is mapped to one or more computer-form files and at least one type of data field of the one or more data records. The computer may determine the data category based on a preconfigured mapping between one or more data types represented in the set of one or more data records and the data category. For example, the computer may use the mapping data to determine that a data entry representing a dividend payment corresponds or maps to an income data category, and that the income data category corresponds to one or more income-reporting computer-form files. The data category may correspond to a reporting obligation, a form type, a recipient, or a jurisdiction, among others. The computer may determine the data category for data entries derived from a deposit record included in the set of one or more data records, where the deposit record includes textual data extracted from an input document captured at the client device. The computer determines the data categories associated with the RDC data (input document data) extracted from the input document by using the mapping data on the extracted textual data and identifying the correlated data category.
In some implementations, prior to executing retrieval operations to retrieve external reference data for the data category, the computer may execute a planning stage operation in which a planning model analyzes the query derived from the RDC data and determines a processing strategy. The planning stage operation may include query decomposition in which the planning model splits a multi-part query into atomic sub-queries. For example, when the computer processes a deposit record that requires retrieval of reporting requirements from multiple jurisdictions, the planning model may decompose the query into separate sub-queries for each jurisdiction, determine dependencies between the sub-queries, and specify an execution order for the sub-queries. The planning stage operation may also include query routing by type in which a classifier directs different types of queries to different retrieval strategies. For example, the classifier may direct lookup queries for specific regulatory requirements to a dense retrieval strategy, synthesis queries for aggregating information across multiple documents to a multi-step retrieval strategy, and comparative queries for comparing requirements across jurisdictions to a parallel retrieval strategy.
The computer may detect, using the generative AI model, one or more errors in the RDC data and generates a proposed correction for each detected error. The error detected by the generative AI model may include at least one of an image quality error that renders extracted data unreliable, a missing or incorrect field value extracted from the input document, a misclassification of a type of the input document, or a discrepancy between extracted data and an expected data format associated with the computer-form file. The generative AI model may detect the error by comparing the extracted data entries against field schemas, data-exception configurations, and/or jurisdiction-specific regulatory requirements retrieved by the RAG component from the knowledge repository database, and/or by performing a cross-field consistency check that evaluates a relationship between two or more data entries within the RDC data, for example by comparing a numerical amount data entry extracted from a numerical amount field of a check against a written amount data entry extracted from a written amount field of the same check. The generative AI model generates the proposed correction for the detected error based on context of the RDC data, one or more correction operation configurations retrieved from the knowledge repository database, and/or historical user corrections retrieved by the RAG component from the external knowledge source, and determines a confidence score associated with the proposed correction that indicates a likelihood that the proposed correction is accurate based on the RDC data and the retrieved context.
In response to determining that the confidence score associated with the proposed correction satisfies a predefined confidence threshold, the computer automatically updates one or more data entries of the RDC data according to the proposed correction and propagates the corrected data entries to the categorized data records for use in subsequent operations of the method 600. In response to determining that the confidence score does not satisfy the predefined confidence threshold, the computer presents the proposed correction to a user via the user interface of the client device for verification, modification, and/or approval, and updates the RDC data according to a user-verified or user-modified correction received via the user interface. The computer may store the proposed correction, the confidence score, and any user verification or modification in the external knowledge source accessible to the retrieval component of the RAG architecture, such that the retrieval component can retrieve the stored correction and user feedback as context for conditioning subsequent error detection and correction operations performed by the generative AI model on similar RDC data and/or similar data entry types. The computer may iteratively repeat error detection until no errors remain in the RDC data or until a maximum number of iterations has been reached.
At operation 640, the computer retrieves, using a RAG component of a generative AI model architecture, external reference data corresponding to the data category from a knowledge repository database or any type of database storing a knowledgebase of relevant regulatory information and configurations. The external reference data may include tax rules, jurisdiction-specific reporting requirements, form instructions, form templates, prior reporting records, correction histories, and/or expected attributes of the input document (e.g., field layout specifications, watermark patterns, machine-readable character line formats, barcode specifications). The RAG component may convert a query, derived from the data category and at least one jurisdiction associated with the customer, into a vector embedding, and performs a similarity search against vector embeddings of documents stored in the knowledge repository database to retrieve one or more documents having relevance scores that exceed a relevance threshold. For example, the RAG component may receive the data category corresponding to an income-reporting computer-form file and a jurisdiction identifier indicating a particular country, and may retrieve a regulatory rule document specifying income classification rules and withholding rate schedules applicable to the particular country for the income-reporting computer-form file. The LLM of the generative AI model architecture receives retrieved document or other form of output of the RAG as a context input of an LLM-directed prompt instructing an LLM of the generative AI model architecture for generating the one or more computer-form inputs (at later operation 650).
In some implementations, after the retrieval component retrieves external reference data from the knowledge repository database and before the LLM generates computer-form inputs, the computer may execute a verification stage operation to validate the retrieved data. The verification stage operation may include executing a verification model to classify each retrieved document or chunk into a relevance category, such as correct, ambiguous, or incorrect, and executing different downstream actions based on the relevance category. The verification stage operation may include a coverage check that evaluates whether the retrieved context is sufficient to generate the requested computer-form inputs for the deposit record before any substantive generation is performed. If the coverage check determines that the retrieved context is insufficient, the computer may trigger additional retrieval operations, request additional data records from the databases 110, or present an indication to the user that additional information is required. The verification stage operation may also include an independent evaluation of the verification model’s accuracy, in which the computer measures the verification model’s precision and recall against gold relevance labels to detect degradation in the verification model’s performance.
In some cases, the RAG retrieves multiple documents from the knowledge repository database for a single data category, where each retrieved document corresponds to a different aspect of the external reference data. For example, the RAG component may retrieve a first document specifying field formatting constraints for the computer-form file and a second document specifying permissible value ranges for monetary amount fields of the computer-form file, and the LLM of the generative AI model architecture may receive both retrieved documents as context when generating the one or more computer-form inputs (at later operation 650).
At operation 650, the computer generates, using the LLM of the generative AI model architecture, one or more computer-form inputs for the one or more computer-form files using the set of one or more data records for the customer and the external reference data retrieved by the RAG component. The LLM may receive, as a prompt input, the categorized data entries from the set of one or more data records concatenated with the retrieved external reference data, and may generate a structured output sequence that includes one or more field values corresponding to fields of the one or more computer-form files. For example, the LLM may receive a set of income transaction data entries categorized under an income data category along with a retrieved regulatory rule document specifying applicable withholding rates for a jurisdiction associated with the customer, and may generate a gross income field value, a withholding amount field value, and/or an income type code field value formatted according to field constraints specified in the retrieved regulatory rule document.
The LLM may determine one or more applicable computer-form files for the customer based on the data records obtained from the databases, including data records generated from the RDC data. For example, the LLM may receive a deposit record derived from an input document captured at the client device along with demographic data records indicating a jurisdiction change for the customer, and may determine that the jurisdiction change requires generation of computer-form inputs for a computer-form file associated with the new jurisdiction in addition to a computer-form file associated with the prior jurisdiction.
The LLM may generate the one or more computer-form inputs based on a semantic comparison between the set of one or more data records (including RDC-derived data records) and the retrieved external reference data, where the semantic comparison includes determining a degree of correspondence between data type indicators extracted from the data entries and reporting requirement descriptors contained within the retrieved external reference data. For example, the LLM may compare a data type indicator of "dividend distribution" extracted from a transaction data entry against a reporting requirement descriptor of "qualifying dividend income" contained within a retrieved jurisdiction-specific rule document or other form of data field from the knowledge repository database, and may generate a computer-form input that classifies the transaction as a qualifying dividend based on the degree of correspondence between the data type indicator and the reporting requirement descriptor.
At operation 660, the computer executes the generative AI model to generate the one or more computer-form files using the one or more computer-form inputs. When generating the one or more computer-form files, the LLM populates one or more fields of the one or more computer-form files using text or values generated by the generative AI model. The generated computer-form files may include electronic tax forms or other reporting forms corresponding to the identified reporting obligation of the customer.
At optional operation 670, the computer updates the one or more computer-form files in response to newly received RDC data and/or in response to detecting a new customer data requirement. The newly received RDC data may indicate a new transaction event associated with the customer, such as a new deposit record derived from an input document captured at the client device 142. The computer may determine that the new transaction event changes the one or more computer-form files corresponding to the data category by comparing one or more data entries of the newly received RDC data against the data entries previously categorized for the customer during a prior time interval. For example, the computer may determine that a deposit record received during a current daily interval includes a transaction amount that, when aggregated with previously categorized income data entries for the customer, causes a total income value to exceed a reporting threshold associated with a computer-form file of the computer-form files 248, and the computer may generate updated computer-form inputs reflecting the revised total income value.
In some implementations, the computer may detect the new customer data requirement by using the mapping data 244 on the newly received RDC data and determining that a data entry of the newly received RDC data corresponds or maps to a data category corresponding to a computer-form file not present in a list of active computer-form files maintained for the customer. For example, the computer may receive a deposit record that includes a data entry indicating a transaction originating from a jurisdiction not previously associated with the customer, and the mapping data may map the data entry to a data category corresponding to a jurisdiction-specific computer-form file that does not appear in the list of active computer-form files for the customer. In response, the computer may add the jurisdiction-specific computer-form file to the list of active computer-form files for the customer, generate one or more computer-form inputs for the added computer-form file using the data entries of the newly received RDC data and any previously categorized data entries associated with the corresponding data category, and generate the added computer-form file using the generated computer-form inputs. The computer may execute the generative AI model, including the LLM and/or the RAG component, to generate the updated computer-form inputs and the updated computer-form files by retrieving current regulatory rule documents and/or formatting specifications from the knowledge repository database corresponding to the data category and the jurisdiction associated with the new transaction event.
The foregoing method descriptions and the process flow diagrams are provided merely as illustrative examples and are not intended to require or imply that the steps of the various embodiments must be performed in the order presented. The steps in the foregoing embodiments may be performed in any order. Words such as “then,” “next,” etc., are not intended to limit the order of the steps; these words are simply used to guide the reader through the description of the methods. Although process flow diagrams may describe the operations as a sequential process, many of the operations can be performed in parallel or concurrently. In addition, the order of the operations may be re-arranged. A process may correspond to a method, a function, a procedure, a subroutine, a subprogram, and the like. When a process corresponds to a function, the process termination may correspond to a return of the function to a calling function or a main function.
The various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
Embodiments implemented in computer software may be implemented in software, firmware, middleware, microcode, hardware description languages, or any combination thereof. A code segment or machine-executable instructions may represent a procedure, a function, a subprogram, a program, a routine, a subroutine, a module, a software package, a class, or any combination of instructions, data structures, or program statements. A code segment may be coupled to another code segment or a hardware circuit by passing and/or receiving information, data, arguments, parameters, or memory contents. Information, arguments, parameters, data, etc. may be passed, forwarded, or transmitted via any suitable means including memory sharing, message passing, token passing, network transmission, etc.
The actual software code or specialized control hardware used to implement these systems and methods is not limiting. Thus, the operation and behavior of the systems and methods were described without reference to the specific software code being understood that software and control hardware can be designed to implement the systems and methods based on the description herein.
When implemented in software, the functions may be stored as one or more instructions or code on a non-transitory computer-readable or processor-readable storage medium. The steps of a method or algorithm disclosed herein may be embodied in a processor-executable software module, which may reside on a computer-readable or processor-readable storage medium. A non-transitory computer-readable or processor-readable media includes both computer storage media and tangible storage media that facilitate transfer of a computer program from one place to another. A non-transitory processor-readable storage media may be any available media that may be accessed by a computer. By way of example, and not limitation, such non-transitory processor-readable media may comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other tangible storage medium that may be used to store desired program code in the form of instructions or data structures and that may be accessed by a computer or processor. Disk and disc, as used herein, include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, and Blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media. Additionally, the operations of a method or algorithm may reside as one or any combination or set of codes and/or instructions on a non-transitory processor-readable medium and/or computer-readable medium, which may be incorporated into a computer program product.
The preceding description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the following claims and the principles and novel features disclosed herein.
While various aspects and embodiments have been disclosed, other aspects and embodiments are contemplated. The various aspects and embodiments disclosed are for purposes of illustration and are not intended to be limiting, with the true scope and spirit being indicated by the following claims.
Claims
1. A computer-implemented method for generating computer-form files using a generative artificial intelligence (AI) model architecture, the method comprising: at a preconfigured time interval:
- obtaining, by a computer, raw data containing a plurality of data records associated with a customer from a plurality of databases;
- determining, by the computer, a data category indicated by a set of one or more data records, the data category mapped to a computer-form file and at least one type of data field of the set of one or more data records;
- for the computer-form file corresponding to the data category, generating, by the computer executing a generative AI model, one or more computer-form inputs for the computer-form file using the set of one or more data records indicating the data category; and
- generating, by the computer executing the generative AI model, the computer-form file corresponding to the data category using the one or more computer-form inputs generated for the computer-form file.
2. The method of claim 1, wherein generating the computer-form file includes populating, by the computer executing the generative AI model, one or more fields of the computer-form file using a text or value of a computer-file input generated by the generative AI model based on the set of one or more data records indicating the data category.
3. The method of claim 1, wherein the computer executes the generative AI model to generate an updated computer-file form in response to receiving one or more updated data records for the plurality of data records associated with the customer.
4. The method of claim 1, wherein the generative AI model includes a large language model (LLM) for generating the one or more computer-form inputs and the computer-form file, and a retrieval-augmented generation model (RAG) for retrieving external reference data from a knowledge database according to the data category for the LLM to generate the one or more computer-form inputs.
5. The method of claim 4, wherein retrieving the external reference data includes retrieving, by the computer executing the RAG of the generative AI model, a reporting requirement corresponding to the data category.
6. The method of claim 4, wherein generating the one or more computer-form inputs for the computer-form file includes generating, by the computer executing the generative AI model, the one or more computer-form inputs based on a semantic comparison between the set of one or more data records and the external reference data retrieved by the RAG.
7. The method of claim 4, wherein the RAG retrieves the external reference data based on the data category indicated by the set of one or more data records and at least one jurisdiction associated with the customer.
8. The method of claim 4, wherein the RAG retrieves updated external reference data in response to a new jurisdictional reporting requirement in the knowledge database, and wherein the generative AI model generates an updated computer-file form according to the updated external reference data.
9. The method of claim 1, wherein the plurality of data records includes a deposit record received from a user device, the deposit record includes at least one of an image of an input document, textual data extracted from the input document, or metadata associated with the input document.
10. The method of claim 9, further comprising:
- detecting, by the computer, an error in the deposit record, the error comprising at least one of an image quality error, a missing or incorrect field extracted from the input document, a misclassification of a type of the input document, or a discrepancy between extracted data and an expected data format;
- generating, by the computer executing the generative AI model, a correction for the error based upon the deposit record and one or more correction rules; and
- updating, by the computer executing the generative AI model, the deposit record according to the correction, in response to determining that a confidence score associated with the correction satisfies a threshold.
11. A system for generating computer-form files using a generative artificial intelligence (AI) model architecture, the system comprising:
- a processor; and
- a non-transitory, computer-readable medium comprising instructions which, when executed by the processor, cause the processor to: at a preconfigured time interval: obtain raw data containing a plurality of data records associated with a customer from a plurality of databases; determine a data category indicated by a set of one or more data records, the data category mapped to a computer-form file and at least one type of data field of the set of one or more data records; for the computer-form file corresponding to the data category, generate, by executing a generative AI model, one or more computer-form inputs for the computer-form file using the set of one or more data records indicating the data category; and generate, by executing the generative AI model, the computer-form file corresponding to the data category using the one or more computer-form inputs generated for the computer-form file.
12. The system of claim 11, wherein the instructions further cause the processor to execute the generative AI model to populate one or more fields of the computer-form file using a text or value of a computer-form input generated by the generative AI model based on the set of one or more data records indicating the data category.
13. The system of claim 11, wherein the instructions further cause the processor to execute the generative AI model to generate an updated computer-form file in response to receiving one or more updated data records for the plurality of data records associated with the customer.
14. The system of claim 11, wherein the generative AI model includes a large language model (LLM) for generating the one or more computer-form inputs and the computer-form file, and a retrieval-augmented generation model (RAG) for retrieving external reference data from a knowledge database according to the data category for the LLM to generate the one or more computer-form inputs.
15. The system of claim 14, wherein the instructions cause the processor to retrieve the external reference data executing the RAG of the generative AI model to retrieve a reporting requirement corresponding to the data category.
16. The system of claim 14, wherein the instructions cause the processor to generate the one or more computer-form inputs for the computer-form file by executing the generative AI model to generate the one or more computer-form inputs based on a semantic comparison between the set of one or more data records and the external reference data retrieved by the RAG.
17. The system of claim 14, wherein the instructions cause the processor to retrieve, via the RAG, the external reference data based on the data category indicated by the set of one or more data records and at least one jurisdiction associated with the customer.
18. The system of claim 14, wherein the instructions cause the processor to retrieve, using the RAG, updated external reference data in response to a new jurisdictional reporting requirement in the knowledge database, and to generate, using the generative AI model, an updated computer-form file according to the updated external reference data.
19. The system of claim 14, wherein the plurality of data records includes a deposit record received from a user device, the deposit record includes at least one of an image of an input document, textual data extracted from the input document, or metadata associated with the input document.
20. The system of claim 19, wherein the instructions cause the processor to:
- detect an error in the deposit record, the error comprising at least one of an image quality error, a missing or incorrect field extracted from the input document, a misclassification of a type of the input document, or a discrepancy between extracted data and an expected data format;
- generate, using the generative AI model, a correction for the error based upon the deposit record and one or more correction rules; and
- update, using the generative AI model, the deposit record according to the correction, in response to determining that a confidence score associated with the correction satisfies a threshold.
Type: Application
Filed: May 21, 2026
Publication Date: Nov 26, 2026
Applicant: Citigroup Technology, Inc. (New York, NY)
Inventors: Yogesh ABHYANKAR (Kilchberg), Manojkumar Mahantappa PARAGOND (Glattbrugg), Miriam SILVER (Tel Aviv)
Application Number: 19/684,886