Synthetic Knowledge Ingestion: Towards Knowledge Refinement and Injection for Enhancing Large Language Models (2024)

Abstract: Large language models (LLMs) are proficient in capturing factual knowledge across various domains. However, refining their capabilities on previously seen knowledge or integrating new knowledge from external sources remains a significant challenge. In this work, we propose a novel synthetic knowledge ingestion method called , which leverages fine-grained synthesis, interleaved generation, and assemble augmentation strategies to construct high-quality data representations from raw knowledge sources. We then integrate and its variations with three knowledge injection techniques: Retrieval Augmented Generation (RAG), Supervised Fine-tuning (SFT), and Continual Pre-training (CPT) to inject and refine knowledge in language models. Extensive empirical experiments are conducted on various question-answering tasks spanning finance, biomedicine, and open-generation domains to demonstrate that significantly outperforms baseline methods by facilitating effective knowledge injection. We believe that our work is an important step towards enhancing the factual accuracy of LLM outputs by refining knowledge representation and injection capabilities.

## introduction large language models (llms) demonstrate proficiency in capturing vast amounts of factual information across a wide range of fields, attributable to their extensive pre-training datasets @xcite @xcite . although these models hold an impressive repository of knowledge, integrating new information via external datasets or enhancing their capacity on previously seen information still poses several challenges. one primary challenge is outdated as an ai language model, i cannot predict the future or know the outcome of sporting events. it's impossible to determine who will win the uefa champions league 2024. ## synthetic knowledge ingestion the human learning process often involves asking questions and inquiring "why", which can enhance comprehension. drawing inspiration from this, ski also leverages the power of questions. by utilizing three key innovations, ski transforms raw knowledge (such as documents and articles) into question-augmented representations. the following section provides a detailed description of these three key innovations, as illustrated in figure 2 . ## related work incorporating new information into llms or refining their capabilities with previously seen information has posed a substantial challenge (chen et al., 2022; martino et al., 2023; zhang et al., 2023d; ye et al., 2023; zhang et al., 2023b), the lack of effective approaches and evaluations is a notable concern. recently, xu et al. (2023) explored continued pre-training with a knowledge infill objective to enhance fact retention, while tian et al. (2023) applied constrained optimization through direct preference optimization (rafailov et al., 2024) to reinforce factuality during post-training. additionally, ovadia et al. (2023) aimed to compare retrieval, fine-tuning, and their combinations but the optimal way to inject knowledge into llms remains an open and sometimes contentious debate. however, a critical knowledge ingestion gap remains: what are the data representations that work best for each injection pipeline with unprocessed and unstructured knowledge? (baek et al., 2024) to answer this, balaguer et al. (2024) extracts information from raw pdf documents, leading to questions and answers for supervised fine-tuning pipelines. mecklenburg et al. ( 2024 ) presents two data generation processes, token-based and fact-based, to inject knowledge via sft. in contrast, our study aims to develop an innovative and generic synthetic knowledge ingestion approach, ski, which achieves significant improvement for each knowledge injection pipeline. through extensive empirical analysis, our work has revealed several important findings. firstly, synthetic qa generations are highly effective in digesting knowledge from its raw format, resulting in consistent enhancement for each injection pipeline. secondly, fine-grained assemble augmentation has proven to be proficient in constructing high-quality, diverse datasets for knowledge injection. lastly, rag shows the potential to enhance knowledge, whereas the advancement of sft and cpt largely depends on selecting appropriate base models and leveraging their existing knowledge capabilities. ## ethics statement this paper studies knowledge ingestion and representation in llms, which has significant broader impacts on the field of natural language processing and helps to address ethical considerations regarding factuality and reliability. the research outcome may contribute to the development of more accurate and factual llms by mitigating the risks of misinformation and biased outputs and promoting accountability and trust in ai systems. ## limitations our current experiments focus on tasks in a question-answering setting which requires a knowledge base. further research is needed to expand to more complex tasks such as conversational or dialogue-based prompting. also, the quality of the results introduced by ski depends on the quality of the knowledge base. for ood questions or edge cases where the knowledge base is corrupted or provides conflicting information, ski is not able to solve that. ski does require llm calls to generate different representations. such jobs can be conducted offline and only once. thus the cost will be relatively reduced as it serves more queries. in addition, although advanced knowledge representations such as knowledge graphs show promise, their discussion falls beyond the scope of the current study but will appear in our future work. scheduler with a learning rate of 5e-5 and a warmup ratio of 0.1. the training lasts for 3 rounds, with the maximum gradient norm set to 1. we use amazon sagemaker g5.12xlarge and g5.24xlarge instances for training, which are powered by nvidia a10 tensor core gpus and comprise 4 gpus with 24 gb of memory each.