Retrieval-Augmented Generation (RAG) Using Summaries as Metadata for Efficient Retrieval
摘要
While querying documents using large language models (LLM), query and context need to be provided in order for the model to generate answers. While querying large and unstructured documents, the main problem is to get the right context retrieved from it. Retrieval-augmented generation (RAG) models are used to incorporate this external knowledge into generative AI systems. While there are several RAG strategies present, a metadata-based RAG strategy has been developed to resolve this problem by increasing the contextual accuracy and retrieval efficiency. Three different approaches have been used to develop this strategy, which includes creating summaries of each chunk using embedding technique, traditional natural language processing (NLP) technique, and LLM technique. These summaries were stored in a vector database to retrieve most relevant context from the document. All these approaches were compared to the existing RAG strategies and it was found that metadata-based RAG strategy gives better contextual accuracy.