You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RecursiveChunker.chunk() returns duplicate chunk IDs when a long paragraph is split into several sentence groups. Three different returned chunks can all have id: "recursive-0". An ingestion application that keys records by the returned ID cannot distinguish those chunks; this report does not claim to have tested a particular vector database.
Steps To Reproduce
Using the unchanged public exports of @voltagent/rag on upstream main at 72a46c76b4507e1f98b41d5050a92bd30587eb70:
IDs should distinguish each chunk returned by one call, including sentence groups and token fallback chunks across paragraphs. Chunk contents and overlap behavior should stay the same.
Packages
@voltagent/rag 1.0.2 source on current main; Node.js 24.19.0, Windows. Reproduced with the actual package source and its declared js-tiktoken dependency, not a recreated implementation. No model, API key, or external service is involved.
Additional Context
The sentence-group expansion computes IDs from chunks.length before any expanded chunks are appended. I plan to assign final IDs after expansion and add public-API regressions for sentence-only and mixed sentence/token output. Searched existing issues and open PRs for RecursiveChunker and chunk IDs; did not find a matching fix. PR #893 introduces a separate document utility package, while #1459 and #1463 address JSON handling.
AI disclosure: Codex investigated and reproduced this under LJK-ikun's direction. This report describes the observed local output; it does not assert independent human testing.
Activity