ircot  by StonyBrookNLP

Interleaving retrieval and chain-of-thought for multi-step Q&A

Created 3 years ago
253 stars

Top 99.3% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

Summary This repository implements "Interleaving Retrieval with Chain-of-Thought Reasoning" (IRCoT) for knowledge-intensive, multi-step question-answering. It addresses complex reasoning over large knowledge bases by integrating retrieval with step-by-step deduction, targeting NLP researchers and engineers. The benefit is improved accuracy and interpretability for intricate questions.

How It Works IRCoT interleaves document retrieval with chain-of-thought reasoning. Complex queries are broken down, retrieving relevant information at each step to inform subsequent deduction. The system uses Elasticsearch for retrieval and integrates with LLMs for reasoning and answer generation. This iterative process enhances robustness and explainability for multi-hop questions.

Quick Start & Requirements Requires Conda (Python 3.8.0), pip, and spaCy. Install via pip install -r requirements.txt. Data processing involves downloading pre-processed datasets or running scripts. Setup includes Elasticsearch 7.10.2 installation and corpus indexing. LLM inference supports local Flan-T5 (via llm_server) or OpenAI APIs (via OPENAI_API_KEY). Full reproduction is possible via ./reproduce.sh.

Highlighted Details

  • Implements "Interleaving Retrieval with Chain-of-Thought Reasoning" (IRCoT) for complex QA.
  • Supports benchmark datasets: HotpotQA, 2WikiMultihopQA, MuSiQue, IIRC.
  • Provides scripts for data processing, prompt generation, retriever indexing, and system reproduction.
  • Includes baseline systems (NoR, OneR) for comparison.

Maintenance & Community Associated with an ACL 2023 publication, indicating academic backing. The README lacks details on active community channels (e.g., Discord/Slack), specific maintainers, or a public roadmap, suggesting a focus on research reproducibility.

Licensing & Compatibility The repository's license is not explicitly stated in the README. This omission requires further investigation before commercial use or integration into closed-source projects.

Limitations & Caveats Codex-based experiments are deprecated due to API changes; users must adapt to alternative models. Reproducibility may be affected by random sampling in data/prompt processes. Direct support for chat-based LLM APIs is not readily available.

Health Check
Last Commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
6 stars in the last 30 days

Explore Similar Projects

Starred by Elie Bursztein Elie Bursztein(Cybersecurity Lead at Google DeepMind), Joe Walnes Joe Walnes(Head of Experimental Projects at Stripe), and
1 more.

KAG by OpenSPG

0.1%
9k
Logical reasoning framework for domain knowledge bases
Created 1 year ago
Updated 4 weeks ago
Feedback? Help us improve.