SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2412.07618 · 2024

Adapting to Non-Stationary Environments: Multi-Armed Bandit Enhanced Retrieval-Augmented Generation on Knowledge Graphs

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 7 functions out of this paper's own repositories and ran 1 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
futureeeeee/dynamic-rag canonical 1 of 7
FunctionStatusWhere it lives
softmax Ran futureeeeee/dynamic-rag/utils.py
pointer only (licence: NONE) · get_code("69e582d84850bb60")
compute_metrics Not yet run futureeeeee/dynamic-rag/nn_router.py
pointer only (licence: NONE) · get_code("6acfe88d09a11a54")
load_model Not yet run futureeeeee/dynamic-rag/nn_router.py
pointer only (licence: NONE) · get_code("7ac17353eba9bc3d")
multi_label_metrics Not yet run futureeeeee/dynamic-rag/nn_router.py
pointer only (licence: NONE) · get_code("6008a0f769373e64")
prepare_prompts Not yet run futureeeeee/dynamic-rag/utils.py
pointer only (licence: NONE) · get_code("884fefcc0d37c80e")
print_on_first_call Not yet run futureeeeee/dynamic-rag/utils.py
pointer only (licence: NONE) · get_code("22d39c4ec95ef984")
update_metric Not yet run futureeeeee/dynamic-rag/preprocess.py
pointer only (licence: NONE) · get_code("ceec98f51a5040dd")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Despite the superior performance of Large language models on many NLP tasks, they still face significant limitations in memorizing extensive world knowledge. Recent studies have demonstrated that leveraging the Retrieval-Augmented Generation (RAG) framework, combined with Knowledge Graphs that encapsulate extensive factual data in a structured format, robustly enhances the reasoning capabilities of LLMs. However, deploying such systems in real-world scenarios presents challenges: the continuous evolution of non-stationary environments may lead to performance degradation and user satisfaction requires a careful balance of performance and responsiveness. To address these challenges, we introduce a Multi-objective Multi-Armed Bandit enhanced RAG framework, supported by multiple retrieval methods with diverse capabilities under rich and evolving retrieval contexts in practice. Within this framework, each retrieval method is treated as a distinct ``arm''. The system utilizes real-time user feedback to adapt to dynamic environments, by selecting the appropriate retrieval method based on input queries and the historical multi-objective performance of each arm. Extensive experiments conducted on two benchmark KGQA datasets demonstrate that our method significantly outperforms baseline methods in non-stationary settings while achieving state-of-the-art performance in stationary environments. Code and data are available at https://github.com/FUTUREEEEEE/Dynamic-RAG.git

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2412.07618")
get_code_for_paper("2412.07618")
have("2412.07618")

Connect an agent — have() is free.