Systems and methods for generating instruction fine-tuning dataset for a general purpose embedding model
Abstract
An example method includes providing, to a sequence model (i) a plurality of few-shot prompts, wherein each prompt comprises a demonstration passage, a demonstration task, and a demonstration query, wherein the demonstration task describes a type of retrieval, and wherein the demonstration query is relevant to the demonstration task, and (ii) a plurality of passages sampled from a corpus of passages. The method also includes receiving, from the sequence model and for the plurality of passages and based on the plurality of few-shot prompts, a respective plurality of predicted task-query pairs, the sequence model having been prompted to predict a task based on an input passage, and predict an output query relevant to the predicted task. The method further includes generating a synthetic training dataset comprising the plurality of passages and the respective plurality of predicted task-query pairs. The method also includes providing the synthetic training dataset.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 16 · Forward citations: 0.
Claims (8)
- Claim 1Independent Claim
A computer-implemented method for generating a synthetic training dataset to fine-tune an embedding model, comprising: providing, by a processor, to a sequence model (i) a plurality of few-shot prompts, wherein each prompt comprises a demonstration passage, a demonstration task, and a demonstration query, wherein the demonstration task describes a type of retrieval, and wherein the sequence model has been trained to align the demonstration query with the demonstration task, and (ii) a plurality of passages sampled from a corpus of passages; receiving, by the processor, from the sequence model and for the plurality of passages and based on the plurality of few-shot prompts, a respective plurality of predicted task-query pairs, by automatically prompting the sequence model to select a retrieval task type from a plurality of retrieval task types based on an input passage to predict a task based on the input passage, and predict an output query for the predicted task; generating, by the pr
- Claim 2Depends on #1
The computer-implemented method of claim 1, further comprising: providing the plurality of predicted task-query pairs to a passage retrieval model, the passage retrieval model having been trained to output, for a given predicted task-query pair, respective one or more nearest neighbor passages of the corpus of passages.
- Claim 3Depends on #2
The computer-implemented method of claim 2, further comprising: receiving, from the passage retrieval model and for the plurality of predicted task-query pairs, the respective one or more nearest neighbor passages; providing, to a second sequence model, the plurality of predicted task-query pairs, and the respective one or more nearest neighbor passages; receiving, from the second sequence model and for each predicted passage of the one or more predicted nearest neighbor passages, an associated relevance score indicative of a relevance of the predicted passage to a predicted query; classifying, for each task-query pair of the plurality of predicted task-query pairs and based on associated relevance scores, the one or more nearest neighbor passages into a first collection of positive passages and a second collection of negative passages, wherein a positive passage is indicative of a high relevance to a predicted query, and wherein a negative passage is indicative of a low relevance to t
- Claim 4Depends on #3
The computer-implemented method of claim 3, wherein the classifying further comprises: applying one or more few-shot prompted ranking functions.
- Claim 5Depends on #4
The computer-implemented method of claim 4, wherein the one or more few-shot prompted ranking functions comprise query likelihood or relevance classification.
- Claim 6Depends on #3
The computer-implemented method of claim 3, further comprising: providing, to an embedding model, each task-query pair, the respective first collection of positive passages, and the respective second collection of negative passages; and causing the embedding model to be trained to embed a given input task-query pair near positive passages and away from negative passages.
- Claim 7Depends on #6
The computer-implemented method of claim 6, wherein the embedding model is a dual encoder comprising a query tower and a document tower, wherein the query tower is trained to embed the task-query pair, and wherein the document tower is trained to embed the positive passages and negative passages.
- Claim 8Depends on #7
The computer-implemented method of claim 7, wherein a subplurality of the plurality of passages comprise a respective title, and wherein the document tower is trained to embed the respective title.
Technical Overview & Description
CROSS REFERENCE TO RELATED APPLICATIONS This application claims priority to U.S. Provisional Patent Application No. 63/517,795, filed on Aug. 4, 2023, which is hereby incorporated by reference in its entirety. BACKGROUND Many modern machine learning models utilize embedding models. For example, embedding models are used by several natural language processing (NLP) applications, such as information retrieval, text similarity, classification, and clustering. SUMMARY Text embedding models represent natural language as dense vectors, positioning semantically similar text near each other within the embedding space. These embeddings are commonly used for a wide range of downstream tasks including document retrieval, sentence similarity, classification, and clustering. Instead of building separate embedding models for each downstream task, various approaches seek to create a single embedding model supporting many tasks. Such general-purpose text embedding models rely on large amounts of training data to comprehensively cover desired domains and skills. Some embedding efforts have focused on using extensive collections of training examples. State-of-the-art embedding models rely on supervised training data. However, such supervised datasets may be limited in their diversity and/or quality, and may not be compliant with existing privacy and/or data protection standards. Large language models (LLMs) can offer a viable alternative, as they contain vast knowledge across various domains and are known to be exceptional few-shot learners. Some approaches demonstrate the effectiveness of using LLMs for synthetic data generation, but the focus of such approaches has primarily been on augmenting existing human-labeled data and/or on improving performance in specific domains. As described herein, a large, high-quality, and substantially compliant (e.g., legally, ethically, etc.) dataset for instruction-tuning embedding models is provided, through synthetic data generation from large l
Cited By — Indexed Forward Citations (0 of 0 total)
No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.
References Cited — Backward Prior Art (16)
Non-Patent Literature (10)
- Schmaltz et al., Article:Coarse-to-Fine Memory Matching for Joint Retrieval and Classification, arxiv.org, arXiv:2012.02287 [cs.IR], https://doi.org/10.48550/arXiv.2012.02287; From: Allen Schmaltz Sun, Nov. 29, 2020 (Year: 2020).
- Schmaltz et al., Article:
- “
- Coarse-to-Fine Memory Matching for Joint Retrieval and Classification
- ”
- , arxiv.org, arXiv:2012.02287 [cs.IR] , https://doi.org/10.48550/arXiv.2012.02287; From: Allen Schmaltz Sun, Nov. 29, 2020 05:06:03 UTC (Year: 2020).
- Samarinas et al., Article:
- â
- Latent Retrieval for Large-Scale Fact-Checking and Question Answering with NLI training
- â