GraphIC: A Graph-Based In-Context Example Retrieval Model for Multi-Step Reasoning
On the map: LLM reasoning → Knowledge- and tool-augmented reasoning
Abstract (arXiv)
In-context learning (ICL) enhances large language models (LLMs) by incorporating demonstration examples, yet its effectiveness heavily depends on the quality of selected examples. Current methods typically use text embeddings to measure semantic similarity, which often introduces bias in multi-step reasoning tasks. This occurs because text embeddings contain irrelevant semantic information and lack deeper reasoning structures. To address this, we propose GraphIC, a graph-based retrieval model that leverages reasoning-aware representation and specialized similarity metric for in-context example retrieval. GraphIC first constructs thought graphs-directed, node-attributed graphs that explicitly model reasoning steps and their dependencies-for candidate examples and queries. This approach filters out superficial semantics while preserving essential reasoning processes. Next, GraphIC retrieves examples using a novel similarity metric tailored for these graphs, capturing sequential reasoning patterns and asymmetry between examples. Comprehensive evaluations across mathematical reasoning, code generation, and logical reasoning tasks demonstrate that GraphIC outperforms 10 baseline methods. Our results highlight the importance of reasoning-aware retrieval in ICL, offering a robust solution for enhancing LLM performance in multi-step reasoning scenarios.
Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Placed in Knowledge- and tool-augmented reasoning, one of 17 directions in LLM reasoning. Builds on 5 of its 43 references that are in the map. First posted on arXiv 3 Oct 2024.
Builds on
5 of 43 references.
References · 5
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2023In-context Example Selection with Influencescited by 61
- 2023RetICL: Sequential Retrieval of In-Context Examples with Reinforcement Learningcited by 24
Built on by
Citing papers per year: 2025: 2.
2 papers.
Similar, not cited
Close in wording, no citation either way
- 2025Graph-Augmented Reasoning: Evolving Step-by-Step Knowledge Graph Retrieval for LLM Reasoning
- 2024Reasoning Graph Enhanced Exemplars Retrieval for In-Context Learning
- 2025G-reasoner: Foundation Models for Unified Reasoning over Graph-structured Knowledge
- 2025GRAIL:Learning to Interact with Large Knowledge Graphs for Retrieval Augmented Reasoning
- 2024Think-on-Graph 2.0: Deep and Faithful Large Language Model Reasoning with Knowledge-guided Retrieval Augmented Generation
- 2026Multi-hop Reasoning and Retrieval in Embedding Space: Leveraging Large Language Models with Knowledge
- 2025Reasoning by Exploration: A Unified Approach to Retrieval and Generation over Graphs
- 2026Structure-Grounded Knowledge Retrieval via Code Dependencies for Multi-Step Data Reasoning