# chutungduongg/react_iclr_2023_reproduction architecture

> Architecture diagram of the GitHub repository chutungduongg/react_iclr_2023_reproduction, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/chutungduongg/react_iclr_2023_reproduction
- Repository: https://github.com/chutungduongg/react_iclr_2023_reproduction

## Overview

This repository is a command-line reproduction and benchmarking framework for seven reasoning methods on HotpotQA and FEVER. The main workflow is: a user starts a benchmark, the CLI resolves configuration and samples task examples, constructs a model and method-specific agent, and passes them to the experiment runner for prediction, evaluation, and artifact persistence. ReAct and Act agents use a Wikipedia environment; hybrid methods combine reasoning strategies. The map follows the README and sampled code; links for unsampled task and evaluation modules reflect documented capabilities, not inspected call sites.

Main entry points: [`src/react_reproduction/cli.py`](https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/cli.py) (CLI dispatcher), [`src/react_reproduction/llm/huggingface.py`](https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/llm/huggingface.py) (Hugging Face provider), [`src/react_reproduction/agents/react.py`](https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/agents/react.py) (ReAct agent), [`src/react_reproduction/agents/act.py`](https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/agents/act.py) (Act-only agent)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["CLI and configuration"]
  node_entry["Python entry point<br/>[main.py]"]
  node_cli["CLI dispatcher<br/>[cli.py]"]
  node_config["Run configuration<br/>[config.py]"]
end

subgraph group_data["Tasks and prompts"]
  node_hotpot["HotpotQA loader<br/>[hotpotqa.py]"]
  node_fever["FEVER loader<br/>[fever.py]"]
  node_prompts["Prompt suites"]
end

subgraph group_reasoning["Agents and retrieval"]
  node_standard["Standard and CoT"]
  node_selfconsistency["CoT-SC voting<br/>[cot_sc.py]"]
  node_act["Act-only agent<br/>[act.py]"]
  node_react["ReAct agent<br/>[react.py]"]
  node_hybrid["Hybrid agents<br/>[hybrid.py]"]
  node_parsing["Action parsing<br/>[parsing.py]"]
  node_environment["Wikipedia environment<br/>[wikipedia.py]"]
end

subgraph group_inference["Model inference"]
  node_provider["Hugging Face provider<br/>[huggingface.py]"]
end

subgraph group_benchmark["Benchmark outputs"]
  node_runner["Benchmark runner<br/>[runner.py]"]
  node_evaluators["Task evaluators<br/>[evaluators.py]"]
  node_metrics["Metric calculations<br/>[metrics.py]"]
  node_artifacts["Run artifacts<br/>[artifacts.py]"]
  node_outputs["Saved benchmark runs"]
end

node_user(("Benchmark user"))
node_wikipedia{{"MediaWiki API"}}
node_modelhub{{"Hugging Face models"}}
node_datasetservice{{"Hugging Face datasets"}}

node_user -->|"starts benchmark"| node_entry
node_entry -->|"dispatches"| node_cli
node_cli -->|"loads settings"| node_config
node_cli -->|"loads examples"| node_hotpot
node_cli -->|"loads examples"| node_fever
node_hotpot -->|"loads split"| node_datasetservice
node_fever -->|"loads split"| node_datasetservice
node_cli -->|"constructs model"| node_provider
node_provider -->|"loads model"| node_modelhub
node_cli -->|"selects method"| node_standard
node_cli -->|"selects method"| node_selfconsistency
node_cli -->|"selects method"| node_act
node_cli -->|"selects method"| node_react
node_cli -->|"selects method"| node_hybrid
node_cli -->|"selects task prompts"| node_prompts
node_standard -->|"generates answers"| node_provider
node_selfconsistency -->|"samples generations"| node_provider
node_act -->|"generates actions"| node_provider
node_react -->|"generates turns"| node_provider
node_act -->|"parses actions"| node_parsing
node_react -->|"parses turns"| node_parsing
node_act -->|"executes actions"| node_environment
node_react -->|"executes actions"| node_environment
node_environment -->|"searches and fetches"| node_wikipedia
node_hybrid -->|"invokes strategy"| node_react
node_hybrid -->|"invokes strategy"| node_selfconsistency
node_cli -->|"runs benchmark"| node_runner
node_runner -->|"evaluates predictions"| node_evaluators
node_evaluators -->|"computes scores"| node_metrics
node_runner -->|"writes run records"| node_artifacts
node_artifacts -->|"persists files"| node_outputs

click node_entry "https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/main.py"
click node_cli "https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/cli.py"
click node_config "https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/config.py"
click node_hotpot "https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/datasets/hotpotqa.py"
click node_fever "https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/datasets/fever.py"
click node_prompts "https://github.com/chutungduongg/react_iclr_2023_reproduction/tree/main/src/react_reproduction/prompts"
click node_standard "https://github.com/chutungduongg/react_iclr_2023_reproduction/tree/main/src/react_reproduction/agents"
click node_selfconsistency "https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/agents/cot_sc.py"
click node_act "https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/agents/act.py"
click node_react "https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/agents/react.py"
click node_hybrid "https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/agents/hybrid.py"
click node_parsing "https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/agents/parsing.py"
click node_environment "https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/tools/wikipedia.py"
click node_provider "https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/llm/huggingface.py"
click node_runner "https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/experiments/runner.py"
click node_evaluators "https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/evaluation/evaluators.py"
click node_metrics "https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/evaluation/metrics.py"
click node_artifacts "https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/experiments/artifacts.py"
click node_outputs "https://github.com/chutungduongg/react_iclr_2023_reproduction/tree/main/outputs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_cli,node_config,node_user toneBlue
class node_hotpot,node_fever,node_prompts toneAmber
class node_standard,node_selfconsistency,node_act,node_react,node_hybrid,node_parsing,node_environment,node_wikipedia toneMint
class node_provider toneRose
class node_runner,node_evaluators,node_metrics,node_artifacts,node_outputs,node_modelhub,node_datasetservice toneIndigo
```

## Components

### CLI and configuration

- [Python entry point](https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/main.py): `main.py`
- [CLI dispatcher](https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/cli.py): `src/react_reproduction/cli.py`
- [Run configuration](https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/config.py): `src/react_reproduction/config.py`

### Tasks and prompts

- [HotpotQA loader](https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/datasets/hotpotqa.py): `src/react_reproduction/datasets/hotpotqa.py`
- [FEVER loader](https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/datasets/fever.py): `src/react_reproduction/datasets/fever.py`
- [Prompt suites](https://github.com/chutungduongg/react_iclr_2023_reproduction/tree/main/src/react_reproduction/prompts): `src/react_reproduction/prompts`

### Agents and retrieval

- [Standard and CoT](https://github.com/chutungduongg/react_iclr_2023_reproduction/tree/main/src/react_reproduction/agents): `src/react_reproduction/agents`
- [CoT-SC voting](https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/agents/cot_sc.py): `src/react_reproduction/agents/cot_sc.py`
- [Act-only agent](https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/agents/act.py): `src/react_reproduction/agents/act.py`
- [ReAct agent](https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/agents/react.py): `src/react_reproduction/agents/react.py`
- [Hybrid agents](https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/agents/hybrid.py): `src/react_reproduction/agents/hybrid.py`
- [Action parsing](https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/agents/parsing.py): `src/react_reproduction/agents/parsing.py`
- [Wikipedia environment](https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/tools/wikipedia.py): `src/react_reproduction/tools/wikipedia.py`

### Model inference

- [Hugging Face provider](https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/llm/huggingface.py): `src/react_reproduction/llm/huggingface.py`

### Benchmark outputs

- [Benchmark runner](https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/experiments/runner.py): `src/react_reproduction/experiments/runner.py`
- [Task evaluators](https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/evaluation/evaluators.py): `src/react_reproduction/evaluation/evaluators.py`
- [Metric calculations](https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/evaluation/metrics.py): `src/react_reproduction/evaluation/metrics.py`
- [Run artifacts](https://github.com/chutungduongg/react_iclr_2023_reproduction/blob/main/src/react_reproduction/experiments/artifacts.py): `src/react_reproduction/experiments/artifacts.py`
- [Saved benchmark runs](https://github.com/chutungduongg/react_iclr_2023_reproduction/tree/main/outputs): `outputs`

### Other components

- **Benchmark user**
- **MediaWiki API**
- **Hugging Face models**
- **Hugging Face datasets**

## Connections

- Benchmark user → Python entry point: starts benchmark
- Python entry point → CLI dispatcher: dispatches
- CLI dispatcher → Run configuration: loads settings
- CLI dispatcher → HotpotQA loader: loads examples
- CLI dispatcher → FEVER loader: loads examples
- HotpotQA loader → Hugging Face datasets: loads split
- FEVER loader → Hugging Face datasets: loads split
- CLI dispatcher → Hugging Face provider: constructs model
- Hugging Face provider → Hugging Face models: loads model
- CLI dispatcher → Standard and CoT: selects method
- CLI dispatcher → CoT-SC voting: selects method
- CLI dispatcher → Act-only agent: selects method
- CLI dispatcher → ReAct agent: selects method
- CLI dispatcher → Hybrid agents: selects method
- CLI dispatcher → Prompt suites: selects task prompts
- Standard and CoT → Hugging Face provider: generates answers
- CoT-SC voting → Hugging Face provider: samples generations
- Act-only agent → Hugging Face provider: generates actions
- ReAct agent → Hugging Face provider: generates turns
- Act-only agent → Action parsing: parses actions
- ReAct agent → Action parsing: parses turns
- Act-only agent → Wikipedia environment: executes actions
- ReAct agent → Wikipedia environment: executes actions
- Wikipedia environment → MediaWiki API: searches and fetches
- Hybrid agents → ReAct agent: invokes strategy
- Hybrid agents → CoT-SC voting: invokes strategy
- CLI dispatcher → Benchmark runner: runs benchmark
- Benchmark runner → Task evaluators: evaluates predictions
- Task evaluators → Metric calculations: computes scores
- Benchmark runner → Run artifacts: writes run records
- Run artifacts → Saved benchmark runs: persists files
