RANGER: Retrieval Agent for Navigating Graphs with Semantic Evaluation Rewards
Organizations: Skolkovo Institute of Science and Technology (Skoltech), Moscow, Russia · Moscow Institute of Physics and Technology (MIPT), Moscow, Russia · AIRI, Moscow, Russia
Abstract
The integration of Large Language Models and Reinforcement Learning offers a promising direction for complex sequential decision-making tasks, such as multi-hop question answering over knowledge graphs. While LLMs provide strong semantic understanding and reasoning capabilities, they often struggle with precise, multi-step navigation in structured environments. Conversely, RL agents excel at learning navigation policies but are hindered by the difficulty of designing semantically meaningful reward functions. This paper introduces a novel hybrid approach in which an LLM serves as a mentor to an RL agent during training by providing dense, semantically informed reward signals. The RL agent, built on a Transformer-based policy and trained with Group Relative Policy Optimization, learns to navigate a knowledge graph to retrieve relevant information. The LLM evaluates the semantic relevance of the agent's traversed paths, generating reward signals that align the agent's behavior with the information needs expressed in a query. We integrate this Retrieval Agent for Navigating Graphs with Semantic Evaluation Rewards (RANGER) into a complete question-answering pipeline and evaluate it on the open question answering datasets. Experimental results show that the proposed approach outperforms both a baseline retrieval-augmented system with classical graph search and one using an RL agent trained with heuristic rewards, achieving a significant increase in NLP metrics and LLM-as-a-Judge scores. Our findings demonstrate that deep integration of LLMs into the RL training loop yields more effective and semantically aligned retrieval policies for complex reasoning tasks.
Figures & tables
| Dataset | # Nodes | # Edges |
|---|---|---|
| HotpotQA | 71,335 | 195,614 |
| DiaASQ | 54,220 | 239,517 |
| TriviaQA | 123,135 | 334,868 |
| Method | RL Algorithm | LLM Judge | BLEU-1 | BLEU-2 | ROUGE-L | METEOR | Exact Match |
|---|---|---|---|---|---|---|---|
| Random Walk | — | 0.373 | 0.263 | 0.314 | 0.355 | 0.257 | 0.260 |
| WaterCircles | — | 0.673 | 0.455 | 0.324 | 0.578 | 0.452 | 0.467 |
| RANGER(H) | PPO | 0.657 | 0.434 | 0.305 | 0.545 | 0.432 | 0.440 |
| RANGER(LLM) | PPO | 0.691 | 0.437 | 0.304 | 0.565 | 0.451 | 0.447 |
| RANGER(H) | GRPO | 0.677 | 0.419 | 0.277 | 0.563 | 0.424 | 0.460 |
| RANGER(LLM) | GRPO | 0.697 | 0.467 | 0.340 | 0.585 | 0.468 | 0.493 |
| Graph | RL Algorithm | Method | LLM Judge | BLEU-1 | BLEU-2 | ROUGE-L | METEOR | Exact Match |
|---|---|---|---|---|---|---|---|---|
| HotpotQA | — | WaterCircles | 0.673 | 0.455 | 0.324 | 0.578 | 0.452 | 0.467 |
| GRPO | RANGER(H) † | 0.767 | 0.505 | 0.350 | 0.651 | 0.509 | 0.533 | |
| RANGER(LLM) † | 0.810 | 0.546 | 0.367 | 0.674 | 0.535 | 0.540 | ||
| PPO | RANGER(H) † | 0.743 | 0.507 | 0.344 | 0.630 | 0.498 | 0.520 | |
| RANGER(LLM) † | 0.767 | 0.524 | 0.352 | 0.647 | 0.509 | 0.520 | ||
| TriviaQA | — | WaterCircles | 0.850 | 0.600 | 0.297 | 0.695 | 0.527 | 0.580 |
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
Knowledge Graph Question Answering
Knowledge Graph Question Answering answers natural-language questions by finding and reasoning over entities and relations in structured knowledge graphs.
See all 165 papers