Implement deterministic chunk generation #15
Labels
No labels
area/deployment
area/governance
area/metadata
area/pipeline
area/search
type/data
type/design
type/implementation
type/testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Reference
Arkive/arkive#15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Generate stable chunk IDs from documented stable inputs.
Preserve source ID and document ID lineage.
Produce deterministic sequence ordering.
Store exact chunk text and verified half-open character offsets into the normalized parent text.
Preserve page, section, heading, or equivalent location information when available.
Define and test behavior at headings, page boundaries, long sections, short documents, and empty or whitespace-only regions.
Reject overlapping, reversed, out-of-range, duplicate, or otherwise invalid chunk locations.
Detect silently omitted non-whitespace content.
Do not add embeddings.
LLM-based semantic chunking.
Summarization or rewriting.
Index generation.
Safety-critical content-specific chunking.
#14 — Implement deterministic conservative text normalization
Every chunk's text exactly matches its declared half-open offsets.
Chunk IDs and sequence ordering are stable.
All chunks preserve valid source and document lineage.
Available page, section, and heading metadata remains correctly associated.
Invalid or overlapping offsets are rejected.
The process detects unintended loss of substantive normalized content.
All records validate against the metadata schemas and cross-record rules.
Reconstruct or coverage-check normalized text according to the documented chunking contract.
Verify every chunk text against its declared offsets.
Exercise heading, page-boundary, long-section, short-document, empty-region, overlap, and out-of-range fixtures.
Repeat chunk generation and compare serialized output.
Issue #15 is complete via PR #63.
Deterministic chunk generation is now implemented on top of the normalized-text contract from Issue #14, including stable chunk identity, exact offsets/text, deterministic sequencing and serialization, PDF page boundaries, explicit distribution scope, substantive-content coverage validation, and schema/cross-record validation.
The implementation was validated against all five pilot documents and the full repository test suite.
Closing as completed.