Retrieval-augmented generation (RAG) addresses the problem of knowledge cutoff and overcomes the inherent limitations of pre-trained language models by retrieving relevant information in real time. However, challenges related to efficiency and accuracy persist in current RAG strategies. A key issue is how to select appropriate methods for user queries of varying complexity dynamically. This study introduces a novel adaptive retrieval-augmented generation framework termed Layered Query Retrieval (LQR). The LQR framework focuses on query complexity classification, retrieval strategies, and relevance analysis, utilizing a custom-built training dataset to train smaller models that aid the large language model (LLM) in efficiently retrieving relevant information. A central technique in LQR is a semantic rule-based approach to distinguish between different levels of multi-hop queries. The process begins by parsing the user’s query for keywords, followed by a keyword-based document retrieval. Subsequently, we employ a natural language inference (NLI) model to assess whether the retrieved document is relevant to the query. We validated our approach on multiple single-hop and multi-hop datasets, demonstrating significant improvements in both accuracy and efficiency compared to existing single-step, multi-step, and adaptive methods. Our method exhibits high accuracy and efficiency, particularly on the HotpotQA dataset, where it outperforms the Adaptive-RAG method by improving accuracy by 9.4% and the F1 score by 16.14%. The proposed approach carefully balances retrieval efficiency with the accuracy of the LLM’s responses.
Aspect-based sentiment analysis (ABSA), which aims to extract aspects and corresponding opinions from sentences and determine aspect sentiment polarity, has been widely studied in recent years. Most approaches focus on the subtasks of ABSA and deal with them in the pipeline method or end-to-end method. However, these approaches ignore the semantic information of the labels and the correlation between the labels. In this study, we process various ABSA tasks in a unified generative framework and use instruction prompts to guide the generative model to learn the relationships between different sentiment elements, accurately identify the sentiment elements in sentences, and improve the performance of the model in few-shot learning. Experimental results on several benchmark datasets show that our approach achieves significant performance gains. Among them, for the aspect term extraction and sentiment classification task on the Laptop 14 dataset, our method improves the F1 score by 4.08% and 1.87% on fully supervised learning compared to the GAS model and PARA model, respectively. In few-shot learning, we can achieve 80% of the fully supervised learning performance using one-tenth of the dataset. Our method can effectively address the problem of data shortage in low-resource environments.
Aspect-based sentiment analysis is a fine-grained sentiment analysis task that consists of two types of subtasks: aspect term extraction and aspect sentiment classification. In the aspect term extraction task, current methods suffer from the lack of fine-grained information in aspect term extraction and difficulty in identifying aspect term boundaries. In the aspect sentiment classification task, the current aspect sentiment classifier cannot adapt itself to the text and determine the local context. To address these two challenges, this work proposes an adaptive semantic relative distance approach based on dependent syntactic analysis, which uses adaptive semantic relative distance to determine the appropriate local context for each text and increase the accuracy of sentiment analysis. Meanwhile, the study also predicts the current word labels by combining local information features extracted by local convolutional neural networks and global information features to precisely locate the word labels. In two subtasks, our proposed model improves accuracy and F1 scores on the SemEval-2014 Task 4 Restaurant and Laptop datasets compared to the state-to-the-art approaches, especially in the aspect sentiment classification subtask.