Skip to content

Improve hybrid ranking with production-source intent - #736

Merged
justrach merged 2 commits into
release/0.2.5850from
codex/react-ranking-hillclimb
Aug 30, 2026
Merged

Improve hybrid ranking with production-source intent#736
justrach merged 2 commits into
release/0.2.5850from
codex/react-ranking-hillclimb

Conversation

@justrach

Copy link
Copy Markdown
Owner

Summary:

  • hill-climb ANN RRF and intent-aware path priors on 12 React production-source queries
  • demote excluded tests, fixtures, debug/server variants, and docs while preserving explicitly requested material
  • apply the same intent to symbol definitions and retain the exact lexical fallback policy
  • keep semantic-index concurrency at four after a 6,713-chunk 1/2/4/8 benchmark
  • add a reproducible held-out regression harness and measured results

Measured React retrieval:

  • train hit@5: 0.625 -> 1.000; MRR: 0.238 -> 0.729; NDCG@5: 0.186 -> 0.646; recall@5: 0.375 -> 0.719
  • held-out hit@5: 0.750 -> 1.000; MRR: 0.150 -> 1.000; NDCG@5: 0.226 -> 0.738; recall@5: 0.625 -> 0.750
  • test-like top-five pollution: 3.00 -> 0.00 train and 1.25 -> 0.00 held out

Verification:

  • zig build test --summary all: all 31 steps succeeded; four intentional skips
  • scripts/e2e_mcp_test.py: 76/76 passed
  • focused React useState probe ranks ReactHooks.js and ReactFiberHooks.js first, with the production public hook selected as the first definition
  • git diff --check passed

@github-actions

Copy link
Copy Markdown

👋 Thanks for the contribution! Quick heads-up: this repo lands changes on the current release/* branch, not main.

Please retarget this PR via Edit → base branch to the active release/* branch shown in the repository branch list.

(Automated hint — reply here if you need a hand.)

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 30, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-30T10:42:06.423224Z 845cc68 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@justrach
justrach changed the base branch from main to release/0.2.5850 August 30, 2026 10:40

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 845cc68eb1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/mcp.zig
Comment on lines +3672 to +3675
.exclude_debug = (exclusion_clause and mentions_debug) or
(production_source and !mentions_debug),
.exclude_server = (exclusion_clause and mentions_server) or
(production_source and containsAsciiIgnoreCase(task, "client") and !mentions_server),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Scope exclusions to the referenced path class

When a task requests server code but separately excludes another class—such as the added fizz-streaming query, which asks about “server rendering” and then says “Exclude tests and fixtures”—the global exclusion_clause and mentions_server flags incorrectly set exclude_server. The desired server files are consequently multiplied by 0.05 in hybrid ranking and omitted entirely from symbol definitions, including every primary gold file for that benchmark query. The replay harness does not reproduce this behavior because it only demotes servers for phrases such as server-only or client implementation, so its reported gains cannot detect the regression; associate each exclusion with its actual object instead.

AGENTS.md reference: AGENTS.md:L19-L19

Useful? React with 👍 / 👎.

@justrach
justrach merged commit 0860501 into release/0.2.5850 Aug 30, 2026
3 of 4 checks passed
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