Large language models (LLMs) have renewed interest in Page Stream Segmentation (PSS), splitting a multi-page file into its constituent documents. Yet published LLM methods still frame the task as boundary classification over one or a few neighboring pages, and commercial document-splitting APIs do not disclose their methods. We reimagine PSS for LLMs as a sequential process over the whole stream and propose RICoT (Recurrent Interleaved Chain-of-Thought), a prompting framework that works through the pages as a reader would: within a sliding window it reasons about each page and commits its boundary decision before moving on, and across windows it carries forward a compact record of what it has read, keeping per-call cost bounded. We also introduce FinancePSS-205, a benchmark of 205 real-world, de-identified financial page streams, to be released publicly. On FinancePSS-205, RICoT matches or outperforms pairwise and windowed prompting with the same backbone for each of three open-weight LLMs; on a TABME test subset, RICoT with GLM-5 reaches document F1 0.847 and boundary F1 0.915, above published zero-shot results. A 2B-parameter student, trained on a larger teacher's decisions with and without the page-level reasoning, performs comparably in both modes and comes within 0.05 document F1 of the strongest prompted model on FinancePSS-205.
Figures & tables
Figure 1: Page Stream Segmentation task. A stream of six pages is segmented into four documents: two invoices (pages 1–2 and 3), a delivery receipt (pages 4–5), and an email (page 6). Each document may span one or more consecutive pages.
Figure 2: RICoT architecture. Window Wc processes its pages with interleaved per-page reasoning and decisions, receiving reasoning history H(c) and active-segment summary A(c) from preceding windows. Recurrent state and the per-page two-axis decision (segment + sub-document) extend effective context beyond the window boundary while keeping per-window inference cost bounded.
TABME-250
Tob800
FinPSS
Streams
250
1
205
Segments (docs)
2,627 (1,542)
153
685
Pages
7,271 (4,240)
259
1,772
Pages/stream
29.1 / 27 / 3 / 81
259 †
8.6 / 5 / 2 / 82
Segs/stream
10.5 / 10 / 3 / 19
153 †
3.3 / 2 / 1 / 44
Segment length
2.8 / 1 / 1 / 20
1.7 / 1 / 1 / 17
2.6 / 2 / 1 / 66
Table 1: Test-set statistics. TABME segment/page counts shown as total (unique) since TABME composes its streams from a shared pool of source files (Appendix B ). Stream statistics reported as avg/med/min/max; † Tobacco800 is evaluated as a single continuous stream, so per-stream distributional statistics do not apply.
FinancePSS-205
Tobacco800
TABME-250
Model
DocF1
PageF1
MNDDμ
DocF1
PageF1
MNDDμ
DocF1
PageF1
MNDDμ
G4.7-F
0.762 (0.741)
0.898 (0.884)
1.005 (1.225)
0.867
0.949
48.0
0.683
0.829
5.65
G4.7
0.832 (0.795)
0.916 (0.884)
0.848 (1.255)
0.961
0.987
7.0
0.794
0.892
3.31
C-H4.5
0.776 (0.739)
0.880 (0.831)
1.172 (1.647)
0.957
0.984
8.0
0.816
0.910
2.88
G5
0.826 (0.769)
0.906 (0.864)
0.975 (1.422)
0.967
0.987
3.0
0.847
0.922
2.40
Q3.5-2B (base)
0.445
0.688
3.103
0.396
0.664
167.0
0.281
0.563
14.62
Table 2: Headline cross-dataset results for RICoT. DocF1 / PageF1 higher is better; MNDDμ lower. FinancePSS numbers show with-expand outside parentheses and without-expand inside; without expand, predicted sub-document starts count as continuations, which is how TABME and Tobacco800 are scored throughout. TABME-250 / TABME-full reported separately for the distilled model. Bold marks the column best. ⋆ fine-tuned rank- 32 QLoRA; PwT pagewise thinking enabled. F Full 5,000 -stream TABME test set (vs. 250 -stream prompting subset).
Configuration
G4.7-F
G4.7
G5
RICoT (full)
0.762
0.832
0.826
− pagewise thinking
0.688 ( −.074 )
0.784 ( −.048 )
0.738 ( −.088 )
− context propagation
0.752 ( −.010 )
0.837 ( +.005 )
0.778 ( −.048 )
− carry-forward block
0.736 ( −.026 )
0.841 ( +.009 )
0.795 ( −.031 )
− grounding
0.695 ( −.067 )
0.831 ( −.001 )
0.755 ( −.071 )
− expand (no-expand)
0.741 ( −.021 )
0.795 ( −.037 )
0.769 ( −.057 )
Table 6: Component ablations on FinancePSS-205 DocF1. Each row removes one component from the full RICoT (with-expand) configuration; Δ shown in parentheses. “Carry-forward block” removes only the model-emitted κ .
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
Model
PageP
PageR
Gap
G4.7-F
0.733
0.955
+0.222
G4.7
0.832
0.962
+0.130
C-H4.5
0.861
0.965
+0.104
G5
0.873
0.978
+0.105
Appendix
Table 11: TABME-250 page-level precision/recall under RICoT prompting.
Weighting
A1
A2
B
C
Per sampled case ( n=100 )
14
27
44
15
Per distinct site ( 98 )
13
27
45
15
Per FP occurrence
17
33
33
17
Appendix
Table 12: Share (%) of TABME false boundaries by category, Q3.5-2B ⋆ , full test set. “Per FP occurrence” weights each site by how often it is a false boundary across the test set. Each share is uncertain by about ±10 points.
Figure 3: Separate documents inside a single TABME source file. In each pair, the right page (red border) is where the model started a new document; TABME’s ground truth treats it as a continuation of the left page (grey border) because both belong to the same source PDF.
Mode
In
Out
Int.
Ext.
Dec.
C-fwd
no-think
752
172
0
0
142
21
pagewise
797
232
0
72
126
20
windowed
772
251
0
83
128
20
int.+pagewise
767
722
528
44
115
16
int. only
736
823
674
0
110
17
Appendix
Table 13: Per-page output-token cost on GLM-4.7-flash, FinancePSS-205, broken out by component. Input is roughly constant across modes. Int. = internal reasoning tokens; Ext. = external (pagewise) reasoning tokens.
Dataset
Configuration
G4.7-F
G4.7
G5
FinancePSS
think (full)
0.762
0.832
0.826
windowed_think
0.754
0.814
0.746
wo_think
0.688
0.784
0.738
Tobacco800
think (full)
0.867
0.961
0.967
windowed_think
0.846
0.968
0.981
wo_think
0.822
0.942
0.981
Appendix
Table 14: Interleaved-thinking ablation, DocF1 by dataset and model.