Skip to content

feat(core): diversify retrieval results by document - #161

Merged
jb-thery merged 2 commits into
mainfrom
release/retrieval-diversification
Aug 19, 2026
Merged

feat(core): diversify retrieval results by document#161
jb-thery merged 2 commits into
mainfrom
release/retrieval-diversification

Conversation

@jb-thery

Copy link
Copy Markdown
Member

Production promotion

Highlights

  • diversify ranked retrieval by document with a configurable default cap of one chunk
  • preserve the requested result count through internal over-retrieval and ranked backfill
  • scan lexical fallback in batches when eligible corpora exceed the configured scan limit
  • apply the same behavior to search, ask, MCP, portable status, and evaluation

Dependencies

  • refresh compatible workspace dependencies
  • pin patched sharp and protobufjs transitive versions
  • keep intentional major upgrades deferred where runtime or storage compatibility needs dedicated work

Compatibility

maxChunksPerDocument defaults to 1. Set a larger value when a workflow intentionally needs several chunks from one document. Context radius, include-path filtering, and explain output remain supported. MMR remains experimental rather than becoming the default.

Verification

  • pnpm validate on the exact release branch
  • 609 tests across Core, Chat, TTS, and the landing
  • pnpm audit --audit-level moderate: no known vulnerabilities
  • reference quality benchmark: 100/100 cases, recall@10 1.000, no prior green case regressed
  • manual CLI comparison: 10/10 distinct documents in the first ten results by default versus 6/10 uncapped
  • staging PR feat(core): diversify retrieval results by document #160 and post-merge CI, Linux, macOS, Commitlint, and CodeQL checks passed

Release highlights:
- Keep runtime, build, and publishing dependencies current and vulnerability-free.

Release details:
- Upgrade compatible dependencies across Core, Chat, TTS, and the landing site.
- Pin patched sharp and protobufjs transitive versions.
- Align PDF cleanup and Chat runtime metadata with the updated packages.

Verification:
- pnpm validate
- pnpm audit --audit-level moderate
Release highlights:
- Return broader document coverage without reducing the requested result count.
- Keep lexical fallback complete when the corpus exceeds one scan batch.

Release details:
- Add a configurable document cap with internal over-retrieval and ranked backfill.
- Apply diversification to CLI, MCP, ask, evaluation, portable status, and explanations.
- Scan fallback batches across the full eligible corpus and document MMR tradeoffs.

Verification:
- pnpm validate
- Quality benchmark: 100/100 cases, reproducible, recall@10 1.000.
- Manual CLI: 10/10 distinct documents by default versus 6/10 uncapped.
@jb-thery jb-thery self-assigned this Aug 19, 2026
@jb-thery
jb-thery merged commit e2b9e16 into main Aug 19, 2026
15 checks passed
@jb-thery
jb-thery deleted the release/retrieval-diversification branch August 19, 2026 10:15
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 4.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant