Skip to content

feat(core): diversify and accelerate agentic retrieval - #162

Closed
jb-thery wants to merge 7 commits into
developfrom
feature/agentic-rag-performance
Closed

feat(core): diversify and accelerate agentic retrieval#162
jb-thery wants to merge 7 commits into
developfrom
feature/agentic-rag-performance

Conversation

@jb-thery

Copy link
Copy Markdown
Member

Summary

Improve Ragmir retrieval quality and latency by diversifying the final evidence window, keeping lexical fallback available beyond 10,000 chunks, and removing avoidable context and embedding work. The public surface now presents Ragmir consistently as a private, bounded evidence layer for agentic RAG.

Changes

Added

  • Apply a predictable per-document cap after scoring with oversampling and deterministic backfill.
  • Preserve the same diversity invariant after multi-query research fusion.
  • Add fail-closed benchmark comparison contracts and fixed-cap diversity metrics.

Changed

  • Cache local-hash features per call and overlap lexical and vector candidate acquisition.
  • Scan lexical fallback rows in batches and retain scored exact-path matches when FTS is unavailable.
  • Keep compact MCP results lean and align evaluation hits with the requested top-k.
  • Refresh compatible workspace dependencies without raising the Node 22 runtime floor.
  • Align English and French landing, SEO, setup prompts, READMEs, and machine-readable documentation.

Fixed

  • Reject incomplete, ineligible, or out-of-domain benchmark reports instead of producing false passes.
  • Keep visible localized FAQ content without obsolete FAQPage structured data.

How to Test

  • Run pnpm validate.
  • Run the quality benchmark and compare both reproducible runs.
  • Run rgr search "<query>" --top-k 25 and inspect unique documents in the first 10 results.
  • Build and inspect the English and French landing pages on desktop and mobile.

Verification

  • pnpm validate: passed.
  • Core: 55 files and 545 tests passed; workspace total: 632 tests passed.
  • Quality benchmark: reproducible and eligible, recall@10 1.0, exact citation rate 1.0, false positive rate 0.
  • Local-hash benchmark: identical fingerprint with approximately 31.8x higher throughput.
  • Browser proof: English, French, and French mobile layouts passed with no console or network errors.
  • GitNexus: refreshed at the reviewed head and impact scope verified.

Release highlights:
- Keep supported dependencies current without raising the Node 22 runtime floor.

Release details:
- Upgrade TypeScript, html-to-text, Lucide, Commander, and Node type ranges conservatively.
- Keep LanceDB and Arrow on their validated compatibility set and add HTML parsing coverage.

Verification:
- pnpm install --frozen-lockfile
- pnpm check
Release highlights:
- Keep the local TTS validation reliable on slower machines.

Release details:
- Extend the bounded readiness-marker wait without changing production behavior.

Verification:
- pnpm --filter @jcode.labs/ragmir-tts test -- src/index.test.ts
Release highlights:
- Return trustworthy retrieval candidates faster, including when the FTS index is unavailable.

Release details:
- Cache local-hash features per call and overlap lexical and vector candidate acquisition.
- Scan fallback rows in batches and preserve scored exact-path matches beyond the vector pool.

Verification:
- pnpm --filter @jcode.labs/ragmir test -- src/embeddings.test.ts src/query.test.ts
- Core test suite: 55 files and 545 tests passed
Release highlights:
- Use the top-k window for broader document evidence while still returning the requested count.

Release details:
- Apply a predictable per-document cap after ranking with non-overlapping backfill.
- Reapply diversity after multi-query research fusion and preserve evidence span metadata.

Verification:
- pnpm --dir packages/ragmir-core exec vitest run src/research.test.ts
- pnpm --dir packages/ragmir-core exec vitest run src/retrieval-diversity.test.ts src/ranking.test.ts
Release highlights:
- Keep compact MCP answers lean and evaluation hits faithful to the requested top-k.

Release details:
- Avoid context hydration for compact MCP search and ask responses while retaining full mode.
- Limit hit and citation matching to top-k while preserving independent recall-at-10 metrics.

Verification:
- pnpm --dir packages/ragmir-core exec vitest run src/evaluate.test.ts src/mcp.test.ts
Release highlights:
- Prevent incomplete or ineligible benchmark reports from producing false quality passes.

Release details:
- Validate both runs, suite eligibility, workload identity, and bounded metric domains.
- Separate measured fingerprints from workload identity and report fixed-cap document diversity.

Verification:
- pnpm --dir packages/ragmir-core exec vitest run src/benchmark-comparison.test.ts
- Quality benchmark self-comparison passed with 22 required metrics
Release highlights:
- Explain Ragmir as a private, bounded evidence layer for agentic RAG in English and French.

Release details:
- Align the setup prompt, READMEs, API limits, Context7 metadata, and machine-readable copy.
- Correct localized canonical, hreflang, social metadata, and visible FAQ contracts.

Verification:
- pnpm --filter @jcode.labs/ragmir-landing test
- pnpm public:smoke
- Browser proof completed for English, French, and mobile layouts
@jb-thery jb-thery self-assigned this Aug 19, 2026
@jb-thery

Copy link
Copy Markdown
Member Author

Superseded by #163 to correct a commit-message line-length failure. The replacement branch has the identical Git tree and seven locally verified signed commits.

@jb-thery jb-thery closed this Aug 19, 2026
@jb-thery
jb-thery deleted the feature/agentic-rag-performance branch August 19, 2026 16:10
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