Skip to content

Optimize Context Builder ranking and token budget - #14

Merged
itsflaid merged 1 commit into
mainfrom
codex/optimize-context-ranking
Jun 14, 2026
Merged

Optimize Context Builder ranking and token budget#14
itsflaid merged 1 commit into
mainfrom
codex/optimize-context-ranking

Conversation

@itsflaid

Copy link
Copy Markdown
Owner

Summary

  • exclude tests, specs, and fixtures from normal product questions
  • allow test context when an English query explicitly requests tests or fixtures
  • apply conservative English scope boosts for CLI, web UI, and documentation
  • cap English navigation queries at two files and 60 lines per file
  • keep scope matching as a boost rather than a hard package exclusion
  • document focused testing and measured context reduction

Impact

The measured where scanner prompt payload on the DevMap snapshot dropped from about 20,844 characters to 4,423 characters before tokenization, while the existing evaluation remains at 20/20 top-1 accuracy and 20/20 top-3 recall.

Verification

  • pnpm --filter devmap test (53/53)
  • pnpm build:cli
  • pnpm test:package-e2e
  • git diff --check

Closes #13

Co-authored-by: devmap-agent <238585242+devmap-agent@users.noreply.github.com>
@itsflaid
itsflaid merged commit 22a8501 into main Jun 14, 2026
9 checks passed
@itsflaid
itsflaid deleted the codex/optimize-context-ranking branch June 17, 2026 12:33
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.

Optimize Context Builder ranking and token budget

1 participant