Skip to content

feat(bench): multi-hop eval harness — A4 iterative-retrieval arm + scoring#40

Merged
muhammadkh4n merged 1 commit into
mainfrom
feat/multihop-eval-harness
Jun 10, 2026
Merged

feat(bench): multi-hop eval harness — A4 iterative-retrieval arm + scoring#40
muhammadkh4n merged 1 commit into
mainfrom
feat/multihop-eval-harness

Conversation

@muhammadkh4n

Copy link
Copy Markdown
Owner

Building blocks for the A1/A3/A4 multi-hop eval (the "does a working graph beat
iterative retrieval on its home turf" experiment). Bench-only — no runtime change
to any shipped package.

What's here

  • retrieval/iterative.ts — dependency-injected iterative/agentic retrieval
    (retrieve -> LLM names the bridge -> re-retrieve). The A4 arm: the cheap
    no-graph multi-hop competitor. recall and proposeNextQuery are injected so
    the control flow is unit-testable without OpenAI/Neo4j.
  • multihop/types.ts + scoring.ts — normalized MuSiQue / 2WikiMultiHopQA /
    HotpotQA item shape + judge-free metrics (recall@K, all-support@K, and
    bridge-recall@K, which isolates the dissimilar hop-2 evidence single-shot
    dense misses).

Not yet wired

Dataset loaders, the adapter .run, the BenchmarkOpts.iterative flag, and the
arms runner land next — those need the real datasets and run on the bench host.

Test plan

  • 13 unit tests (iterative control flow incl. bridge recovery; scoring), all
    Mac-runnable (type-only core imports). bench 36/36, tsc clean.

Stage-1 building blocks for the A1/A3/A4 multi-hop eval (D2). No wiring
yet — the dataset loaders, the adapter, and the BenchmarkOpts.iterative
flag land next.

- retrieval/iterative.ts: dependency-injected iterative/agentic retrieval
  (retrieve -> LLM names the bridge -> re-retrieve). recall and
  proposeNextQuery are injected so the control flow is unit-testable with no
  OpenAI/Neo4j. A round-robin rank interleave reserves top-K slots for each
  hop's evidence so the round-2 bridge survives into top-K; cycle, maxRounds,
  and STOP guards bound the loop.
- multihop/types.ts: normalized MultiHopItem for MuSiQue / 2WikiMultiHopQA /
  HotpotQA-distractor — one shape so the arms stay dataset-agnostic.
- multihop/scoring.ts: judge-free retrieval metrics — recall@K, all-support@K,
  and bridge-recall@K (hop > 1 supporting paragraphs), the metric that isolates
  the dissimilar hop-2 evidence single-shot dense misses. Bridge recall is
  not-applicable (null) for datasets that do not label hops.

Tests: 13 new (7 iterative control-flow incl. bridge recovery, 6 scoring),
all Mac-runnable (type-only core imports, no native bindings). tsc clean.
@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@muhammadkh4n, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 59 minutes and 4 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4be9f1b6-0d5c-4d2e-bf2a-659e1ecefa71

📥 Commits

Reviewing files that changed from the base of the PR and between 2d3daef and 2c8a05b.

📒 Files selected for processing (5)
  • packages/bench/src/multihop/scoring.ts
  • packages/bench/src/multihop/types.ts
  • packages/bench/src/retrieval/iterative.ts
  • packages/bench/test/iterative.test.ts
  • packages/bench/test/multihop-scoring.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/multihop-eval-harness

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@muhammadkh4n muhammadkh4n merged commit 62dda04 into main Jun 10, 2026
2 checks passed
@muhammadkh4n muhammadkh4n deleted the feat/multihop-eval-harness branch June 10, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant