fix(research): keep decimals intact when splitting citation claims - #278
vishnujayvel wants to merge 1 commit into
Conversation
The citation-graph sentence splitter treated '.' inside numbers like $62.3 as a boundary, so claim text started mid-number. Skip '.' only when flanked by digits; abbreviations remain a known limitation.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe citation graph sentence splitter now preserves decimal values. Regression tests verify complete claims, correct sentence boundaries, source-index mappings, and confidence levels for decimal-containing research synthesis text. ChangesCitation decimal handling
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Thanks for the review, and for independently probing To restate the limitation plainly so it isn't lost if this gets revisited: abbreviations |
|
Thanks @Frankie-Xu for the careful reviews and re-verification — and for confirming the |
|
Hi @vishnujayvel — thank you for this PR, and I'm sorry it's been sitting here without a proper review. I've been heads-down building some pretty big features and improvements for wigolo, and as a solo dev, shipping that while also reviewing and maintaining every issue and PR has been genuinely hard. This one isn't forgotten — it just hasn't had the attention it deserves yet. I'd really appreciate your patience here. I'm going to work through the open PRs and issues properly over the next few weeks (sooner if I can free up), and I'll follow up right here. In the meantime, the wigolo Discord is open if you'd like to follow what's being built, ask questions, or nudge me directly: https://discord.gg/BkUUgz2bNF Thanks again for contributing, and for understanding — it genuinely means a lot. 🙏 |
What & why
buildCitationGraphsplits synthesis text into claims with a regex that treats every.as a sentence boundary. Decimal amounts in the report ($62.3 billion,27.7 percent) were therefore cut mid-number, socitation_graph[].claimstarted after the decimal ("3 billion...","7 percent...") while the report body itself stayed correct.Fixes #274.
Credit: @oQAQo1 for the repro and root-cause analysis (sentence split at
digit.digitinsrc/research/citation-graph.ts).Changes
.is no longer treated as a sentence boundary, so decimal numbers stay inside the claim.e.g.,U.S.) remain a known limitation of this splitter (out of scope for this fix).Testing
npx vitest run tests/unit/research/citation-graph.test.tspasses (14 tests)npx tsc --noEmitpasses"3 billion in Q4 FY2026..."), matching the issue symptomChecklist
CONTRIBUTING.mdand agree to its contribution termsSummary by CodeRabbit
Bug Fixes
Tests