text
stringlengths
2
6.93k
system_prompt
stringclasses
1 value
# arXiv:2401.15391v1 [cs.CL] 27 Jan 2024 MultiHop-RAG: Benchmarking Retrieval-Augmented Generation for Multi-Hop Queries Yixuan Tang and Yi Yang Hong Kong University of Science and Technology {yixuantang,imyiyang}@ust.hk Abstract Retrieval-augmented generation (RAG) augments large language models (LLM) by retrieving relevant knowledge, showing promising potential in mitigating LLM hallucinations and enhancing response quality, thereby facilitating the great adoption of LLMs in practice. However, we find that existing RAG systems are inadequate in answering multi-hop queries, which require retrieving and reasoning over multiple pieces of supporting evidence. Furthermore, to our knowledge, no existing RAG benchmarking dataset focuses on multi-hop queries. In this paper, we develop a novel dataset, MultiHop-RAG, which consists of a knowledge base, a large collection of multi-hop queries, their ground-truth answers, and the associated supporting evidence. We detail the procedure of building the dataset, utilizing an English news article dataset as the underlying RAG knowledge base. We demonstrate the benchmarking utility of MultiHop-RAG in two experiments. The first experiment compares different embedding models for retrieving evidence for multi-hop queries. In the second experiment, we examine the capabilities of various state-of-the-art LLMs, including GPT-4, PaLM, and Llama2-70B, in reasoning and answering multi-hop queries given the evidence. Both experiments reveal that existing RAG methods perform unsatisfactorily in retrieving and answering multi-hop queries. We hope MultiHop-RAG will be a valuable resource for the community in developing effective RAG systems, thereby facilitating greater adoption of LLMs in practice. The MultiHop-RAG and implemented RAG system is publicly available at https://github.com/yixuantt/MultiHop-RAG/. # Introduction The emergence of large language models (LLMs), such as ChatGPT, has fostered a wide range of innovations, powering intelligent chatbots and other natural language processing (NLP) applications (OpenAI, 2023). One promising use case is Retrieval-Augmented Generation (RAG) (Asai et al., 2023), which optimizes the output of a large language model by referencing an external knowledge base outside of the LLM training data sources before generating a response. RAG improves LLM’s response (Borgeaud et al., 2022) and also mitigates the occurrence of hallucinations, thereby enhancing the models’ credibility (Gao et al., 2023). LLM-based frameworks, such as LlamaIndex (Liu, 2022) and LangChain (Chase, 2022), specialize in supporting RAG pipelines. In real-world Retrieval-Augmented Generation (RAG) applications, a user’s query often necessitates retrieving and reasoning over evidence from multiple documents, a process known as multi-hop query. For instance, consider financial analysis using a database of financial reports.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
A financial analyst might query, "Which company among Google, Apple, and Nvidia reported the largest profit margins in their third-quarter reports for 2023?" or inquire about a specific company’s performance over time, such as "How does Apple’s sales trend look over the past three years?" These queries require evidence from multiple documents to formulate an answer. Due to the multifaceted nature of such queries, involving information from various sources, traditional similarity matching methods like cosine similarity between query and financial data may not be sufficient. Figure 1: RAG with multi-hop query.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
Step 4: Query and Answer Generation. In this step, we leverage the bridge-entity or bridge-topic to generate multi-hop queries. Specifically, we first group the claims having the same bridge-entity or
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
Published as a Tiny Paper at ICLR 2024 # APPENDIX A The prompts used for the LLM in our experiments are as follows: - System Prompt: Answer the questions based on the paragraphs provided here. DO NOT use any other information except that in the paragraphs.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
The 2nd FutureDial challenge focuses on building dialog systems with RAG, with the following features: - We release a new dataset from the China Mobile customer-service logs (MobileCS2) that contains both labeled and unlabeled data, which encourages the study of semi-supervised RAG-based dialog systems.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# Version 1.0 (April 29, 2024) The dataset enables the study of building dialog systems with knowledge base queries and API calls. The dataset is available in both Chinese and English versions to the public, so that researchers around the world can experiment with this dataset. To enable a RAG-based dialog system to provide appropriate answers and services to users, it is essential for the system to utilize knowledge relevant to the conversation context. Therefore the 2nd challenge examines how dialog systems can retrieve the most appropriate knowledge pieces from the knowledge base and generate grounded and faithful response to user requests, with the newly released knowledge-grounded dialog dataset, MobileCS2. The information needed should be retrieved from a given database or API call, which returns specific feedback closely related to real customer service scenarios, such as bill inquiry and package change. Accordingly, the following two tracks are proposed, which are related to the information retrieval of dialog data and the construction of RAG-based dialog systems in the customer service scenario respectively: - Track 1: Information retrieval based on knowledge bases and dialog context - Track 2: Dialog systems with retrieval augmented generation Given the context in a dialog, the most relevant knowledge snippet in the multi-source databases should be retrieved by a retrieval model. So Track 1 aims to build the retrieval model for the dialog system. Based on retrieved knowledge, Track 2 aims to build a retrieval-augmented dialog system in the customer service scenario. The system should generate informative responses leveraging the retrieved results.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
Offline corpus-based evaluation will be conducted to test the performance of the submitted system. # THE MOBILECS2 DATASET The MobileCS2 dataset is derived from the China Mobile real-world conversational scenarios and comprises around 6,000 processed dialog logs (nearly 3,000 carefully annotated) between customers and customer service staffs. It can serve for research aims such as the development of conversational models, colloquial human-to-human dialog systems, and data-driven systematic dialog analysis.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# ANNOTATION DETAILS In the customer service scenario, there are some knowledge or information that the customer service agent needs to get from knowledge bases (KBs) in order to correctly respond to the user. Therefore, to annotate the necessary knowledge or information, the annotators should imagine themselves as customer service agents. When presented with a dialog, annotators are required to identify the agent’s intent at each turn. If the intent is to query the KBs to seek external information and the response contains specific details, the annotator should perform a retrospective analysis based on the information provided in the response and annotate the corresponding query result. Specifically, Table 1 contains the set of intents (annotated as Api query) and the explanations of each intent, which are provided to annotators for their reference during the annotation process. For example, given the dialog “Help me check my package”, the annotator needs to identify the intent “Search for user information” and then annotate the package that appears in the customer service’s response into the query result. We recruited 6 China Mobile customer service staffs for the annotation, which are divided into 2 teams. The annotation is conducted dialog by dialog, and the labeling task for one dialog is assigned to an arbitrary annotator, and the annotation process takes about a week. To ensure the quality of the dataset, cross-validation is conducted between the 2 teams, and 100 annotated dialogs are checked by the other team everyday. The cross-validation agreement rate is 97 percent, which shows the dataset is of high quality. After annotation, the dataset is desensitized to remove sensitive personal information like individual names, ids, and phone numbers. In the final dataset, each sample in the dataset represents a dialog. At each turn of the dialog, there are two types of information to be annotated: customer service intent and customer service query results. An example of the annotated data dialog data is shown in Figure 2.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# Version 1.0 (April 29, 2024) **Table 1: Detailed description for Api query annotation. The Chinese version can be seen in Appendix.** |Main class|Api query|Description| |---|---|---| |QA|[QA]|Consult the FAQ manual, which includes a collection of commonly asked questions such as recent promotional packages and general business regulations.| |NULL|-|Based on the contextual information, customer service personnel can successfully complete the conversation without the need for additional inquiries.| | |Search for products information|Inquire about the current business information of the China Mobile, such as specific packages, data plans, etc.| | |Search for user information|Inquire about the services that the user currently possesses, including the current package, current monthly fee, and current data usage.| | |Search for other information|Inquire about other key information used to complete the dialog. For example, inquiring about text messages regarding excessive data usage alerts sent by the China Mobile 10086 in the historical trajectory, querying the address of the business hall, etc.| |API-Cancel|Cancel business|Revoke a certain service currently possessed by the user.| |API-Handle|Handle business|Process a new service for the user.| |API-Verification|Verify identity|Send verification codes, passwords, or other related customer service verification operations to the user.| # 4.2 POST-PROCESSING Based on the annotation data, it is possible to aggregate the information in the dataset and simulate the information that the agents can access in real-world services. For turns annotated with the inquiry [QA], the information can be aggregated into an FAQ (Frequently Asked Questions) handbook across the entire dataset.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
Turns labeled as “Search for user information” can be consolidated into a user database (local kb) within a single dialog. Meanwhile, turns labeled as “search for products information” can be aggregated into a product database (global kb) across the entire dataset. These three databases largely emulate the channels through which the agents acquire knowledge in real-world settings. # 5 THE BASELINE SYSTEM AND METRICS # 5.1 THE BASELINE SYSTEM We use RAG-based (Lewis et al., 2020; Cai et al., 2023) methods to build our baseline system. RAG-based dialog systems aim to retrieve relevant knowledge pieces given the dialog context and generate system response using the retrieved knowledge. For MobileCS2, we take into consideration various important settings, such as adding the unique user profile for each user to the knowledge base and considering multiple relevant knowledge pieces useful given context. RAG over MobilleCS2 is for
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# Version 1.0 (April 29, 2024) 'log": 'systemManual" _ user" 'The seasons are changing; but our deep affection remains the same: Meeting you is the most beautiful moment: If there is anything can assist you with, please feel free to tell me: 'api_query" 'api_result"= user" "Is my current package discounted? customized package, which is composed of an internet data package and 'system Dear customer, you have chosen voice call package. You need to choose one of each: Currently, it is package at |uOOa58C and 5G Unlimited Customized Data Package at |u0Oa5120. Package name: Upgrade to 5G Unlimited combination package of 4G customized voice call Customized Data 120lu00a5 (Direct Discount of SOluOOa5) with application period of months. Start Time: [Start Time]; End Time: [End Time]. You have participated in an offer with discount of SOluOOa5, dear: 'api_query' search for user information Business Name: Upgrade to 5G and enjoy self-selected data for 120 yuan (direct reduction of 50 yuan) for 'api_result' months: Application time: [Start Time], Start time: [Start Time], End time: [End Time], Promotion discount of 50 yuan: user' "Do have to cancel by myself when it expires?- expiration date: You will need to cancel it through the APP or contact customer service to cancel: 'system Yes; you will receive text message reminder before the 'api_query' 'api_result' "local kb" Application time: [Start Time] Start time: [Start Time], End time: [End Time] Promotion discount of 50 yuan_months: Business Name: Upgrade to 5G and enjoy self-selected data for 120 yuan (direct reduction of 50 yuan) for Business Name: Y1.35/month for 1SGB dedicated data package (choose one from: 1SGB Headlines and TikTok package, Y1.35 Kuaishou data package, Tencent Video SGB on-demand package, Youku Video data package Y1.35 level, Baidu iQIYI data package discounted to YO.15; In 3Y1.35 level); Inz. The duration of the agreement for the event is 6 months, with text message reminder will be sent upon expiration of the event; the dedicated data package will monthly package fee be retained and restore to the standard tariff: Figure 2: An example of annotated dialogs. The Chinese version can be seen in Appendix. real-life scenarios, which is different from prior work in knowledge grounded dialog systems (Lewis et al., 2020; Cai et al., 2023). To introduce the RAG-based baseline system on MobileCS2, we make the following definitions. Assume we have a dialog X with T turns of user utterances and system responses, denoted by u1, r1, · · · , uT , rT respectively. For each dialog, we assume that there is a knowledge base that is necessary for the system to respond correctly. In MobileCS2, the knowledge base is made up of the user information, which is unique for each dialog, the product information list, and the FAQ list for commonly asked questions. Therefore, for the dialog X, the knowledge base KBX can be denoted as: KBX ≜ KBuser ∪ KBF AQ ∪ KBproduct. At turn t of a dialog X, based on dialog context ct ≜ u1 ⊕ r1 ⊕ · · · ⊕ ut−1 ⊕ rt−1 ⊕ ut (⊕ means sequence concatenation) and the knowledge base KBX, the system uses a retriever to get the relevant knowledge ht from the knowledge base and generates appropriate responses with the generator pθ (rt | ct, ht). To train the retrieval model, we consider each knowledge piece zi (i = 1, 2, · · · , K) in KBX and model the retrieval distribution of pη (zi | ct) as in (Lewis et al., 2020): pη (zi | ct) ∝ exp (Encoderp(zi)⊤ Encoderc(ct) (1) Encoderp and Encoderc are both initialized with a BERT-based pretrained model (Devlin et al., 2019). The probability is optimized with the standard cross entropy loss, with the positive pieces z ∈ Z+ labeled in the dataset: 1 X pη (z | ct) + pη KP(z | ct)z pη (zi | ct) Lret = −| Z+ | z∈Z+ log i=1,zi ̸= (2) The knowledge piece encoder Encoderp is fixed during the training, and the context encoder Encoderc is trained with the loss in Eq. 2, following the setting in Karpukhin et al.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
(2020).
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# Version 1.0 (April 29, 2024) To train the dialog system pθ (rt | ct, ht), we use the standard auto-regressive loss to optimize the generation probability initialized : pθ (rt | ct, h) = Π |pθ (yl | ct, h, y1, . .
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
. , yl−1)|rt where | · | denotes the length in tokens, and yl the l-th token of rt and pθ is initialized with a GPT-based pretrained language model (Radford et al., 2019). # 5.2 METRICS AND EVALUATION Given a dialog X and its knowledge base KBX , the retrieval system needs to rank the relevance score for each knowledge piece in the KBX . We use the commonly used recall metrics to assess the retrieval system. To get the recall@k metrics, we calculate whether the ground-truth knowledge piece is in the top-k retrieved knowledge pieces. To comprehensively evaluate the retrieval quality of the system, we calculate the sum of the recall for k = 1, 5, 20 as the final score: scoreretriever = recall@1 + recall@5 + recall@20. To generate the suitable system response, relevant knowledge pieces are first retrieved using the retrieval system. Given the retrieved knowledge pieces, the generator can generate response based on the retrieved knowledge. The generated response is evaluated by measuring the similarity score with the ground-truth response (BLEU and BERTScore) and whether the system correctly provides the requested information by the user (Inform Rate). BLEU is used to measure the fluency of the generated responses by analyzing the amount of n-gram overlap between the real responses and the generated responses. BERTScore (Zhang et al., 2019) is used to measure the semantic similarity of the generated responses with the oracle responses by using a pretrained BERT model. Inform Rate refers to how often the system response is able to cover the requested information by the user. The final score of the generator is computed as scoregenerator = 0.5 ∗ (BLEU + BERT Score) + Inform. # 6 CHALLENGE RULES |The challenge website is|http://futuredial.org/.| |---|---| |Teams should submit the registration form to|FutureDialRAG@gmail.com,| |which will be reviewed by the organizers.| | |Teams are required to sign an Agreement for Challenge Participation and Data Usage.|Data will be provided to approved teams.| |For teams that participate in Track 1, the scores will be ranked according to the performance for Track 1.|The teams can choose to participate only in Track 1.| |For teams that participate in Track 2, they can use the baseline system provided by the organizers or use the system developed by themselves for Track 1.|The ranking is based on the performance for Track 2.| |Participants need to strictly follow the Submission Guidelines as described below.|Participants are allowed to use any external (publicly available) or internal (proprietary) datasets, resources and pre-trained models,| |The evaluation data will not be released to the teams for their own evaluation.|The organizers will run the submitted systems for evaluation. The evaluation data will be shared with the eligible teams after evaluation results are announced. Only teams who strictly follow the Submission Guidelines are viewed as eligible.| |In publishing the results, all teams will be identified as team IDs (e.g. team1, team2, etc).|The organizers will verbally indicate the identities of all teams at the Workshop for communicating results. Participants may identify their own team label (e.g. team5) and report their own result, in publications or presentations, if they desire.|
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
Keep the answers as short as possible. JUST GIVE THE ANSWER. NO PREAMBLE REQUIRED. - User Prompt: “PARAGRAPHS : ”+context + “QUESTIONS: ” + query # APPENDIX B | |0-50|50-100|100-150|150->00| |---|---|---|---|---| |0-50|50-100|50-100|50-100|50-100 vs 150-200| |50-100|50-100|50-100|50-100|50-100 vs 150-200| |100-150|50-100|100-150|100-150|100-150 vs 150-200| |150-200|150-200|150-200|150-200|150-200 vs 150-200| Figure 1: The distribution of similarities across 10974 documents of various sizes split by number of words in the document # APPENDIX C - SUPPLEMENTARY MATERIAL We provide an anonymized Git repository which contains - Anonymized source code - Experiment v/s hypothesis tabulation (for consolidated quantitative results) - Details of the experiments across 42 queries and 7 hypothesis In addition, we provide details with respect to hypotheses in Table 1 by providing sample queries and the retrieved and generated results.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# SUBMISSION GUIDELINES Each team needs to submit a package via email to FutureDialRAG@gmail.com before the Entry Submission Deadline. The package should contain a clear README documentation for running the system over the evaluation data.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
The submitted system should be in one of the following two forms. In either form, the system’s processing speed should be no less than 10 tokens per second. - The submission package contains the system executable with the model, for example, in a Docker image. All dependencies are contained in the submission package. The organizers run the system over a server with Nvidia A100*4 hardware, evaluate, and calculate the running time over the evaluation data. - The system is encapsulated as a callable web service. The organizers will run the script submitted by the team, call the web service to evaluate, and calculate the running time over the evaluation data. The submission should provide a System Description Document (SDD), introducing the submitted system. Teams are also encouraged to submit papers to SLT 2024. See important dates and instructions at SLT 2024 website https://2024.ieeeslt.org/. Before the Entry Submission Deadline, each team can submit for multiple times for each track. The last entry from each team will be used for the evaluation. # IMPORTANT DATES - April 9, 2024: Registration opening for the challenge - April 29, 2024: Training data release - June 10, 2024: Entry submission deadline - June 20, 2024: Evaluation results announced - June 20, 2024: SLT paper submission deadline - June 27, 2024: SLT paper update deadline - August 30, 2024: Notification of paper acceptance - December 2-5, 2024: SLT 2024 Workshop Date (in-person) # REFERENCES |Josh Achiam, Steven Adler, Sandhini Agarwal, Lama Ahmad, Ilge Akkaya, Florencia Leoni Aleman, Diogo Almeida, Janko Altenschmidt, Sam Altman, Shyamal Anadkat, et al.|GPT-4 technical report. arXiv preprint arXiv:2303.08774, 2023.| |---|---| |Hussam Alkaissi and Samy I McFarlane.|Artificial hallucinations in ChatGPT: Implications in scientific writing, 2023.| |Paweł Budzianowski, Tsung-Hsien Wen, Bo-Hsiang Tseng, Inigo Casanueva, Stefan Ultes, Osman Ramadan, and Milica Gaˇsi´c.|Multiwoz–a large-scale multi-domain wizard-of-oz dataset for task-oriented dialogue modelling. arXiv preprint arXiv:1810.00278, 2018.| |Yucheng Cai, Hong Liu, Zhijian Ou, Yi Huang, and Junlan Feng.|Advancing semi-supervised task oriented dialog systems by JSA learning of discrete latent variable models. In Proceedings of the 23rd Annual Meeting of the Special Interest Group on Discourse and Dialogue, pp. 456–467, 2022.| |Yucheng Cai, Hong Liu, Zhijian Ou, Yi Huang, and Junlan Feng.|Knowledge-retrieval task-oriented dialog systems with semi-supervision. In INTERSPEECH, 2023.| |Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova.|Bert: Pre-training of deep bidirectional transformers for language understanding. In Proc. of the Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, 2019.|
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# Version 1.0 (April 29, 2024) Michael Glass, Gaetano Rossiello, Md Faisal Mahbub Chowdhury, Ankita Naik, Pengshan Cai, and Alfio Gliozzo. Re2g: Retrieve, rerank, generate. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pp.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
2701–2715, 2022. Kelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat, and Ming-Wei Chang. Realm: retrieval-augmented language model pre-training. In Proceedings of the 37th International Conference on Machine Learning, pp. 3929–3938, 2020. Samuel Humeau, Kurt Shuster, Marie-Anne Lachaux, and Jason Weston. Poly-encoders: Architectures and pre-training strategies for fast and accurate multi-sentence scoring. In International Conference on Learning Representations, 2020. Gautier Izacard and ´Edouard Grave. Leveraging passage retrieval with generative models for open domain question answering. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pp. 874–880, 2021. Gautier Izacard, Mathilde Caron, Lucas Hosseini, Sebastian Riedel, Piotr Bojanowski, Armand Joulin, and Edouard Grave. Unsupervised dense information retrieval with contrastive learning. Transactions on Machine Learning Research, 2022a. Gautier Izacard, Patrick Lewis, Maria Lomeli, Lucas Hosseini, Fabio Petroni, Timo Schick, Jane Dwivedi-Yu, Armand Joulin, Sebastian Riedel, and Edouard Grave. Few-shot learning with retrieval augmented language models. arXiv e-prints, pp.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
arXiv–2208, 2022b.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
Vladimir Karpukhin, Barlas Oguz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen-tau Yih. Dense passage retrieval for open-domain question answering. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 6769–6781, 2020. Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich K¨uttler, Mike Lewis, Wen-tau Yih, Tim Rockt¨aschel, et al. Retrieval-augmented generation for knowledge-intensive nlp tasks. Advances in Neural Information Processing Systems, 33: 9459–9474, 2020. Hong Liu, Yucheng Cai, Zhijian Ou, Yi Huang, and Junlan Feng. Building Markovian generative architectures over pretrained LM backbones for efficient task-oriented dialog systems. In IEEE Spoken Language Technology Workshop, 2022a. Hong Liu, Hao Peng, Zhijian Ou, Juanzi Li, Yi Huang, and Junlan Feng. Information extraction and human-robot dialogue towards real-life tasks: A baseline study with the mobilecs dataset. In EMNLP 2022 SereTOD Workshop, 2022b. Hong Liu, Yucheng Cai, Zhenru Lin, Zhijian Ou, Yi Huang, and Junlan Feng. Variational latent-state GPT for semi-supervised task-oriented dialog systems. IEEE/ACM Transactions on Audio, Speech, and Language Processing, 2023. Zhijian Ou, Junlan Feng, and Juanzi Li. Proceedings of the towards semi-supervised and reinforced task-oriented dialog systems (seretod). In Proceedings of the Towards Semi-Supervised and Reinforced Task-Oriented Dialog Systems (SereTOD), 2022a. Zhijian Ou, Junlan Feng, Juanzi Li, Yakun Li, Hong Liu, Hao Peng, Yi Huang, and Jiangjiang Zhao. A challenge on semi-supervised and reinforced task-oriented dialog systems. arXiv preprint arXiv:2207.02657, 2022b. Long Ouyang, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, et al. Training language models to follow instructions with human feedback. arXiv preprint arXiv:2203.02155, 2022. Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. OpenAI Blog, 1(8):9, 2019.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# Version 1.0 (April 29, 2024) |Timo Schick, Jane Dwivedi-Yu, Roberto Dessi, Roberta Raileanu, Maria Lomeli, Eric Hambro, Luke Zettlemoyer, Nicola Cancedda, and Thomas Scialom.|Toolformer: Language models can teach themselves to use tools. In Thirty-seventh Conference on Neural Information Processing Systems, 2023.| |---|---| |Kurt Shuster, Mojtaba Komeili, Leonard Adolphs, Stephen Roller, Arthur Szlam, and Jason Weston.|Language models that seek for knowledge: Modular search & generation for dialogue and prompt completion. arXiv preprint arXiv:2203.13224, 2022a.| |Kurt Shuster, Jing Xu, Mojtaba Komeili, Da Ju, Eric Michael Smith, Stephen Roller, Megan Ung, Moya Chen, Kushal Arora, Joshua Lane, et al.|Blenderbot 3: a deployed conversational agent that continually learns to responsibly engage. arXiv preprint arXiv:2208.03188, 2022b.| |Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, and Yuan Cao.|React: Synergizing reasoning and acting in language models. In International Conference on Learning Representations (ICLR), 2023.| |Tianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q Weinberger, and Yoav Artzi.|Bertscore: Evaluating text generation with bert. In International Conference on Learning Representations, 2019.| |Yichi Zhang, Zhijian Ou, Min Hu, and Junlan Feng.|A probabilistic end-to-end task-oriented dialog model with latent belief states towards semi-supervised learning.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
In Empirical Methods in Natural Language Processing (EMNLP), 2020.|
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# APPENDIX |主类|Api query|解释| |---|---|---| |QA类|[QA]|查询FAQ手册 包含一些常用问题 如最近优惠的套餐、普遍的业务规则等。| |置空类|-|根据上下文信息 客服人员无需进行额外的查询便能顺利的完成对话。| |查询特定业务信息|查询移动当前有的业务信息|如特定的套餐、流量包等。| |API-查询类|查询用户已办理的业务|查询用户当前已经拥有的业务 包括当前套餐、当前月租、当前流量等。| |查询其他信息|例如查询流量短信|查询其他用于完成对话的关键信息。比如查询历史轨迹中移动10086给用户发送的超出流量提醒短信、查询营业厅地址等| |API-取消类|取消|取消用户当前拥有的某个业务| |API-办理类|办理|为用户办理某个新的业务| |API-验证类|验证|向用户发送验证码、密码等相关的客服验证操作| Figure 3: An example of annotated Chinese dialogs.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# DomainRAG: A Chinese Benchmark for Evaluating Domain-specific Retrieval-Augmented Generation Shuting WangPeidong Guo2, Kun Fang1, Shiren Song, and Zhicheng Dou1∗1, Jiongnan Liu2, Yutao Zhu11, Jiehan Cheng1, Yuqi Fu1 1Gaoling School of Artificial Intelligence, Renmin University of China2Baichuan Intelligent Technology {wangshuting, liujn, dou}@ruc.edu.cn # Abstract Retrieval-Augmented Generation (RAG) offers a promising solution to address various limitations of Large Language Models (LLMs), such as hallucination and difficulties in keeping up with real-time updates. This approach is particularly critical in expert and domain-specific applications where LLMs struggle to cover expert knowledge. Therefore, evaluating RAG models in such scenarios is crucial, yet current studies often rely on general knowledge sources like Wikipedia to assess the models’ abilities in solving common-sense problems. In this paper, we evaluated LLMs by RAG settings in a domain-specific context, college enrollment. We identified six required abilities for RAG models, including the ability in conversational RAG, analyzing structural information, faithfulness to external knowledge, denoising, solving time-sensitive problems, and understanding multi-document interactions. Each ability has an associated dataset with shared corpora to evaluate the RAG models’ performance. We evaluated popular LLMs such as Llama, Baichuan, ChatGLM, and GPT models. Experimental results indicate that existing closed-book LLMs struggle with domain-specific questions, highlighting the need for RAG models to solve expert problems. Moreover, there is room for RAG models to improve their abilities in comprehending conversational history, analyzing structural information, denoising, processing multi-document interactions, and faithfulness in expert knowledge. We expect future studies could solve these problems better. # Introduction Recently, the emergence of large language models (LLMs) has revolutionized the way we access information. These LLMs are typically trained on vast amounts of web documents using the next token prediction task, which equips them with a wide range of world knowledge and advanced capabilities in understanding and generating natural language. However, despite these impressive attributes, they still face significant challenges, including hallucinations, difficulties in keeping up with real-time updates, etc (Chen et al., 2024). Retrieval-Augmented Generation (RAG), which involves retrieving external information from Information Retrieval (IR) systems to provide reliable knowledge, is a promising and widely adopted approach to overcome the above limitations. Furthermore, when deploying LLMs in practice, such as building question-answering systems for enterprises or some expert fields, it is more vital to provide domain-specific information for LLMs (Zhang et al., 2024) since they are likely unequipped with this expert knowledge.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
|ID|Query|Expected answer|Use full sentence|Use defined word|Use definition|Observations| |---|---|---|---|---|---|---| |1.|Explain EIRP|effective isotropic radiated power (EIRP): The equivalent power of a transmitted signal in terms of an isotropic (omnidirectional) radiator.|Effective isotropic radiated power (EIRP): The equivalent power of a transmitted signal in terms of an isotropic (omnidirectional) radiator. The EIRP equals the product of the transmitter power and the antenna gain (reduced by any coupling losses between the transmitter and antenna).|Effective isotropic radiated power (EIRP): The equivalent power of a transmitted signal in terms of an isotropic (omnidirectional) radiator. The EIRP equals the product of the transmitter power and the antenna gain (reduced by any coupling losses between the transmitter and antenna (0.669).|Effective isotropic radiated power (EIRP): The equivalent power of a transmitted signal in terms of an isotropic (omnidirectional) radiator. The EIRP equals the product of the transmitter power and the antenna gain (reduced by any coupling losses between the transmitter and antenna (0.478).|The retriever obtains the correct definition by all 3. Also keyword at beginning of sentence is picked up with high similarity in full sentence mode.| | | |Emergency alert system (EAS): A U.S. national public warning system. (0.372)|Emergency alert system (EAS): A U.S. national public warning system. (0.337)|IEEE 802.1X authentication', ' Extensible Authentication Protocol (EAP) authentication transported by the IEEE 802.1X protocol.| | | | | |Received channel power indicator (RCPI): An indication of the total channel power (signal, noise, and interference) of a received frame measured on the channel and at the antenna connector used to receive the frame. (0.362)|Extended service area (ESA): The area within which members of an extended service set (ESS) can communicate. An ESA is larger than or equal to a basic service area (BSA) and might involve several basic service sets (BSSs) in overlapping, disjointed, or both configurations. (0.322)|Master session key (MSK): Keying material that is derived between the Extensible Authentication Protocol (EAP) peer and exported by the EAP method to the Authentication Server (AS) (0.291)| | | |2|Why do we need a beam steering matrix|beamforming steering matrix: A matrix determined using knowledge of the channel between a transmitter and an intended receiver that maps from space-time streams to transmit antennas with the goal of improving the signal power or signal-to-noise ratio (SNR) at the intended receiver|beamformee: A station (STA) that receives a physical layer (PHY) protocol data unit (PPDU) that was transmitted using a beamforming steering matrix. (0.626)|beamforming: A spatial filtering mechanism used at a transmitter to improve the received signal power or signal-to-noise ratio (SNR) at an intended receiver. Syn beam steering. (0.745)|beamformer: A station (STA) that transmits a physical layer (PHY) protocol data unit (PPDU) using a beamforming steering matrix. (0.426)|The top-1 does not return the correct answer using the defined word.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
For example, consulting firm financial statements or data aggregation in the investment industry are all widely used scenarios of RAG systems. Nevertheless, due to the problem of data privacy, these corpora cannot be incorporated into the training data of LLM, hence RAG systems are needed to plug these data into the LLMs in the form of external knowledge. Thus, evaluating the performance of RAG in domain-specific scenarios becomes imperative. However, existing studies (Chen et al., 2024) predominantly rely on general knowledge sources, such as Wikipedia, as external knowledge bases to evaluate RAG models on dealing with commonsense or hot knowledge-intensive tasks (Kwiatkowski et al., 2019; Joshi et al., 2017; Yang et al., 2018; Petroni et al., 2021). Such a method may not fully evaluate the ability of RAG models to solve domain-specific problems. Therefore, the use of domain-specific corpora and questions is essential to assess the ability of the LLM to effectively use external knowledge from these specific fields to solve expert problems. In this paper, we identify six vital abilities to comprehensively evaluate RAG models, which are visualized in Figure 1, from three perspectives:
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# Understanding of User Intents In traditional web information retrieval methods, such as search engines, understanding the actual user intents has always been a crucial step and studied in the literature (Zhou et al., 2020; Yao et al., 2020; Wang et al., 2023a,b; Zhu et al., 2021; Chen et al., 2022; Wang et al., 2024; Liu et al., 2024a, 2022; Dai et al., 2023). Nowadays, LLMs demonstrate remarkable abilities in various natural language processing tasks. However, comprehending user information needs and providing accurate responses is a more intricate task, especially in conversational scenarios that require clarifying the current user intents based on previous interactions. As a result, the conversation ability is critical to building a user-friendly RAG system. # Analysis of Retrieved Documents Apart from understanding user questions, the analysis of external documents plays a critical role in RAG systems. Considering that web pages not only contain massive textual knowledge but also intricate structures, such as HTML structures, which may also contain valuable information.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
It is also important for LLMs to comprehend the structural information from the provided knowledge, hence providing accurate and reliable responses. Furthermore, the inherent difficulty for LLMs in acquiring in-domain knowledge underscores the importance of trusting external expert knowledge to bridge gaps in their perception. In other words, when faced with in-domain problems, it is more reliable for LLMs to answer questions based on external expert knowledge rather than relying on their own knowledge, which may be limited and prone to hallucination. Thus, assessing the faithfulness of LLMs on external expert knowledge is also an important task. # Interactions between Intents and Documents Given the provided external documents, LLMs must not only accurately comprehend the knowledge contained within them but also identify the relevant portions that contribute to solving the user’s current problem. Typically, not all provided information is useful for solving problems, as there may be a significant amount of noise that potentially hinders the prediction of accurate results. Thus, assessing denoising ability of RAG models is also critical. At the same time, this problem could be more distinct for time-sensitive questions, where the answers may change over time. Therefore, the RAG models’s ability to solve time-sensitive problems is another angle to evaluate their denoising abilities. Additionally, due to the complexity of user intents, answering some questions may require interactions between multiple documents and questions, highlighting the need for LLMs to effectively navigate and integrate information from various sources. As a result, we also propose to evaluate RAG models’ ability to understand the interaction between multi-documents and complex questions. # DomainRAG Dataset Specifically, we constructed a comprehensive dataset that evaluates the above abilities of RAG models in a domain-specific scenario, namely DomainRAG. The application scenario is the enrollment system of a university in China (with official permission).
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
In addition to an extractive QA dataset that assesses basic QA ability, we further annotated the following sub-datasets, each targeting a specific ability, i.e., conversational QA, structural QA, faithful QA, time-sensitive QA, noisy QA, and multi-document QA. Concretely, the conversational QA dataset simulates complex and realistic scenarios where users interact with models through multiple turns to fulfill their information needs. The structural QA is designed to test the ability of LLMs to understand and infer answers from structured information of external knowledge, and the faithful QA evaluates the faithfulness of LLMs in handling external knowledge. The left three sub-datasets assess the capabilities of LLMs in handling the complex interaction between questions and documents. The noisy QA involves providing external knowledge with noisy information, challenging LLMs to filter out irrelevant or misleading content. The time-sensitive QA introduces time-sensitive questions, where the answers may vary at different timestamps. Lastly, the multi-document QA requires LLMs to integrate information from multiple external documents to provide satisfactory answers to complex questions. In experiments, we evaluated seven popular LLMs, including Llama2-7B-chat, Llama2-13B-chat, Llama2-70B-chat, Baichuan2-7B-chat, Baichuan2-33B-32k, ChatGLM2-6B-32k, and GPT-3.5-turbo-1106. Generally, we find that (1) In domain-specific scenarios, most LLMs struggle to exactly answer the user questions without the aid of external knowledge. It highlights the importance of RAG models in such applications. (2) Leveraging HTML content is beneficial for LLMs to generate more accurate answers. However, the ability to comprehend and analyze structural information is crucial.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# What was the predecessor of the School of Arts? The predecessor of the College of Literature and Art was... # Which year was it founded? 1939 # References |Structural references|Ability to analyze structural information|Anti-Reference| |---|---|---| |669|60| | # What majors does the School of Philosophy offer? Reference with noise Ethics, religion,... # What is the opening line of Shandong Province in 2022? 80 # How many students will be enrolled in the 2016 "Dream Fulfillment Program"?
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
80 # What are the differences between Computer Science and AI?
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
Multiple references related to CS and AI. The differences are... # Who was the president in 2019? References The president in 2019 is... # Figure 1: Important abilities for RAG models. Formation is not yet well-developed in all LLMs. Therefore, when deploying RAG models in practice, it is crucial to choose an LLM suitable for the specific application needs. (3) There is a large room for RAG models to improve their performance in complex scenarios involving various kinds of information sources. In conversational scenarios, RAG models need to accurately understand the user’s intent based on historical information. In multi-doc QA, RAG models must comprehend the intricate relationships between multiple documents and questions. These challenges highlight the need for further investigation of high-quality RAG models. # Related Work # Retrieval-augmented Generation Models To alleviate the hallucination problem of language models, Retrieval-augmented generation (RAG) strategy (Gao et al., 2023; Zhu et al., 2023) is proposed by providing external references to LMs to help them provide more accurate and factual answers. In particular, RAG approaches usually devise a retrieval model to collect relevant documents or passages according to user queries from the corpus. Then, these retrieved references are fed together with the user queries into the downstream language models to generate answers. Traditional approaches (Guu et al., 2020; Lewis et al., 2020) in this area mainly focus on supporting language models with limited parameters such as BERT, BART, and T5. Recently, with the development of Large language models, more and more researchers have paid attention to improving the RAG performance based on large language models by considering the retrieval frequency (Lazaridou et al., 2022; Ram et al., 2023; Jiang et al., 2023; Liu et al., 2023), designing delicate CoTs (Yu et al., 2023; Trivedi et al., 2023), training the retrieval models and language models together (Asai et al., 2023; Lin et al., 2023), comprising the retrieved references to fit the input length limit (Arefeen et al., 2023; Xu et al., 2023; Li et al., 2024). Research (Ren et al., 2023) has shown that by incorporating the retrieved documents, RAG models do respond with few mistakes. # Evaluation of RAG Previous studies in the retrieval-augmented generation area mainly conduct experiments on open-domain QA datasets such NQ (Kwiatkowski et al., 2019) and HotpotQA(Yang et al., 2018) using Wikipedia as the retrieval corpus. Though this general evaluation setting can somehow reflect the quality of answers generated by the RAG models, it fails to analyze the abilities of these models from different perspectives such as intent understanding and faithfulness to the references. Besides, since Wikipedia is widely used in the pre-training of language models and the information in the retrieved documents may have been learned by LLMs, it is questionable whether RAG models really utilize the references to answer questions instead of their intrinsic knowledge. Recently, Chen et al. (Chen et al., 2024) alleviated this problem by proposing a specialized RAG benchmark to analyze the four disentangled fundamental abilities of different large language models. However, it still focuses on the open-domain QA, without considering the LLM’s
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
ability under in-domain situations. To thoroughly assess the abilities of RAG models, in this paper, we propose to leverage an in-domain document corpus collected from the enrollment websites of a Chinese university to evaluate the capabilities of RAG from multi-aspects. # 3 Evaluate Retrieval-Augmented Generation via In-domain Scenarios To avoid that the external knowledge has been studied well in pre-training or instruction tuning of LLMs, we focus on a domain-specific Chinese application scenario, i.e., college enrollment. This scenario primarily involves questions related to long-tail and domain-specific information such as admission introductions, admission policies, and details of schools or departments. Therefore, it is difficult for LLMs to rely solely on their internal knowledge to answer the user’s questions.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
Instead, they need to heavily depend on external knowledge resources. To comprehensively evaluate the aforementioned capabilities of RAG models, we annotated seven sub-datasets, and the corresponding data construction process is demonstrated below. # 3.1 Data Construction To acquire the document corpus for this scenario, we crawled web pages from the admission official website with official permission. We not only extracted their text contents but also reserved the original HTML contents to facilitate the construction of the structural QA dataset. Given the lengthy nature of web pages, we further split the text contents of each web page into passages using a sliding window of 256 length and 128 overlap. The numbers of web pages and passages are 1,686 and 14,406 respectively. Finally, we created two document corpora, a text corpus and an HTML corpus. The evaluation datasets are built by initially being generated from powerful generative models (ChatGPT or GPT-4), then being corrected manually. |Extractive QA Dataset| | |---|---| |We first randomly sampled document passages from the text corpus. These passages were then incorporated into the prompt designed for ChatGPT, which generated question-answer (QA) pairs based on the provided passages. To ensure the in-domain nature of questions, we specifically instructed ChatGPT to generate questions that cannot be answered without providing external information. The selected passages can be directly considered as positive references for the corresponding questions in the dataset.| | |Conversational QA Dataset| | |---|---| |To build question-answering conversations, we began by choosing documents with substantial content, primarily focusing on the introduction web pages of each school. We then utilized ChatGPT to generate domain-specific questions according to each passage within the selected documents. This process resulted in a collection of question-answer pairs associated with each document. To test the conversational intent understanding ability of RAG models, we simplified each question in the QA pair list (except the first one) by removing entities that duplicate the preceding questions. The revised QA list can be regarded as a vanilla conversation. Furthermore, we derived multiple conversation samples from a given vanilla one. Specifically, at the t-th step, the QAs from the previous t - 1 steps were considered as historical conversations, and the current t-step QA was treated as the question and the golden answer.| | |Structural QA Dataset| | |---|---| |To assess the understanding capabilities of RAG models on structural information (we focus on table structures in this paper), we first selected web pages containing table structures. Then, we offered the HTML contents of these web pages to ChatGPT and instructed it to generate QA pairs where the answers are derived from the table information. To accommodate the input length limits of ChatGPT, we preprocessed the HTML content by removing irrelevant elements, such as HTML comments, script tags, etc. For each QA pair, we provided both the HTML and corresponding pure text content of the positive document. This approach not only allows us to evaluate the models’ ability to analyze and comprehend HTML structures but also to compare the effectiveness of using HTML structural information versus pure texts for solving problems.| | |Faithful QA Dataset| | |---|---| |To test the faithfulness of LLMs to domain-specific knowledge, we first provided document contents to GPT4 and prompt it to generate QA pairs that rely solely on external expert knowledge, rather than common-sense information. This step is similar to the process used in creating the extractive QA dataset.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
Furthermore, to ensure the generation quality, we manually filtered out the QA pairs that could be answered using knowledge contained within LLMs themselves. Finally, we modify the answer-related information in the positive references to build anti-references and corresponding anti-answers.| |
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
The definition does not return it in top-3. The full definition returns it in 3rd position.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# Table 1: Overall results on the extractive, conversational, time-sensitive, and multi-doc datasets |Dataset|Count|Avg. Q Len|Avg. A Len| |---|---|---|---| |Extractive|90|25.09|8.17| |Conversational|49|16.65|35.66| |Structural|94|35.48|6.07| |Time-sensitive|65|21.38|4.67| |Multi-document|48|35.90|86.69| |Faithfulness|49|27.29|12.85 /11.80| Noisy QA Dataset. To evaluate LLMs’ robustness to noisy information in provided references, we expanded upon the extractive QA dataset to create the noisy dataset. Concretely, for each piece of data, we randomly sampled several irrelevant passages from the text corpus to construct noisy information. During the test experiments, we varied the number of irrelevant passages selected and combined them with positive references to build external references with different noise ratios. Time-sensitive QA Dataset. Since the dataset is static, it is difficult to evaluate the abilities of RAG in answering real-time questions. Inspired by (Dhingra et al., 2022), we focused on generating questions that have different answers at different timestamps. To indicate the timestamp of each question, we included a “date” attribute in each data sample. It is challenging for ChatGPT to automatically generate time-sensitive question-answer pairs that require rich prior domain knowledge. Therefore, we manually design possible questions and identify answerable document passages to build answers and positive references. Multi-doc QA Dataset. To address complex questions that cannot be fully answered by simply extracting information at the entity level, it becomes necessary to aggregate information from multiple relevant documents. To build a dataset that evaluates such ability, we follow a specific approach. First, we identified a set of relevant documents that share similar topics or themes, such as introductions to relevant institutes or majors. These documents serve as the basis for generating the dataset. Next, we provide the text contents of these relevant documents to GPT4, which generates questions that require answers derived from multiple document contents. The statistical information of our datasets is demonstrated in Table 1. The noisy dataset is derived from the extractive dataset, its average lengths of queries and answers are the same as the extractive. There are two items of average answer length.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# Experiment # Main settings We first conducted experiments using the following external knowledge settings, 1. Close-book: No external domain-specific knowledge was provided to assess whether LLMs could solve these expert problems themselves.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
2. Golden reference: We provided human-annotated positive references for LLMs to explore the upper bounds of their abilities. 3. Retrieved reference: Simulating real-world applications of RAG models, we provided them with retrieved documents. We chose BM25 (Robertson and Zaragoza, 2009) and BGE-base-zh-v1.5 (Xiao et al., 2023) as two classical retrievers to represent sparse and dense retrieval. 4. Noisy reference. To test the robustness of LLMs on noisy external knowledge, we provided different levels of irrelevant references blended with golden references. We also investigated the impact of the position of golden references within the noisy references on RAG models’ performances. 5. Structural reference. In the experiments on the structural QA dataset, we provided two versions of golden references, i.e., HTML and pure texts, for LLMs to evaluate the abilities to analyze HTML structures and compare the effect of structural information versus pure texts for RAG tasks. 6. Anti-reference. In the faithful QA dataset, we provided both golden and anti-references for LLMs in the same question to compare the faithfulness of LLMs in utilizing expert external knowledge. We selected six commonly used LLMs, including Llama2-7B-chat, Llama2-13B-chat, Llama2-70B-chat, Baichuan2-7B-chat, Baichuan2-33B-32k, ChatGLM2-6B-32k, and gpt-3.5-turbo-1106 to compare their abilities comprehensively. Note that we chose the Baichuan2-33B-32k version with a built-in general retrieval system to further assess the effectiveness of general knowledge sources in our domain-specific scenario. # Evaluation Metrics To evaluate model performance, we chose four widely used metrics: Two versions of exact-match, where the one assesses whether the ground truth The anonymous link of our dataset is provided here: https://github.com/ShootingWong/DomainRAG.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# 1.0 Pure Text |answers are contained by predictions (EM), the|HTML| |---|---| |one assesses whether the predictions are strictly|HTML| |the same as the answers (EMS); F1 is used to eval-|0.8| |uate models in the perspective of term-matching;|0.6| |Rouge-L and GPT-4 evaluation (GE) are used to|0.4| |assess the performance of long-form answers, i.e.,|0.2| |conversational and multi-doc datasets. For the GE|0.0| |metric, we prompt GPT to score whether the pre-| | |diction is consistent with the answer from the three| | |perspectives: factual consistency, redundancy, and| | |deficiency. The predicted score should range from| | |0 to 5 and we normalized it to [0, 1].| | # 4.3 Overall Experimental Results |1.2|1.2 Close Book Golden Ref & Golden Answer| |---|---| |1.0|1.0 Close Book & Anti-Ref & Anti-answer| |0.8| | |0.6| | |EM|0.4| |(1) In domain-specific scenarios, the knowledge|0.2| |contained within LLMs themselves may hard to|0.0| |tackle the user’s expert problems. The experimen-| | |tal results in the "Close Book" block confirm the| | |poor performance of LLMs when faced with in-| | |domain questions that go beyond their internal| | |knowledge Additionally, the retrieval settings in the| | |last four blocks demonstrate that external expert| | |knowledge can provide more reliable information| | |for LLMs in expert scenarios. Even when equipped| | |with a built-in retrieval system like Baichuan2-33B-| | |32k, the close-book results are significantly inferior| | |to those obtained from retrieval settings. This find-| | |ing reinforces the importance of domain-specific| | |corpora over general knowledge sources.| | # Experiments on Structural Dataset To evaluate the effectiveness of structural information for RAG models and analyze their abilities to comprehend knowledge in HTML format, we conducted the corresponding experiments on our structural QA dataset. It is worth noting that the whole HTML content of a web page is redundant and may contain some useless information about the web layout.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
Therefore, we proactively filtered out the information irrelevant to the valuable content of web pages. Nevertheless, the processed contents still exceed the maximum length of some LLMs, e.g., Llama. For simplicity, we directly truncated the provided information for LLMs that cannot handle lengthy texts. We expect that there are more elaborate techniques to tackle this problem. We provided two versions of web page content: one
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# Table 2: Overall results on the extractive, conversational, time-sensitive, and multi-doc datasets |Settings|Models|Extractive| | | | |Conversational| | | | |Time-sensitive| | | |Multi-doc| |---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---| | | | | | | | | | | | | |EM|EMS|F1|Rouge-L|Rouge-L|GE|EM|EMS|F1|Rouge-L|Rouge-L|GE| |Llama2-7B-chat| | | | | | | | | | | |0.1269|0.0000|0.1952|0.0863|0.1444|0.1429|0.1272|0.0000|0.1454|0.0706|0.2370|0.2750| |Llama2-13B-chat| | | | | | | | | | | |0.1307|0.0000|0.2171|0.1018|0.1273|0.1878|0.1959|0.0000|0.1375|0.0411|0.2341|0.2624| |Close Book|Llama2-70B-chat| | | | | | | | | | |0.1520|0.0000|0.2263|0.1096|0.1479*|0.2122|0.1118|0.0000|0.1141|0.0426|0.2536|0.2542| | |GPT-3.5-turbo-1106| | | | | | | | | | |0.1929|0.0111|0.3759|0.2102|0.2429|0.2245|0.0631|0.0154|0.2544|0.1177|0.2802|0.3292| | |Baichuan2-7B| | | | | | | | | | |0.1548|0.0556|0.3531|0.1911|0.2108|0.2041|0.1118|0.0164|0.1620|0.0925|0.2397|0.2584| | |ChatGLM2-6B-32K|0.1471*|0.0000*|0.1843*|0.0781*|0.1592|0.2082*|0.1426*|0.0154*|0.1580*|0.0880*|0.2258*|0.3208*| | | | | |Baichuan2-33B-32k| | | | | | | | | | |0.2443|0.1333|0.4320|0.2828|0.1906|0.3143|0.2154|0.0769|0.2794|0.1722|0.2843|0.3334| # HTML: These models have been pre-trained on data in the HTML format, which enables them to better comprehend the corresponding information. In the future, with more diverse formats of external knowledge, such ability is more and more important for LLMs to provide better experiences for users.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# 4.5 Robustness of LLMs on Noisy References To assess the robustness of LLMs on noised references, we mixed the positive references with different amounts of noisy references, including 4, 9, 14, 19, and 24. Additionally, the position of the positive reference was varied, i.e. the first, the middle, and the last positions, to assess the impact of the reference order on RAG models. The experiments were performed on LLMs capable of processing long texts, i.e. Baichuan2-33B and GPT-3.5-turbo-1106. The results in Figure 4 indicate that both different positions of golden references and amounts of noise have a significant influence on the performance of RAG models. There are some interesting findings: (1) Lost in the middle is a common phenomenon.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# phenomenon. Placing positive references in the | |0.9|0.80| |---|---|---| | |0.8|0.75| | | |NC=4|NC=19| |NC=9|NC=24|0.70| |0.7|NC=14|0.65| phenomenon has also been indicated in recent studies (Liu et al., 2024b), highlighting the importance of not only the quality of the provided knowledge but also its order. | |0.85|0.55| |---|---|---| | |0.80|0.50| | |0.75|0.45| | | |0.40| | |0.92| |---|---| |0.90|0.86| |0.88|0.84| |0.86|0.82| quality IR model is also critical for RAG tasks. # Noise is not always bad.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
The results of “No Noise” are not always the best compared to those obtained from noisy references. The reason may be one document is provided, the noisy references contain NC + 1 external documents. The increased amount of provided knowledge may emphasize the confidence of LLMs in external knowledge, making them more inclined to rely on it when solving problems. To verify this assumption, we conducted an experiment, where the golden references were repeated to match the number of noisy references. This experiment partially supports this assumption as the repeated references outperformed all other settings in most situations. This observation provides some insights for future studies of RAG that repeating provided references may be beneficial for motivating LLMs to provide better results. # 4.6 Faithfulness of LLMs in External References To assess the faithfulness of LLMs in external knowledge in out-of-domain applications, we provided the anti-references for LLMs to test whether they could generate anti-answers for these expert questions according to the external information. We compare the results with two different settings, in one we provided golden references and tested the performance of generating golden answers, other one is the close book setting. The comparison results are demonstrated in Figure 3. We found that in the close book setting, LLMs significantly underperform the settings with external knowledge, further confirming the importance of external knowledge for this scenario. Additionally, whether or not external knowledge is provided, LLMs often tend to generate golden answers instead of anti-answers. This suggests that LLMs still contain a certain # 5 Conclusion We built a comprehensive dataset, DomainRAG, to assess some crucial abilities of RAG models in a domain-specific scenario, college enrollment. We crawled the corresponding webpages from the website and two types of corpora, HTML corpus and pure text corpus were built. Then, we created corresponding sub-datasets to assess the following abilities, i.e. conversational RAG, structural information analysis, faithfulness to external knowledge, denoising, solving time-sensitive problems, and understanding of multi-document interactions. Our experiments confirm the role of RAG models in domain-specific scenarios where LLMs cannot solve expert questions well. Furthermore, RAG models still have room for improvement in comprehending users’ conversational history, analyzing structural knowledge, denoising references, managing multi-document interactions, and preserving fidelity to expert knowledge. We expect future research to make advancements in addressing these challenges more effectively.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
Limitations In this work, we identified six critical capabilities of RAG models and developed a comprehensive dataset, namely DomainRAG, to evaluate these capabilities in a domain-specific application scenario. We acknowledge the following limitations of our current study that present opportunities for future investigations. - First, though we chose several popular LLMs to assess their abilities in leveraging external knowledge to solve domain-specific questions, there exists some more sophisticated frameworks designed for enhancing the performance of RAG systems. Due to the complexity and diversity of implementation processes, we did not include them in our current research and evaluate their performances. - Secondly, the application scenario is single. While we selected an in-domain and long-tail application scenario, its unicity may also introduce some biases to experimental results. In the future, it is valuable to explore more model structures and application scenarios to evaluate the capabilities of RAG systems more comprehensively and reliably. References Md. Adnan Arefeen, Biplob Debnap, and Srimat Chakradhar. 2023. Leancontext: Cost-efficient domain-specific question answering using llms. CoRR, abs/2309.00841. Akari Asai, Zeqiu Wu, Yizhong Wang, Avirup Sil, and Hannaneh Hajishirzi. 2023. Self-rag: Learning to retrieve, generate, and critique prough self-reflection. CoRR, abs/2310.11511. Haonan Chen, Zhicheng Dou, Yutao Zhu, Zhao Cao, Xiaohua Cheng, and Ji-Rong Wen. 2022. Enhancing user behavior sequence modeling by generative tasks for session search. In CIKM.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
However, top similarity in definition > correct answer in defined word. Similarly, wrong 2 answers in the full definition have higher similarity than correct answer in full sentence.| | | |beamforming: A spatial filtering mechanism used at a transmitter to improve the received signal power or signal-to-noise ratio (SNR) at an intended receiver. Syn beam steering. (0.458)|beamforming steering matrix: A matrix determined using knowledge of the channel between a transmitter and an intended receiver that maps from space-time streams to transmit antennas with the goal of improving the signal power or signal-to-noise ratio (SNR) at the intended receiver. (0.367)| | | |
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
Jiawei Chen, Hongyu Lin, Xianpei Han, and Le Sun.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
2024. Benchmarking large language models in retrieval-augmented generation. In Thirty-Eighp AAAI Conference on Artificial Intelligence, AAAI 2024, Thirty-Sixp Conference on Innovative Applications of Artificial Intelligence, IAAI 2024, Fourteenp Symposium on Educational Advances in Artificial Intelligence, EAAI 2014, February 20-27, 2024, Vancouver, Canada, pages 17754–17762. AAAI Press. Shitong Dai, Jiongnan Liu, Zhicheng Dou, Haonan Wang, Lin Liu, Bo Long, and Ji-Rong Wen.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
2023. Contrastive learning for user sequence representation in personalized product search. In Proceedings of pe 29p ACM SIGKDD Conference on Knowledge Discovery and Data Mining, KDD ’23, page 380–389. Bhuwan Dhingra, Jeremy R. Cole, Julian Martin Eisenschlos, Daniel Gillick, Jacob Eisenstein, and William W. Cohen. 2022. Time-aware language models as temporal knowledge bases. Transactions of pe Association for Computational Linguistics, 10:257–273. Yunfan Gao, Yun Xiong, Xinyu Gao, Kangxiang Jia, Jinliu Pan, Yuxi Bi, Yi Dai, Jiawei Sun, Qianyu Guo, Meng Wang, and Haofen Wang. 2023. Retrieval-augmented generation for large language models: A survey. CoRR, abs/2312.10997.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
Kelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat, and Ming-Wei Chang. 2020. REALM: retrieval-augmented language model pre-training. CoRR, abs/2002.08909. Zhengbao Jiang, Frank F. Xu, Luyu Gao, Zhiqing Sun, Qian Liu, Jane Dwivedi-Yu, Yiming Yang, Jamie Callan, and Graham Neubig. 2023. Active retrieval augmented generation. In Proceedings of pe 2023 Conference on Empirical Mepods in Natural Language Processing, EMNLP 2023, Singapore, December 6-10, 2023, pages 7969–7992. Association for Computational Linguistics. Mandar Joshi, Eunsol Choi, Daniel Weld, and Luke Zettlemoyer. 2017. TriviaQA: A large scale distantly supervised challenge dataset for reading comprehension. In Proceedings of pe 55p Annual Meeting of pe Association for Computational Linguistics (Volume 1: Long Papers), pages 1601–1611, Vancouver, Canada. Association for Computational Linguistics. Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Jacob Devlin, Kenton Lee, Kristina Toutanova, Llion Jones, Matpew Kelcey, Ming-Wei Chang, Andrew M. Dai, Jakob Uszkoreit, Quoc Le, and Slav Petrov. 2019. Natural questions: A benchmark for question answering research. Transactions of pe Association for Computational Linguistics, 7:452–466. Angeliki Lazaridou, Elena Gribovskaya, Wojciech Stokowiec, and Nikolai Grigorev. 2022. Internet-augmented language models prough few-shot prompting for open-domain question answering. CoRR, abs/2203.05115. Patrick S. H. Lewis, Epan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Küttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, Sebastian Riedel, and Douwe Kiela. 2020. Retrieval-augmented generation for knowledge-intensive NLP tasks. In Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual. Xinze Li, Zhenghao Liu, Chenyan Xiong, Shi Yu, Yukun Yan, Shuo Wang, and Ge Yu. 2024. Say
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# more with less: Understanding prompt learning behaviors through gist compression Preprint, arXiv:2402.16058. # Xi Victoria Lin, Xilun Chen, Mingda Chen, Wei-jia Shi, Maria Lomeli, Rich James, Pedro Rodriguez, Jacob Kahn, Gergely Szilvasy, Mike Lewis, Luke Zettlemoyer, and Scott Yih. 2023. RA-DIT: retrieval-augmented dual instruction tuning. CoRR, abs/2310.01352.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# Jiongnan Liu, Zhicheng Dou, Jian-Yun Nie, and Ji-Rong Wen. 2024a. Integrated personalized and diversified search based on search logs. IEEE Transactions on Knowledge and Data Engineering, 36(2):694–707. # Jiongnan Liu, Zhicheng Dou, Qiannan Zhu, and Ji-Rong Wen. 2022. A category-aware multi-interest model for personalized product search. In Proceedings of the ACM Web Conference 2022, WWW ’22, page 360–368, New York, NY, USA. Association for Computing Machinery. # Jiongnan Liu, Jiajie Jin, Zihan Wang, Jiehan Cheng, Zhicheng Dou, and Ji-Rong Wen. 2023. RETA-LLM: A retrieval-augmented large language model toolkit. CoRR, abs/2306.05212.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# Nelson F. Liu, Kevin Lin, John Hewitt, Ashwin Paran-jape, Michele Bevilacqua, Fabio Petroni, and Percy Liang. 2024b. Lost in the Middle: How Language Models Use Long Contexts. Transactions of the Association for Computational Linguistics, 12:157–173. # Fabio Petroni, Aleksandra Piktus, Angela Fan, Patrick Lewis, Majid Yazdani, Nicola De Cao, James Thorne, Yacine Jernite, Vladimir Karpukhin, Jean Maillard, Vassilis Plachouras, Tim Rocktäschel, and Sebastian Riedel. 2021. KILT: a benchmark for knowledge intensive language tasks. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 2523–2544, Online. Association for Computational Linguistics. # Ori Ram, Yoav Levine, Itay Dalmedigos, Dor Muhlgay, Amnon Shashua, Kevin Leyton-Brown, and Yoav Shoham. 2023. In-context retrieval-augmented language models. CoRR, abs/2302.00083. # Ruiyang Ren, Yuhao Wang, Yingqi Qu, Wayne Xin Zhao, Jing Liu, Hao Tian, Hua Wu, Ji-Rong Wen, and Haifeng Wang. 2023. Investigating the factual knowledge boundary of large language models with retrieval augmentation. CoRR, abs/2307.11019.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# Stephen Robertson and Hugo Zaragoza. 2009. The probabilistic relevance framework: Bm25 and beyond. Found.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
Trends Inf. Retr., 3(4). # Harsh Trivedi, Niranjan Balasubramanian, Tushar Khot, and Ashish Sabharwal. 2023. Interleaving retrieval with chain-of-thought reasoning for knowledge-intensive multi-step questions. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), ACL 2023, Toronto, Canada, July 9-14, 2023, pages 10014–10037. Association for Computational Linguistics. # Shuting Wang, Zhicheng Dou, Jiongnan Liu, Qiannan Zhu, and Ji-Rong Wen. 2024. Personalized and diversified: Ranking search results in an integrated way. ACM Trans. Inf.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
Syst., 42(3). # Shuting Wang, Zhicheng Dou, Jing Yao, Yujia Zhou, and Ji-Rong Wen. 2023a. Incorporating explicit subtopics in personalized search. In Proceedings of the ACM Web Conference 2023, WWW ’23, page 3364–3374, New York, NY, USA. Association for Computing Machinery. # Shuting Wang, Zhicheng Dou, and Yutao Zhu. 2023b. Heterogeneous graph-based context-aware document ranking. In Proceedings of the Sixteenth ACM International Conference on Web Search and Data Mining, WSDM ’23, page 724–732, New York, NY, USA. Association for Computing Machinery. # Shitao Xiao, Zheng Liu, Peitian Zhang, and Niklas Muennighoff. 2023. C-pack: Packaged resources, to advance general Chinese embedding. Preprint arXiv:2309.07597. # Fangyuan Xu, Weijia Shi, and Eunsol Choi. 2023. RECOMP: improving retrieval-augmented lms with compression and selective augmentation. CoRR, abs/2310.04408. # Zhilin Yang, Peng Qi, Saizheng Zhang, Yoshua Bengio, William Cohen, Ruslan Salakhutdinov, and Christopher D. Manning. 2018. HotpotQA: A dataset for diverse, explainable multi-hop question answering. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 2369–2380, Brussels, Belgium. Association for Computational Linguistics. # Jing Yao, Zhicheng Dou, and Ji-Rong Wen. 2020. Employing personal word embeddings for personalized search. In Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval, page 1359–1368, New York, NY, USA. Association for Computing Machinery. # Wenhao Yu, Hongming Zhang, Xiaoman Pan, Kaixin Ma, Hongwei Wang, and Dong Yu. 2023. Chain-of-note: Enhancing robustness in retrieval-augmented language models. CoRR, abs/2311.09210. # Tianjun Zhang, Shishir G. Patil, Naman Jain, Sheng Shen, Matei Zaharia, Ion Stoica, and Joseph E. Gonzalez. 2024. Raft: Adapting language model to domain specific rag. Preprint, arXiv:2403.10131. # Yujia Zhou, Zhicheng Dou, and Ji-Rong Wen. 2020. Encoding history with context-aware representation learning for personalized search. In Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval, page 1111–1120, New York, NY, USA. Association for Computing Machinery.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
beamforming steering matrix: A matrix directed frame: See individually addressed. unknown_definition_18:NOTE These uses determined using knowledge of the (0.309) include calculation of transmit steering, calculation of recommended modulation and coding scheme (MCS), and calculation of calibration parameters. (0.359) Which multi-level precedence and traffic category (TC): A label for medium traffic classification (TCLAS): The specification admission control: An algorithm intended to Only the definition can extract the correct answer but similarity for the correct answer under a condition of framework supports higher preemption (MLPP): A framework used with admission control for the treatment of traffic streams based on precedence, which supports the preemption of an active traffic stream by a higher precedence traffic stream when resources are limited. Preemption is the act of forcibly removing a traffic stream in progress in order to free up resources for another higher precedence traffic stream. |traffic category (TC)|A label for medium access control (MAC) service data units (MSDUs) that have a distinct user priority (UP), as viewed by higher layer entities, relative to other MSDUs provided for delivery over the same link. Traffic categories are meaningful only to MAC entities that support quality of service (QoS) within the MAC data service. These MAC entities determine the UP for MSDUs belonging to a particular traffic category using the priority value provided with those MSDUs at the MAC service access point (MAC SAP).| |---|---| |traffic classification (TCLAS)|The specification of one of several types of matching filter to classify protocol data units (PDUs) or medium access control (MAC) service data units (MSDUs) as belonging to a particular traffic stream (TS). Depending on the type of classification, the filter is applied within the MAC sublayer management entity (MLME), above the MAC, or within the MAC itself.| |admission control|An algorithm intended to prevent the violation of parameterized service commitments made by the network to admitted flows by controlling the admittance of a new flow into a resource constrained network.| traffic specification (TSPEC): The quality-of-service (QoS) characteristics of a data flow to and from a QoS station (STA). (0.437) traffic specification (TSPEC): The quality-of-service (QoS) characteristics of a data flow to and from a QoS station (STA). (0.489) multi-level precedence and preemption (MLPP): A framework used with admission control for the treatment of traffic streams based on precedence, which supports the preemption of an active traffic stream by a higher precedence traffic stream when resources are limited. Preemption is the act of forcibly removing a traffic stream in progress in order to free up resources for another higher precedence traffic stream. (0.398) traffic stream (TS): A set of medium access control (MAC) service data units (MSDUs) to be delivered subject to the quality-of-service (QoS) parameter values provided to the MAC in a particular traffic specification (TSPEC). TSs are meaningful only to MAC entities that support QoS within the MAC data service. These MAC entities determine the TSPEC applicable for delivery of MSDUs belonging to a particular TS using the priority parameter provided with those MSDUs at the MAC service access point (MAC SAP). (0.411) medium access control (MAC) service unknown_definition_2: NOTE See IETF RFC 3610. (0.434) peer-to-peer traffic specification (PTP TSPEC): The quality-of-service (QoS) characteristics of a data flow between non-access point (non-AP) QoS stations (STAs). (0.413) frame: A unit of data exchanged between peer protocol entities.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# Yutao Zhu, Jian-Yun Nie, Zhicheng Dou, Zhengyi Ma, Xinyu Zhang, Pan Du, Xiaochen Zuo, and Hao Jiang 2021. Contrastive learning of user behavior sequence for context-aware document ranking. In CIKM ’21: The 30th ACM International Conference on Information and Knowledge Management, Virtual Event, QLD, Australia, November 1-5, 2021.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# Yutao Zhu, Huaying Yuan, Shuting Wang, Jiongnan Liu, Wenhan Liu, Chenlong Deng, Zhicheng Dou, and Ji-Rong Wen 2023. Large language models for information retrieval: A survey. CoRR, abs/2308.07107.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# Unveil the Duality of Retrieval-Augmented Generation: Theoretical Analysis and Practical Solution Shicheng Xu1,2, Liang Pang1∗, Huawei Shen1,2, Xueqi Cheng1,2∗ 1CAS Key Laboratory of AI Safety, Institute of Computing Technology, Chinese Academy of Sciences 2University of Chinese Academy of Sciences {xushicheng21s, pangliang, shenhuawei, cxq}@ict.ac.cn Abstract Retrieval-augmented generation (RAG) utilizes retrieved texts to enhance large language models (LLMs). However, studies show that RAG is not consistently effective and can even mislead LLMs due to noisy or incorrect retrieved texts. This suggests that RAG possesses a duality including both benefit and detriment. Although many existing methods attempt to address this issue, they lack a theoretical explanation for the duality in RAG. The benefit and detriment within this duality remain a “black box” that cannot be quantified or compared in an explainable manner. This paper takes the first step in theoretically giving the essential explanation of benefit and detriment in RAG by: (1) decoupling and formalizing them from RAG prediction, (2) approximating the gap between their values by representation similarity and (3) establishing the trade-off mechanism between them, to make them explainable, quantifiable, and comparable. We demonstrate that the distribution difference between retrieved texts and LLMs’ knowledge acts as “double-edged sword,” bringing both benefit and detriment. We also prove that the actual effect of RAG can be predicted at token level. Based on our theory, we propose a practical novel method, X-RAG, which achieves collaborative generation between pure LLM and RAG at token level to preserve benefit and avoid detriment. Experiments in real-world tasks based on LLMs including OPT, LLaMA-2, and Mistral show the effectiveness of our method and support our theoretical results. # Introduction Retrieval-augmented generation (RAG) has shown promising performance in enhancing LLMs via integrating retrieved texts Xu et al. [2023], Shi et al.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
[2023], Asai et al. [2023], Ram et al. [2023], which is actually the knowledge fusion between parameters and retrieved texts. However, studies show that this fusion is not consistently effective and can even mislead LLMs due to noisy or incorrect retrieved texts Xu et al. [2023], Ram et al. [2023], Xu et al. [2024a,b], Jin et al. [2024a], Xie et al. [2023], Jin et al. [2024b]. This implies that RAG has the duality including both benefit and detriment. Current methods attempt to address this by adding additional modules, prompt engineering, or fine-tuning LLMs. Asai et al. [2023], Xu et al. [2023, 2024a], Yoran et al. [2024], Ren et al. [2023], Feng et al. [2023], Mallen et al. [2022], Jiang et al. [2023]. Despite these efforts, there remains a lack of a theoretical and essential explanation for the benefit and detriment in RAG that could improve our understanding and find a more fundamental solution. In this paper, we provide a theoretical explanation for the benefit and detriment in RAG and propose a novel practical method based on our theoretical results (Figure 1). ∗ Corresponding authors Preprint.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
Under review.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# (a)Our Theoretical Results: |Benefit|Detriment| |---|---| |Retrieved distribution|LLMs’ distribution| RAG Representation Actual effect of RAG can be predicted at token-level Effect = Benefit − Detriment Benefit > Detriment Sim() is the similarity between representations Effect is positively correlated with Sim( , ) # (b)Our Practical Method: Collaborative generation between pure LLM and RAG at the token-level by comparing benefit and detriment. |Pure LLM Query|LLM| |---|---| |Query: Who was the first Nigerian to win the Nobel Prize, in which year?|Benefit Win| |RAG Query|Detriment Win| Figure 1: Theoretical results and practical method for real-world tasks in our paper. This paper pioneers in giving the essential explanation of benefit and detriment by: (1) decoupling and formalizing them from RAG prediction, (2) approximating the gap between their values using representation similarity, and (3) establishing the trade-off mechanism between them, to make them explainable, quantifiable, and comparable. Specifically, inspired by previous methods that prove LLMs implicitly perform latent variable inference Xie et al.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
[2021], Wang et al. [2024], we propose to analyze RAG by Latent Variable Model, in which LLMs firstly infer the latent variable and then generate the texts conditioned on the latent variable. In this way, we decouple and formalize the benefit and detriment from RAG prediction as two terms in subtraction. Further derivation based on this shows that: (1) We essentially explain the occurrence of benefit and detriment in RAG. The distribution difference between the retrieved texts and the LLMs’ pre-trained knowledge is “double-edged sword”. The larger distribution difference can provide more out-of-distribution knowledge for LLMs but also runs the risk of misleading them.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
Consequently, it brings both benefit and detriment. (2) We prove that the actual effect of RAG, which is the trade-off between benefit and detriment, can be predicted at token level (right side in Figure 1 (a)). Specifically, we find benefit and detriment bound the similarity between RAG representation and retrieved representation ( Sim(RAG, IR)), and the value of benefit minus detriment is positively correlated with this similarity. When benefit is equal to detriment, this similarity is equal to the similarity between RAG representation and pure LLM representation ( Sim(RAG, IR) = Sim(RAG, LLM)). So the value order between Sim(RAG, IR) and Sim(RAG, LLM) indicates the value order between benefit and detriment in RAG without training. Based on our theoretical results, we propose a practical novel method called X-RAG that can achieve collaborative generation between pure LLM and RAG at token level to preserve benefit and avoid detriment. In X-RAG, pure LLM and RAG generate the texts in parallel (Figure 1 (b)). At the generation step where LLM and RAG generate the different tokens, X-RAG uses our theoretical results to determine which token will be selected by comparing the values of benefit and detriment brought by RAG to the token. Experimental results in real-world tasks such as Q&A and Long-Form Q&A based on LLMs including OPT, LLaMA-2, and Mistral show the effectiveness of our method and support our theoretical results. Our method does not need any additional modules2 or training but outperforms baselines that need additional modules and fine-tuning LLMs, which indicates that our theoretical results are essential and fundamental for RAG. The main contributions of this paper are: - This paper takes the first step in theoretically giving the essential explanation of benefit and detriment in RAG to make them explainable, quantifiable, and comparable. - We prove distribution difference between retrieved texts and LLMs’ knowledge is a “double-edged sword” that brings both benefit and detriment. Besides, we prove that the actual effect of RAG (i.e., the trade-off between benefit and detriment) can be predicted at token level, which is significant for fine-grained preserving benefit and avoiding detriment in practical applications of RAG. - Based on the theoretical results, we propose a practical novel method to enable pure LLM and RAG to collaboratively generate at token level. Experimental results on real-world tasks across different LLMs show the effectiveness of our method and support our theoretical results. Collaborative generation does not need additional modules because it can be executed in parallel of a batch.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# Understand the duality of RAG: benefit and detriment RAG has the duality, although the retrieved texts can provide LLMs with external knowledge (benefit), it also contains the risk of misleading LLMs due to the noise in retrieved texts (detriment). This section aims to theoretically unveil this duality (i.e., benefit and detriment) in RAG. Firstly, we give our definition, analysis perspective and framework for benefit and detriment in RAG. Secondly, we decouple and formalize benefit and detriment from RAG prediction as the two terms in subtraction to make them explainable. Thirdly, which is also the ultimate goal of this paper, we prove that the actual effect of RAG (i.e., the trade-off between benefit and detriment) can be predicted at token level. # Definition and pre-analysis for benefit and detriment in RAG Definition. From the perspective of correctness, the relationship between the knowledge generated by pure LLM and the knowledge generated by RAG can be classified into four categories: (1) the knowledge of both is correct, (2) the knowledge of both is wrong, (3) the knowledge of pure LLM is wrong while the knowledge of RAG is correct, (4) the knowledge of pure LLM is correct while the knowledge of RAG is wrong. Since the former two are consistent in correctness, this paper focuses on the latter two and defines (3) as benefit and (4) as detriment. Distribution difference brings the benefit and detriment. The knowledge pre-trained in LLMs has the boundary Ren et al. [2023]. Retrieved texts bring new knowledge to LLMs and trigger the knowledge distribution difference between retrieved texts and LLMs’ pre-trained knowledge. In this paper, we propose that this distribution difference is a “double-edged sword”, which can be used to essentially explain the occurrence of benefit and detriment in RAG. Assuming that the retrieved texts are perfect, the larger the distribution difference between LLMs’ pre-trained knowledge and retrieved texts, the more out-of-distribution knowledge the retrieved texts can provide to LLMs, and the higher the benefit. However, the retrieved texts are not always perfect and may contain noisy even incorrect information, in this case, distribution difference will mislead the LLM, causing detriment. Therefore, benefit and detriment in RAG are essentially triggered by the distribution difference between LLMs’ pre-trained knowledge and retrieved texts. The following sections will illustrate this point theoretically. Analysis framework: formalizing RAG as latent variable model. To begin the analysis, inspired by previous studies that prove LLMs implicitly perform latent variable inference Xie et al. [2021], Zhang et al.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
[2023], Wang et al. [2024], we first propose to formalize RAG as the latent variable model. Specifically, given the token sequence x1:i−1 = {x1, x2, ...xi−1} generated from time step 1 to i − 1, from the perspective of the latent variable model, the probability distribution of the token xi at the i-th step can be described as this: p(xi|x1:i−1) = ∫ ∫ p(xi|x1:i−1, z)p(z|x1:i−1) dz in which Z is the space of high dimensional concept variable, p(z|x1:i−1) is the probability that probability for token xi conditioned on the input x1:i−1 and the sampled latent concept , z) means the) the model samples latent concept z from Z given the input x1:i−1, and p(xi|x1:i−1z. p(xi|x1:i−1 can be obtained by integrating over all latent concepts from the space Z. Latent variable model has been applied in many methods such as LDA Blei et al. [2003]. Recent studies prove that in-context learning of LLMs can also be seen as the latent variable model, in which the LLMs sample the concept across the input examples Xie et al. [2021], Zhang et al.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
(0.418) Unable to identify this despite it being available as a keyword in the actual definition
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
[2023]. Inspired by this, we analyse RAG as sampling the Retrieved Concept z∗ from the input retrieved texts list R = {r1, r2, ..., rn} (ri is a retrieved passage), and then predicting p(xi|R, x1:i−1), which can be formalized as: p(xi|R, x1:i−1) = ∫∫ p(xi|R, x1:i−1, z)p(z|R, x1:i−1) dz = ∫−{z∗}p(xi|R, x1:i−1, z)p(z|R, x1:i−1) dz + p(xi|R, x1:i−1, z∗)p(z∗|R, x1:i−1). Equation 2 describes the knowledge fusion in RAG. The first term is the prediction that marginalizes out all latent concepts except z∗, which is the knowledge within LLMs. The second term is the prediction that is only conditioned on z∗, which is the knowledge from retrieved texts.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# Decouple and formalize benefit and detriment Recapping the view that distribution difference brings both benefit and detriment in RAG we want to illustrate (Section 2.1), next, we derive the relationship between knowledge fusion and distribution difference from Equation 2 to decouple and formalize the benefit and detriment from RAG prediction. Inspired by Xie et al. [2021], the Equation 2 can be transformed as (detailed proof can be found in Appendix A): p(xi|R, x1:i−1) = ∫∫p(xi|R, x1:i−1, z)p(z|R, x1:i−1) dz p(xi|R, x1:i−1) ∝ ∫∫p(xi|R, x1:i−1, z)p(R, x1:i−1|z)p(z) dz = ∫p(xi|R, x1:i−1, z)exp(r(z))p(z) dz, r(z) = log p(R, x1:i−1|z∗)p(R, x1:i−1|z) Define ri is a passage in the retrieved texts list R, we can get (see detailed proof in Appendix B): r(z) = log p(R, x1:i−1|z∗) ≈ logΠi=1 O(1)p(rii|z∗)p(R, x1:i−1|z)Πn O(1)p(r|z) (6) → n ∗ Σlog p(ri|z∗) = n ∗ Σr∼Pr1 n p(ri|z) log p(ri|z))p(ri|z∗ (7) ∝ pR(r)log p(r|z∗) = pR(r)log (r|z∗) − pR(r)log p(r|z)p(r|z) pR(r) pR(r) (8) = −(KL(pR(r)∥p(r|z))− KL(pR(r)∥p(r|z∗))),| {z } | {z } (9) pR(·) is the distribution of the retrieved texts, p(·) is the distribution of the LLMs’ pre-trained knowledge. r(z) is an important term in knowledge fusion because it reflects the proportion between the latent concept from the space of LLMs and from the retrieved texts. Details are in Appendix C. Discuss the benefit and detriment based on the theoretical results. In Equation 9, the first term is the distribution difference between retrieved texts (pR(r)) and LLMs’ pre-trained knowledge (p(r|z)) given the concept z that is sampled from Z (full set of latent variables in LLMs). The second term is the distribution difference between the retrieved texts (pR(r)) and LLMs’ pre-trained knowledge given the concept z∗ that is sampled from retrieved texts (p(r|z∗)). Recapping our definition of benefit and detriment in Section 2.1, the first term is actually the benefit in RAG, the larger this value is, the more out-of-distribution knowledge the retrieved texts can provide to LLM. Considering that the retrieved texts may contain incorrect information and noise that contradicts the correct knowledge of LLMs, the second term measures this risk and can be seen as the detriment in RAG. It is because p(r|z∗) is the prediction made by LLM conditioned on the concept z∗ sampled from the retrieved texts. If external knowledge in the retrieved texts contradicts LLMs’ pre-trained knowledge, p(r|z∗) will have a gap compared to pR(r) (the actual distribution of the retrieved texts). Therefore, the difference between p(r|z∗) and pR(r) primarily stems from the LLMs’ resistance to any external knowledge in the retrieved texts that contradicts LLMs’ pre-trained knowledge. The larger difference indicates the more intense resistance from LLMs, and the more confident the LLMs are in their pre-trained knowledge, which means the greater the potential detriment caused by the retrieved texts. This explains the occurrence mechanism and relationship between benefit and detriment in RAG.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
Corollary 1. Two terms about distribution difference in Equation 9 explain the occurrence mechanism of benefit and detriment respectively. A larger distribution difference not only indicates more out-of-distribution knowledge (benefit) but also implies the LLMs’ resistance to the retrieved texts that contradict the pre-trained knowledge (detriment). Subtraction between benefit and detriment illustrates the “double-edged sword” trade-off in knowledge fusion of RAG. # Actual effect of RAG can be predicted at token level Based on the above analysis, we successfully explain the occurrence of benefit and detriment in RAG from a distribution difference perspective. Besides, we decouple and formalize benefit and detriment as two terms in subtraction. Next, we further discuss the impact of benefit and detriment
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# on the prediction of RAG and find that both benefit and detriment bound the similarity between p(xi|R, x1:i−1) and pR(xi|x1:i−1), which can serve as an important signal indicating the value order between benefit and detriment at token level. Specifically, recapping the Equation 2 that describes the knowledge fusion in RAG via latent variable model, we derive Theorem 1: Theorem 1 Define D = ∥p(xi R, x1:i−1) − pR(xi x1:i−1)∥1 to measure the difference between output distribution of RAG (p(xi R, x1:i−1)) and the distribution of retrieved texts conditioned on prefix x1:i−1 (pR(xi x1:i−1)). Both benefit and detriment are important terms of the upper and lower bounds of D, which can be described as: ∥Φ∥1 − p2KL(pR(r)∥p(r z∗)) ≤ D ≤ ∥Φ∥1 + p2KL(pR(r)∥p(r z∗)) Φ ≈ α Z−{z∗}p(xi|R, x1:i−1, z)exp −(KL(pRbenefit| (r)∥p(r|z))− KL(pR(r)∥p(r|z∗)) {z } | {z } p(z) dz, in which α is a constant.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
Our detailed proof of Theorem 1 can be found in Appendix D. Theorem 2 D is the difference, so D1 can be treated as similarity between p(xi R, x1:i−1) and pR(xi x1:i−1). The result of benefit minus detriment is approximately positively correlated with D 1: KL(pR(r)∥p(r z))− KL(pR(r)∥p(r z {z } {z ∗))∝ D } 1. benefit detriment. Our detailed proof of Theorem 2 is in Appendix E. We successfully prove that the actual effect of RAG can be predicted at token level. The gap between values of benefit and detriment in Equation 11 indicates how much greater the benefit is than the detriment, which is the actual effect of RAG. This gap is approximately positively correlated with the representation similarity, which is the value that can be predicted (details in Section 3). Besides, Equation 11 is derived from the token level prediction1. (p(xi R, x1:i−1)), this shows that the actual effect of RAG can be predicted at token level by D Section 3 introduces our detailed method to achieve this in practical applications. # X-RAG: Improve RAG based on duality analysis We aim to improve RAG by retaining tokens whose benefit is greater than detriment, and replacing tokens whose benefit is less than detriment. The key to achieving this is to determine the value order between benefit and detriment at token level.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
Section 2.3 shows that the result of benefit minus1. So the value of D when benefit minus1 detriment is approximately positively correlated with D detriment is zero is an important dividing point. A D1 greater than this value indicates that benefit is greater than detriment, and conversely, the benefit is less than detriment. We derive Theorem 3 to find this dividing point and map the value order between benefit and detriment of token xi relationship between representation similarity that can be calculated in practical applications: Theorem 3 Define M = ∥p(xi R, x1:i−1) − p(xi x1:i−1)∥1 to measure the difference between output distribution of RAG (p(xi R, x1:i−1)) and pure LLM (p(xi x1:i−1)), so M can be treated as the similarity between them. D = M is the dividing point in which benefit is equal to detriment, and the value order between D < KL(pR(r)∥p(r z∗)), detriment is equal to benefit. KL(pR(r)∥p(r z))and M can indicate the value order between benefit and detriment as: ∗)), detriment outweighs benefit. if D1 < M1 J = KL(pR(r)∥p(r z)) = KL(pR(r)∥p(r z∗)), benefit outweighs detriment. if D1 = M1 if D1 > M1 Our detailed proof of Theorem 3 can be found in Appendix F. Equation 12 is a novel principle that can measure the value order between benefit and detriment in RAG at token level. It does not rely on additional modules or training but simply compares the similarity. Our X-RAG, a practical novel method that enables LLM and RAG to collaborate at token level for generation to preserve benefit and avoid detriment, is constructed based on this. X-RAG makes pure LLM and RAG generate the texts in parallel at token level. At the generation step where pure LLM and RAG generate the different tokens, X-RAG determines which token will be selected by comparing the values of benefit and detriment brought by RAG to the token according to Equation 12. Specifically, the key terms of Equation 12 consist of three parts: (1) p(xi R, x1:i−1) can be directly obtained from the prediction of RAG; (2) p(xi x1:i−1) can be directly obtained from the prediction of pure LLM; (3) however, the distribution of retrieved texts conditioned on the prefix x1:i−1, pR(xi x1:i−1), is hard to directly obtained, which is the main challenge that the following Section 3.1 aims to solve.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# stage1 | |0.8| |---|---| | |0.6| | |0.4| | |0.2| | |0.0| | |0|5|10|15|20|25|30| Attention score Figure 2: Attention score for xi (blue line) and difference of word distribution change (yellow line) vary with layers. stage 1: Lexical and Syntactic.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
stage 2: Text Matching. stage 3: Knowledge Fusion. 3.1 Distribution prediction for retrieved texts Based on our theoretical analysis in section 2.2 and the detailed proof in Appendix G, we find that: Corollary 2. RAG is unsupervised In-context Learning that fuses the distribution from retrieved texts with LLMs’ pre-trained distribution. The distribution of retrieved passage r in RAG (i.e., pR(r) can serve as the unsupervised learning signal for LLMs learning from context, even without explicit input-output supervision like demonstrations in traditional In-context learning. Therefore, an intuitive idea is that the distribution pR(xi|x1:i−1) can be approximately predicted by capturing the signal from the retrieved texts in knowledge fusion. The main challenges to achieving it are: (1) how to determine where knowledge fusion occurs (2) how to capture the signal that fused from retrieved texts and transform it to distribution pR(xi|x1:i−1). To address these, we explore the operating mechanism of RAG and propose a novel method to dynamically determine the layers where knowledge fusion occurs and use the signal from retrieved texts in these layers as pR(xi|x1:i−1). Exploring the mechanism of RAG. We find that the mechanism of RAG can be decomposed into two parts. The first is text matching, which means extracting information relevant to the generation of xi from the retrieved texts R. The second is knowledge fusion, which means fusing the knowledge obtained from the retrieved texts with the knowledge in LLMs’ parameters. LLMs perform the former in the middle layers and perform the latter in the deep layers. We present these findings in detail with experiments based on LLaMA-2-7B with 32 layers and Natural Question dataset. For text matching, we quantify the relevance of the information in the retrieved texts to the generation of token xi given x1:i−1 by attention score between token xi and the tokens in the retrieved texts R. We explore how the sum of attention scores from token xi to tokens in R changes with the layer. The blue line in Figure 2 shows that: (1) The value increases sharply to a peak in shallow layers (0-5), which is mainly because LLMs capture the low-level lexical and syntactic information on the entire input Tenney et al. [2019]. (2) The value first decreases and then increases to a maximum point in middle layers (5-23), which is mainly because LLMs select the semantic information that can be used to generate xi from R and complete this selection at the maximum point. (3) The value decreases after the maximum point in deep layers (24-32). It is because, at this time, LLMs use the knowledge selected at the maximum point for knowledge fusion to predict xi, the attention shifts from R to prefix x1:i−1. For knowledge fusion, since the occurrence of knowledge fusion is often accompanied by a change in word distribution, we represent the intensity of knowledge fusion by measuring the change in word distribution between layers. Chuang et al.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
[2023], Schuster et al. [2022] prove the language word distribution of hidden states in each layer by language heads ϕ as ϕ(hil), in which hi is the heads can be directly applied to the hidden states of middle layers, so we propose to obtain the hidden states for token xi in the l-th layer. Then we can measure the word distribution change in the l-th layer by calculating the Jensen-Shannon Divergence (JSD) between ϕ(hil−1) and ϕ(hil) as: C = JSD(ϕ(hil−1)∥ϕ(hil)). We quantify the intensity of LLM fusing the knowledge from retrieved texts by comparing the difference in C of the same layer between pure LLM and RAG, which can be described as: Dl = |JSD(ϕ(hil−1)∥ϕ(hil)) − JSD(ϕ(hil−1)∥ϕ(hil))|,˜ (shows Dl hi in which˜l−1 and˜i hlare from RAG, hil−1 and hli are from pure LLM. The yellow line in Figure 2 is very small in the shallow and middle layers (0-23) and rises sharply in the deep layers 24-32). This suggests that knowledge fusion occurs in deep layers.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
The above two results indicate that: When performing RAG, LLMs first perform text matching in the middle layers, extracting relevant knowledge from the retrieved texts. As the depth increases, the matching becomes more and more accurate, and it reaches a turning point. In the deep layers after this turning point, LLMs instead carry out knowledge fusion, and the attention shifts from R to x1:i−1. Knowledge used for fusion comes from the matching information around the turning point (because matching decreases after the turning point). Recapping two challenges at the beginning of Section 3.1, for the first challenge, we can locate the layer where knowledge fusion starts by detecting the turning point in Figure 2. For the second challenge, we can use the matching information in the layer where knowledge fusion starts to approximate the distribution pR(xi|x1:i−1). Dynamically locate the layer where knowledge fusion starts. For p(xi|R, x1:i−1), the layer where knowledge fusion starts can be located by detecting the turning point in Figure 2. Specifically, we use f(l) to denote the attention score for xi varies with layer l and g(l) to denote the difference of word distribution change in Equation 13 varies with layer l. The layer where knowledge fusion starts is: l∗ = ⌊ 2 1(arg maxf (l) + min{l : g(l) > a})⌋.l The first term is the l that maximizes f(l), which is the third turning point in the blue line of Figure 2. The second term means the minimum l value for which g(l) is greater than a (hyperparameter, can be set to 5e-7 according to our statistics), which is the turning point in the yellow line of Figure 2. We take the average of the two values and round down as the layer l∗ where knowledge fusion starts.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
(EPD) destination addresses, priority, drop frame: A unit of data exchanged protocol instance: An execution of a particular unknown_definition_9: NOTE See IETF RFC 4282. (0.407) identified? eligibility, service class, optional set between peer protocol entities. (0.432) protocol that consists of the state of the communicating parties as well as the messages exchanged.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
Matching as distribution. The matching information between R = [rt1, rt2, ..., rtm] (rt is the token in R) and token xi around turning point can be used to approximate the distribution pR(xi|x1:i−1) of the retrieved texts R conditioned on x1:i−1 at the l∗-th layer. The matching information consists of two parts, one is the attention score, which can measure the matching between retrieved tokens and current token xi at the hidden state level. The other is the similarity of word embeddings, which can measure the matching between retrieved tokens and current token xi at the word distribution level: Att = softmax(˜i hl∗Wq √dk)(˜1:hl∗mWk )T!, W ordSim = softmax( xil′−l∗A)(rt1:mA)T, l∗ Wq and Wk are matrices in attention Vaswani et al. [2017],˜l∗ is the hidden state of token xi and hi hl∗m are hidden states of R. A is word embedding matrix in LLMs, xil′−l∗ ˜1: is the token with the l∗ largest logits increase in word distribution from layer l∗ to the final layer l, rt1:m are tokens in R. pR(xi|x1:i−1) is: pR(xi|x1:i−1) = softmax (Att ⊙ W ordSim), ⊙ is element-wise multiplication. Token-Level comparison between benefit and detriment Equation 12 shows that the relationship between Sim(p(xi|R, x1:i−1), pR(xi|x1:i−1)) and Sim(p(xi|R, x1:i−1), p(xi|x1:i−1)) indicates the value order between benefit and detriment (Sim(·, ·) is the similarity). We propose to use the token semantics as the representation for p(xi|R, x1:i−1), pR(xi|x1:i−1) and p(xi|x1:i−1) and use cosine to compute the similarity. It not only follows the principle of Equation 12 but also takes into account the semantic similarity, which is more robust in practical applications. Specifically, we use word embedding matrix of LLMs to calculate the weighted word embedding for p(xi|R, x1:i−1) as wRAG = P(p,w)∈V p′w, for each token in vocabulary V, p′ is its logits from p(xi|R, x1:i−1) and w is its word embedding. We can also use this to get the weighted word embedding wLLM for p(xi|x1:i−1) and wIR for pR(xi|x1−1). The similarity between them can be calculated via cosine similarity as: Sim(p(xi|R, x1:i−1), pR(xi|x1:i−1)) = cos(wRAG, wIR) Sim(p(xi|R, x1:i−1), p(xi|x1:i−1)) = cos(wRAG, wLLM) Combining our theoretical analysis of Theorem 1, 2 and 3, we can derive this principle to determine the value order between benefit and detriment brought by RAG to the token xi in practical applications: s = benefit win if cos(wRAG, wIR) ≥ cos(wRAG, wLLM), detriment win if cos(wRAG, wIR) < cos(wRAG, wLLM).
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# LLMs Methods | |# Generation|Wikitext|ASQA|Bio|NQ| |---|---|---|---|---|---| |Logprobs|2|65.25|64.33|68.96|67.55|65.24|64.59|55.31|51.41| |Uncertainty|2|64.12|63.50|66.14|63.96|65.78|64.60|56.03|52.15| |Consistency-Lexical|10|64.01|62.17|69.42|67.04|65.41|65.28|55.06|51.13| |Consistency-Semantic|10|65.93+|66.88|64.22+|72.28|70.11+|72.05|69.50+|66.27|65.76+|66.04|64.37+|57.92|56.24+|52.90|52.88+| |X-RAG (Ours)|2|68.64| | | | |Logprobs|2|73.52|72.90|68.05|66.86|65.22|64.39|57.04|57.23| |Uncertainty|2|73.72|72.71|67.47|65.63|65.59|65.83|57.19|57.10| |Consistency-Lexical|10|72.15|70.44|69.16|67.33|64.79|64.33|56.95|54.37| |Consistency-Semantic|10|73.98+|74.11|72.26+|71.51|70.05+|71.47|69.54+|66.37|65.68+|66.04|65.12+|58.52|57.43+|57.56|56.12+| |X-RAG (Ours)|2|75.85| | | | |Logprobs|2|73.47|72.95|68.50|68.04|62.11|60.94|67.40|69.24| |Uncertainty|2|73.98|73.01|68.72|67.63|63.67|63.50|68.03|69.15| |LLaMA-2-7B|Consistency-Lexical|10|73.51|71.62|70.09|68.45|62.49|61.98|68.17|70.09| |Consistency-Semantic|10|74.96+|80.42|74.23+|76.96|71.23+|76.80|69.38+|64.08|63.77+|64.19|62.10+|70.50|69.72+|72.45|71.14+| |X-RAG (Ours)|2|81.89| | | | Table 1: Performance on determining the value order between benefit and detriment at token level. Significant test with p-value ≤ 0.05 compared with all baselines are denoted as ‘+’.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# Experiments # Experimental details Experimental setup, metrics, and baselines. The core of our X-RAG is determining the value order between benefit and detriment at token level. This can be viewed as a binary classification task to determine whether benefit is greater than detriment or not. Therefore, a primary experiment is to evaluate this binary classification task at token level (details can be found in Section 4.2). We use popular metrics for binary classification tasks such as AUC and F1. This task can also be viewed as predicting the correctness of the generated tokens. Therefore, baselines for this are the methods that detect the LLMs’ hallucination. We use these baselines to determine the value order between benefit and detriment by comparing the degree of hallucination at token level between RAG and pure LLM (details in Appendix H.1). Baselines include: (1) Logprobs-based Kuhn et al. [2023], we use the value order between top-1 log-probability of the tokens output by pure LLM and RAG to determine the value order between benefit and detriment. (2) Uncertainty-based, we use Length-normalized Entropy Malinin and Gales [2020] to measure the uncertainty of the tokens and compare it between pure LLM and RAG. (3) Consistency-based, we run LLMs multiple times and calculate consistency scores among multiple answers using Lexical and Semantic Similarity Lin et al. [2022], Chen et al. [2024] and compare scores between pure LLM and RAG. Another experiment is in a practical autoregressive generation setting for open-domain Q&A given retrieved texts with different qualities, it aims to evaluate the robustness of RAG methods in practical usage. We use Cover-EM Rosset et al. [2020] that indicates the accuracy in Q&A as the metric. Baselines include the methods that use additional modules to filter irrelevant passages (NLI+RAG Yoran et al. [2024]) or as action triggers (CRAG Yan et al. [2024]), fine-tune more robust LLMs for RAG (RetRobust Yoran et al. [2024] and INFO-RAG Xu et al. [2024a]) and fine-tune LLMs to dynamically retrieve and critique retrieved texts (Self-RAG Asai et al. [2023]).
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
Datasets. For the token level binary classification task in the primary experiment, we use three long-form generation tasks including long-form Q&A (ASQA Stelmakh et al. [2023]), people biographies generation (Bio Min et al. [2023]) and language modeling (Wikitext103 Merity et al. [2016]) and one short-form task includes Q&A (Natural Questions Kwiatkowski et al. [2019]). For the second experiment, since long-form tasks are not conducive to objectively and accurately evaluating the factual correctness of the answers, we use three short-form Q&A tasks including WebQuestions (WebQ) Berant et al. [2013], TriviaQA Joshi et al.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
[2017] and SQuAD v1.1 Rajpurkar et al. [2016]. Implementation details. As for retrieval in RAG, we follow Xu et al. [2023] to use ColBERTv2 Santhanam et al. [2021], an excellent generalizable model as the retriever, and use Wikipedia consisting of 21,015,324 passages Karpukhin et al. [2020] as retrieval database. All baselines and X-RAG share the same retrieval setup and input. We use OPT-6.7B, LLaMA-2-7B, and Mistral-7B-v0.1 as LLMs in the primary experiment and use greedy-decoding strategy for generation. More details of X-RAG and baselines are in Appendix H.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# Train Add TriviaQA WebQ Squad |Methods|LLM Module|Ratio of Hard Negative Passages|Ratio of Hard Negative Passages|Ratio of Hard Negative Passages| |---|---|---|---|---| | | |100%|80%|60%|40%|20%|0%|100%|80%|60%|40%|20%|0%|100%|80%|60%|40%|20%|0%| | | |Standard RAG|no ✔|no ✔|43.8|67.0|71.3|76.2|78.2|81.9|23.9|35.8|40.6|43.4|48.4|53.1|8.6|31.0|43.2|53.0|58.8|67.2| | | |NLI+RAG|no ✔|need ✗|50.8|61.2|68.2|73.0|76.4|79.1|30.7|40.3|44.5|47.5|50.9|52.8|9.9|21.1|33.7|43.4|51.7|60.5| | | |CRAG|no ✔|need ✗|48.2|68.3|72.5|76.7|81.5|82.2|25.6|37.4|41.9|46.2|51.5|54.9|7.4|28.7|39.6|50.7|53.2|61.1| | | |RetRobust|need ✗|no ✔|49.2|67.3|72.9|77.5|79.4|82.3|30.0|38.9|42.5|48.2|49.8|54.3|10.5|30.8|43.3|52.5|58.4|66.0| | | |Self-RAG|need ✗|no ✔|43.0|68.7|73.5|76.4|80.8|82.2|18.3|34.8|42.2|47.2|51.3|57.0|5.5|27.8|38.9|46.4|52.5|58.3| | | |INFO-RAG|need ✗|no ✔|49.7|68.4|73.2|77.9|80.0|82.5|29.7|38.0|43.9|48.1|49.4|54.8|10.7|30.1|43.5|53.7|59.2|67.5| | | |X-RAG (Ours)|no ✔|no ✔|53.5|72.9|77.6|81.3|83.4|85.7|32.9|43.8|47.3|50.0|52.9|57.3|12.8|31.3|44.5|54.1|60.8|68.1| Table 2: Accuracy on open-domain Q&A given the retrieved texts containing different ratios (0% to 100%) of hard negative passages (irrelevant but are ranked in top-10 by retrieval model). Our X-RAG does not need any training or additional modules while baselines need.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# Experimental results Primary experiment. Table 1 shows that our X-RAG achieves better performance in determining the value order between benefit and detriment at token level in RAG than baselines across different tasks and LLMs. Baselines determine the value order by detecting the degree of hallucination while our X-RAG can directly compare the benefit and detriment based on our theoretical analysis, which is more fundamental so it performs better. In this experiment, we construct the test sample by selecting the token a generated by RAG that is different from the token b generated by pure LLM given the same and accurate prefix (Teacher-Forcing). If the token of RAG (a) is correct and the token of pure LLM (b) is wrong, the label is 1 means that the benefit is greater than the detriment. Otherwise, the detriment is greater than the benefit and the label is 0. We use this principle to traverse the second half of the tokens of each sample in the entire dataset to construct the test dataset. Experiment on Open-domain Q&A. This experiment is under the practical autoregressive generation setting for open-domain Q&A. Table 2 shows that in RAG given the retrieved texts with various qualities, our X-RAG does not need any additional modules or training and outperforms the strong baselines that need additional filters or training LLMs. This means our X-RAG achieves a better trade-off between benefit and detriment in RAG, avoiding detriment while securing benefit. It is because our theoretical analysis helps us propose a more fundamental method in measuring value order between benefit and detriment at token level. Baselines do not have theoretical support, so they require more additional overhead. In this experiment, we adjust the radio of irrelevant passages in the retrieved passage list from 0% to 100%, which can simulate the degree of noise in the retrieved texts. Since Open-domain Q&A is a short-form task, we calculate the accuracy by judging whether the ground truth appears exactly in the generated texts (Cover-EM Rosset et al. [2020]).
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
LLM in this is LLaMA-2-7B. Case study. Figure 4 in Appendix I intuitively shows the collaborative generation between pure LLM and RAG in our X-RAG in open-domain Q&A. X-RAG is effective to preserve benefit and avoid detriment at token level by dynamically selecting suitable tokens among pure LLM and RAG. Ablation study. Figure 3 shows the effectiveness of our dynamic layer selection strategy in Equation 14 and supports our finding that RAG performs matching in middle layers. Figure 3 shows the AUC when l∗ in Equation 14 is set as a fixed value from 0 to 32. Our dynamic layer selection strategy (dashed line) is always better than any fixed layers (solid line). Besides, AUC is higher in middle layers, which supports that RAG performs matching in middle layers and the knowledge in retrieved texts is extracted in the turning point. After the turning point, LLMs instead perform knowledge fusion, the matching cannot reflect the distribution of retrieved texts, so AUC decreases. Related work Robust RAG. To make LLMs robust in RAG to avoid the detriment caused from noisy in retrieved texts, some methods use additional modules to filter out irrelevant documents Yoran et al. [2024], Yan et al. [2024]. Some methods train LLMs to make them robust to noisy in retrieved texts Xu
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
et al. [2024a], Yoran et al. [2024]. Some methods let LLMs dynamically determine whether the query needs RAG Asai et al. [2023], Xu et al.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
[2023], Ren et al. [2023], Feng et al. [2023], Mallen et al. [2022], Jiang et al.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
(0.380) unknown_definition_9: NOTE See IETF RFC 4282. (0.404) traffic classification (TCLAS): The specification of one of several types of matching filter to classify protocol data units (PDUs) or medium access control (MAC) service data units (MSDUs) as belonging to a particular traffic stream (TS). Depending on the type of classification, the filter is applied within the MAC sublayer management entity (MLME), above the MAC, or within the MAC itself. (0.370) traffic classification (TCLAS): The specification of one of several types of matching filter to classify protocol data units (PDUs) or medium access control (MAC) service data units (MSDUs) as belonging to a particular traffic stream (TS). Depending on the type of classification, the filter is applied within the MAC sublayer management entity (MLME), above the MAC, or within the MAC itself. (0.383) |What does GAS stand for?|registered location query protocol (RLQP): The query protocol for registered location information that is received and transported by generic advertisement service (GAS) Public Action frames.| |---|---| |unknown_definition_1:NOTE See IETF RFC 2903 [B35]. (0.384)|unknown_definition_8: NOTE IEEE Std 802.11 supports only downlink (DL) MU-MIMO.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
[2023]. All the previous works solve the contradiction between benefit and detriment in RAG from the perspective of application but lacking essential and theoretical analysis, which limits the understanding and cannot find the fundamental method to solve it. Therefore, they rely on additional modules or fine-tuning LLMs. Our paper explains the benefit and detriment in RAG by theoretical analysis and proposes a novel method to preserve benefit while avoiding detriment without any additional modules or training. Theoretical analysis of ICL. Our paper is inspired by theoretical analysis of ICL. Some works explain ICL as one-step gradient descent Von Oswald et al. [2023], Akyürek et al. [2022], Dai et al. [2022]. Besides, there are other explanations of ICL such as Bayes inferecne Xie et al. [2021], Bayes model averaging Zhang et al. [2023], leaning topic structure Li et al. [2023] and kernel regression Han et al. [2023]. They focus on explaining why ICL occurs. Our contribution lies in analyzing the benefit and detriment in RAG and proposing a practical method to apply our theoretical results. # Conclusions and Discussion This paper provides the essential understanding of benefit and detriment in RAG to make them explainable, quantifiable, and comparable. We theoretically elucidate that the distribution difference between retrieved texts and LLMs’ pre-trained knowledge is “double-edged sword" in RAG that brings both benefit and detriment. We prove that the actual effect of RAG can be predicted at token level by representation similarity. Based on our theoretical results, we propose a practical novel method that enables pure LLM and RAG to collaborate at token level, gaining benefit while avoiding detriment. Experiments show the effectiveness of our method and support our theoretical results. Limitations and Societal Impact: The main limitation of this paper is that due to immense resource cost, we do not evaluate our method on LLMs with 33B and 65B scales. Our paper deepens society’s understanding of LLMs’ usage of external retrieved knowledge through theoretical analysis. After careful consideration, we believe that our paper does not have any potential negative societal impact. # References |Shicheng Xu, Liang Pang, Huawei Shen, Xueqi Cheng, and Tat-seng Chua.|Search-in-the-chain: Towards the accurate, credible and traceable content generation for complex knowledge-intensive tasks. arXiv preprint arXiv:2304.14732, 2023.| |---|---| |Weijia Shi, Sewon Min, Michihiro Yasunaga, Minjoon Seo, Rich James, Mike Lewis, Luke Zettlemoyer, and Wen-tau Yih.|Replug: Retrieval-augmented black-box language models. arXiv preprint arXiv:2301.12652, 2023.| |Akari Asai, Zeqiu Wu, Yizhong Wang, Avirup Sil, and Hannaneh Hajishirzi.|Self-rag: Learning to retrieve, generate, and critique through self-reflection. arXiv preprint arXiv:2310.11511, 2023.| |Ori Ram, Yoav Levine, Itay Dalmedigos, Dor Muhlgay, Amnon Shashua, Kevin Leyton-Brown, and Yoav Shoham.|In-context retrieval-augmented language models. arXiv preprint arXiv:2302.00083, 2023.| |Shicheng Xu, Liang Pang, Mo Yu, Fandong Meng, Huawei Shen, Xueqi Cheng, and Jie Zhou.|Unsupervised information refinement training of large language models for retrieval-augmented generation, 2024a.| |Shicheng Xu, Liang Pang, Jun Xu, Huawei Shen, and Xueqi Cheng.|List-aware reranking-truncation joint model for search and retrieval-augmented generation. arXiv preprint arXiv:2402.02764, 2024b.| |Zhuoran Jin, Pengfei Cao, Yubo Chen, Kang Liu, Xiaojian Jiang, Jiexin Xu, Qiuxia Li, and Jun Zhao.|Tug-of-war between knowledge: Exploring and resolving knowledge conflicts in retrieval-augmented language models. arXiv preprint arXiv:2402.14409, 2024a.| |Jian Xie, Kai Zhang, Jiangjie Chen, Renze Lou, and Yu Su.|Adaptive chameleon or stubborn sloth: Unraveling the behavior of large language models in knowledge conflicts. arXiv preprint arXiv:2305.13300, 2023.|
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# Zhuoran Jin, Pengfei Cao, Hongbang Yuan, Yubo Chen, Jiexin Xu, Huaijun Li, Xiaojian Jiang, Kang Liu, and Jun Zhao. Cutting off the head ends the conflict: A mechanism for interpreting and mitigating knowledge conflicts in language models. arXiv preprint arXiv:2402.18154, 2024b.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# Ori Yoran, Tomer Wolfson, Ori Ram, and Jonathan Berant. Making retrieval-augmented language models robust to irrelevant context. In International Conference on Learning Representations, 2024. # Ruiyang Ren, Yuhao Wang, Yingqi Qu, Wayne Xin Zhao, Jing Liu, Hao Tian, Hua Wu, Ji-Rong Wen, and Haifeng Wang. Investigating the factual knowledge boundary of large language models with retrieval augmentation. arXiv preprint arXiv:2307.11019, 2023.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# Shangbin Feng, Weijia Shi, Yuyang Bai, Vidhisha Balachandran, Tianxing He, and Yulia Tsvetkov. Knowledge card: Filling llms’ knowledge gaps with plug-in specialized language models. In The Twelfth International Conference on Learning Representations, 2023. # Alex Mallen, Akari Asai, Victor Zhong, Rajarshi Das, Daniel Khashabi, and Hannaneh Hajishirzi. When not to trust language models: Investigating effectiveness of parametric and non-parametric memories. arXiv preprint arXiv:2212.10511, 2022. # Zhengbao Jiang, Frank F Xu, Luyu Gao, Zhiqing Sun, Qian Liu, Jane Dwivedi-Yu, Yiming Yang, Jamie Callan, and Graham Neubig. Active retrieval augmented generation. arXiv preprint arXiv:2305.06983, 2023. # Sang Michael Xie, Aditi Raghunathan, Percy Liang, and Tengyu Ma. An explanation of in-context learning as implicit bayesian inference. arXiv preprint arXiv:2111.02080, 2021. # Xinyi Wang, Wanrong Zhu, Michael Saxon, Mark Steyvers, and William Yang Wang. Large language models are latent variable models: Explaining and finding good demonstrations for in-context learning. Advances in Neural Information Processing Systems, 36, 2024. # Yufeng Zhang, Fengzhuo Zhang, Zhuoran Yang, and Zhaoran Wang. What and how does in-context learning learn? bayesian model averaging, parameterization, and generalization. arXiv preprint arXiv:2305.19420, 2023. # David M Blei, Andrew Y Ng, and Michael I Jordan. Latent dirichlet allocation. Journal of machine Learning research, 3(Jan):993–1022, 2003. # Ian Tenney, Dipanjan Das, and Ellie Pavlick. Bert rediscovers the classical nlp pipeline. arXiv preprint arXiv:1905.05950, 2019. # Yung-Sung Chuang, Yujia Xie, Hongyin Luo, Yoon Kim, James Glass, and Pengcheng He. Dola: Decoding by contrasting layers improves factuality in large language models. arXiv preprint arXiv:2309.03883, 2023. # Tal Schuster, Adam Fisch, Jai Gupta, Mostafa Dehghani, Dara Bahri, Vinh Tran, Yi Tay, and Donald Metzler. Confident adaptive language modeling. Advances in Neural Information Processing Systems, 35:17456–17472, 2022. # Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. Advances in neural information processing systems, 30, 2017. # Lorenz Kuhn, Yarin Gal, and Sebastian Farquhar. Semantic uncertainty: Linguistic invariances for uncertainty estimation in natural language generation. arXiv preprint arXiv:2302.09664, 2023.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# Andrey Malinin and Mark Gales. Uncertainty estimation in autoregressive structured prediction. arXiv preprint arXiv:2002.07650, 2020. # Zi Lin, Jeremiah Zhe Liu, and Jingbo Shang. Towards collaborative neural-symbolic graph semantic parsing via uncertainty. Findings of the Association for Computational Linguistics: ACL 2022, 2022.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# Chao Chen, Kai Liu, Ze Chen, Yi Gu, Yue Wu, Mingyuan Tao, Zhihang Fu, and Jieping Ye Inside: Llms’ internal states retain the power of hallucination detection. arXiv preprint arXiv:2402.03744, 2024.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
# Corby Rosset, Chenyan Xiong, Minh Phan, Xia Song, Paul N. Bennett, and Saurabh Tiwary Knowledge-aware language model pretraining. CoRR, abs/2007.00655, 2020. URL https://arxiv.org/abs/2007.00655. # Shi-Qi Yan, Jia-Chen Gu, Yun Zhu, and Zhen-Hua Ling Corrective retrieval augmented generation. arXiv preprint arXiv:2401.15884, 2024. # Ivan Stelmakh, Yi Luan, Bhuwan Dhingra, and Ming-Wei Chang Asqa: Factoid questions meet long-form answers, 2023. # Sewon Min, Kalpesh Krishna, Xinxi Lyu, Mike Lewis, Wen-tau Yih, Pang Wei Koh, Mohit Iyyer, Luke Zettlemoyer, and Hannaneh Hajishirzi Factscore: Fine-grained atomic evaluation of factual precision in long form text generation. arXiv preprint arXiv:2305.14251, 2023. # Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher Pointer sentinel mixture models. arXiv preprint arXiv:1609.07843, 2016. # Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Jacob Devlin, Kenton Lee, Kristina Toutanova, Llion Jones, Matthew Kelcey, Ming-Wei Chang, Andrew M. Dai, Jakob Uszkoreit, Quoc Le, and Slav Petrov Natural questions: A benchmark for question answering research. Transactions of the Association for Computational Linguistics, 7:452–466, 2019. doi: 10.1162/tacl_a_00276. URL https://aclanthology.org/Q19-1026. # Jonathan Berant, Andrew Chou, Roy Frostig, and Percy Liang Semantic parsing on freebase from question-answer pairs. In Proceedings of the 2013 conference on empirical methods in natural language processing, pages 1533–1544, 2013. # Mandar Joshi, Eunsol Choi, Daniel S Weld, and Luke Zettlemoyer Triviaqa: A large scale distantly supervised challenge dataset for reading comprehension. arXiv preprint arXiv:1705.03551, 2017. # Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang Squad: 100,000+ questions for machine comprehension of text. arXiv preprint arXiv:1606.05250, 2016. # Keshav Santhanam, Omar Khattab, Jon Saad-Falcon, Christopher Potts, and Matei Zaharia Colbertv2: Effective and efficient retrieval via lightweight late interaction. arXiv preprint arXiv:2112.01488, 2021. # Vladimir Karpukhin, Barlas O˘guz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen-tau Yih Dense passage retrieval for open-domain question answering. arXiv preprint arXiv:2004.04906, 2020. # Johannes Von Oswald, Eyvind Niklasson, Ettore Randazzo, João Sacramento, Alexander Mordvintsev, Andrey Zhmoginov, and Max Vladymyrov Transformers learn in-context by gradient descent. In International Conference on Machine Learning, pages 35151–35174. PMLR, 2023. # Ekin Akyürek, Dale Schuurmans, Jacob Andreas, Tengyu Ma, and Denny Zhou What learning algorithm is in-context learning? investigations with linear models. arXiv preprint arXiv:2211.15661, 2022. # Damai Dai, Yutao Sun, Li Dong, Yaru Hao, Shuming Ma, Zhifang Sui, and Furu Wei Why can gpt learn in-context? language models implicitly perform gradient descent as meta-optimizers. arXiv preprint arXiv:2212.10559, 2022. # Yuchen Li, Yuanzhi Li, and Andrej Risteski How do transformers learn topic structure: Towards a mechanistic understanding. In International Conference on Machine Learning, pages 19689–19729.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}
PMLR, 2023. # Chi Han, Ziqi Wang, Han Zhao, and Heng Ji In-context learning of large language models explained as kernel regression. arXiv preprint arXiv:2305.12766, 2023.
Provided the following context, I want to generate QA embedding pairs for each of my classes that are 3B and 7B LLM based on increasing complexity. For the 3B model, generate simple question-answer pairs, and for the 7B model, generate slightly more complex pairs. Please format the output in JSON as: {3B: {q1:, a1:}, {q2:, a2:}}, {7B: {q1:, a1:}, {q2:, a2:}}