The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Beyond Chunking: Node Integrity and Field Structure in Bengali Retrieval-Augmented Agent Memory
Official anonymized reproduction suite for the paper:
"Beyond Chunking: Node Integrity and Field Structure in Bengali Retrieval-Augmented Agent Memory"
Overview
This repository provides complete, self-contained artifacts, datasets, experimental code, and evaluation oracles to independently verify all empirical claims, tables, and mechanistic analyses presented in the paper.
The suite evaluates a three-level representation ladder across three Bengali domains:
- $L_1$ (Chunked Unstructured): Source documents split into fixed 500-character windows.
- $L_2$ (Full-Node Unstructured): Coherent records kept intact as single documents without field demarcation.
- $L_3$ (Structured BM25F): Intact records indexed into distinct functional field slots (uniform unit weighting $M_3^u$ and benchmark-fitted ceiling $M_3^t$).
Repository Structure
reproducibility/
βββ README.md # This master reproduction guide
βββ requirements.txt # Pinned Python package dependencies
βββ LICENSE-CODE # MIT License for source code
βββ LICENSE-DATA.md # CC-BY-4.0 licensing declaration for benchmark data
βββ verify_paper_numbers.py # Automated paper-number oracle audit gate (< 2s execution)
βββ reproduce_all.py # Master end-to-end headless CLI reproduction runner
β
βββ dataset/ # Benchmark data & cryptographic checksums
β βββ manifest.json # SHA-256 hashes and census for all 20 benchmark files
β βββ DATA_SOURCES.md # Detailed provenance, licenses, and collection protocols
β βββ processed/ # Fully processed benchmark partitions (Agri, Legal, Edu)
β β βββ agriculture/ # 1,028 nodes, 4,526 chunks, 2,000 queries, gold mappings
β β βββ legal/ # 735 acts, 4,202 chunks, 1,100 queries, gold mappings
β β βββ education/ # 190 experiments, 892 chunks, 570 queries, gold mappings
β βββ derived/ # Standardized evaluation subsets
β βββ agent_subsets/ # 872 common subset + 28 documented network timeouts
β βββ perturbation_subsets/ # 300-query counterfactual perturbation sample
β
βββ notebooks/ # Interactive Jupyter Notebooks with cached cell outputs
β βββ 01_agriculture_experiments.ipynb # Full agricultural advisory pipeline
β βββ 02_legal_experiments.ipynb # Bangladesh statutory law experiments
β βββ 03_education_experiments.ipynb # Secondary science procedural experiments
β βββ 04_agent_memory_experiments.ipynb # ReAct agent memory & perturbation evaluations
β
βββ scripts/ # Modular headless CLI execution pipeline
β βββ 03_validate_data.py # Cryptographic hash and referential integrity audit gate
β βββ 07_run_core_bm25.py # Reproduces Table 2 (L1 vs L2 vs L3 flat)
β βββ 08_run_uniform_bm25f.py # Reproduces Table 2 (L3 uniform BM25F)
β βββ 09_tune_bm25f_ceiling.py # Reproduces Table 10 & Table 11 (Tuned ceiling)
β βββ 10_diagnose_fragmentation.py # Reproduces Table 3 (Diagnostic failure attribution)
β βββ 13_field_shuffle.py # Reproduces Table 4 (Counterfactual field shuffles)
β βββ 14_run_agent.py # Reproduces Table 5 (Agent memory benchmark)
β βββ 15_agent_anchor_shuffle.py # Reproduces Table 6 (Counterfactual agent grounding)
β βββ 20_evaluate_all.py # Executes all evaluation scripts sequentially
β βββ 23_verify_paper_numbers.py # Top-level CLI entrypoint for the verification oracle
β
βββ src/ # Modular core library
β βββ memory_backends.py # Unified memory backends (BM25Okapi, FullNode, BM25F)
β βββ agent_runner.py # ReAct agent runtime with token accounting and logging
β
βββ outputs/ # Precompiled empirical results matching paper tables
βββ retrieval/ # Standalone sparse retrieval metrics (Tables 2, 8, 10)
βββ failure_diagnosis/ # Diagnostic attribution partitions (Table 3)
βββ counterfactuals/ # Field shuffle results (Table 4)
βββ agent_memory/ # Agent recall, citation grounding, and traces (Tables 5, 6)
Quickstart (Under 2 Minutes)
1. Environment Setup
# Clone the repository
git clone <anonymous-github-repo-url>
cd reproducibility
# Create and activate a virtual environment
python -m venv venv
source venv/bin/activate # On Linux/macOS
# .\venv\Scripts\activate # On Windows
# Install dependencies
pip install -r requirements.txt
2. Run the 10-Second Paper Verification Oracle
To verify that all empirical numbers reported in the paper's tables and prose match the experimental codebase exactly, run:
python verify_paper_numbers.py
This script asserts every metric in the paper against saved evaluation outputs, verifying:
- Table 1: Benchmark node, chunk, and query census (1,953 nodes, 9,620 chunks, 3,670 queries).
- Table 2: Representation ladder Recall@10 across all 3 domains ($L_1 \to L_2 \to L_3$).
- Table 3: Fragmentation failure recovery categorization ($n=731$ recovered queries).
- Table 4: Counterfactual perturbation controls (Unshuffled reference, Full, Content, Identity).
- Table 5: Agent memory performance on the 872-query common subset ($M_1, M_2, M_3^u, M_3^t$).
- Table 6: Counterfactual agent memory grounding ($N=300$).
- Tables 8, 10, 12: Standalone ablations, tuned BM25F ceilings, and dense model baselines.
3. Run the Cryptographic Data Integrity Gate
To independently audit the integrity of the corpus, referential query-to-node mappings, and SHA-256 hashes of all 20 registered files:
python scripts/03_validate_data.py
Expected output: ```text
DATA VALIDATION AUDIT: PASS All experimental datasets, hashes, subsets, and mappings are verified.
---
## Paper Table to Code Mapping
Every table in the paper corresponds directly to an automated CLI script, a precomputed JSON artifact, and an interactive notebook:
| Paper Table | Description | Headless CLI Script | Interactive Notebook | Saved Artifact |
|:---|:---|:---|:---|:---|
| **Table 1** | Corpus and Query Census | `scripts/03_validate_data.py` | `01_agriculture`, `02_legal`, `03_education` | `dataset/manifest.json` |
| **Table 2** | Representation Ladder (R@10) | `scripts/07_run_core_bm25.py`<br>`scripts/08_run_uniform_bm25f.py` | `01_agriculture`, `02_legal`, `03_education` | `outputs/retrieval/core_bm25_results.json`<br>`outputs/retrieval/uniform_bm25f_results.json` |
| **Table 3** | Fragmentation Failure Diagnosis | `scripts/10_diagnose_fragmentation.py` | `01_agriculture`, `02_legal`, `03_education` | `outputs/failure_diagnosis/l1_l2_diagnosis_summary.json` |
| **Table 4** | Counterfactual Field Shuffles | `scripts/13_field_shuffle.py` | `01_agriculture`, `02_legal`, `03_education` | `outputs/counterfactuals/table4_field_shuffle_results.json` |
| **Table 5** | Agent Memory Performance ($n=872$) | `scripts/14_run_agent.py` | `04_agent_memory_experiments.ipynb` | `outputs/agent_memory/table5_agent_results.json` |
| **Table 6** | Agent Memory Permutations ($N=300$) | `scripts/15_agent_anchor_shuffle.py` | `04_agent_memory_experiments.ipynb` | `outputs/agent_memory/table6_agent_perturbation_results.json` |
| **Table 8** | Standalone Field-Group Ablations | Notebook cell executions | `01_agriculture`, `02_legal`, `03_education` | `outputs/retrieval/ablation_group_metrics.json` |
| **Table 10** | Tuned BM25F Ceilings ($L_3^t$) | `scripts/09_tune_bm25f_ceiling.py` | `01_agriculture`, `02_legal`, `03_education` | `outputs/retrieval/tuned_ceiling_results.json` |
| **Table 12** | Dense & Hybrid Robustness Checks | Notebook cell executions | `01_agriculture`, `02_legal`, `03_education` | `outputs/retrieval/dense_hybrid_results.json` |
---
## Interactive Notebooks
All four notebooks in `notebooks/` are pre-executed with cell outputs retained, enabling reviewers to inspect results immediately without re-running long dense model or LLM inference loops:
* **`notebooks/01_agriculture_experiments.ipynb`:** Evaluates 1,028 agricultural nodes across Dhaka standard and 16 regional dialects; reproduces Tables 2, 3, 4, 8, 10, and 12.
* **`notebooks/02_legal_experiments.ipynb`:** Evaluates 735 statutory acts and 1,100 citizen legal inquiries; demonstrates the legal counterexample where uniform fielding trails intact full nodes ($77.82\%$ vs. $79.55\%$).
* **`notebooks/03_education_experiments.ipynb`:** Evaluates 190 secondary science lab experiments; isolates the $+52.46$pp anti-fragmentation recovery.
* **`notebooks/04_agent_memory_experiments.ipynb`:** Evaluates the ReAct agent (`gemini-2.5-flash-lite`, 1 tool, at most 2 calls) across memory conditions $M_1, M_2, M_3^u, M_3^t$ and counterfactual anchor shuffles.
Each notebook features automatic environment detection: works seamlessly locally, on Google Colab, or in Kaggle notebook environments.
---
## Data Provenance and Licensing
* **Source Materials:**
* **Agriculture:** Derived from the Agricultural Information Service (AIS) and Directorate of Agricultural Extension (DAE), Ministry of Agriculture, Bangladesh.
* **Legal:** Derived from official statutory enactments published under the Bangladesh Code, Legislative and Parliamentary Affairs Division, Ministry of Law.
* **Education:** Derived from secondary school science laboratory curricula published by the National Curriculum and Textbook Board (NCTB).
* **Licenses:**
* Source code is released under the **MIT License** ([LICENSE-CODE](LICENSE-CODE)).
* Curated benchmark records, queries, and evaluation splits are licensed under **Creative Commons Attribution 4.0 International (CC-BY-4.0)** ([LICENSE-DATA.md](LICENSE-DATA.md)).
* For full provenance and reconstruction instructions, see [`dataset/DATA_SOURCES.md`](dataset/DATA_SOURCES.md).
---
## Anonymity and Compliance
This repository is submitted in full compliance with the double-blind review policy:
* All author identities, personal emails, institutional affiliations, and local development paths have been scrubbed.
* All evaluation numbers in the paper correspond strictly to frozen benchmark configurations without post-hoc data alterations.
- Downloads last month
- 80