OpenViking icon indicating copy to clipboard operation
OpenViking copied to clipboard

Docs vs behavior: Smart Splitting not applied via add_resource — 4KB/5-section .md stays single-file with 3 vectors (parse_mode only default|no_split)

Open lexyaowork opened this issue 2 months ago • 2 comments

Environment

Self-hosted OpenViking, source deploy v0.4.17.dev7, local embedding Qwen3-Embedding-8B; observed 2026-08-31 and re-confirmed before filing.

Documented behavior

The extraction documentation promises Smart Splitting: long Markdown should be split section-wise on ingestion, producing per-section sub-resources and per-section chunk vectors.

Observed behavior (repro)

  1. Prepare a 4048-byte Markdown file with 5 ## sections.
  2. Ingest via add_resource (default mode).
  3. Resource tree: single file, no per-section children.
  4. debug/vector/scroll for the URI: exactly 3 vectors (L0/L1/L2), no inner chunk vectors.
  5. parse_mode accepts only default | no_split — there is no value that forces chunking (invalid values are rejected).

The same head-truncated single-vector outcome occurs via the content/write path, so both official import paths behave identically and neither applies Smart Splitting for this input.

Impact

Long documents collapse into one head-truncated vector, so mid-document content is not retrievable — e.g. a 14 KB registry table's port-level facts are unreachable via semantic find. The documented Smart Splitting behavior could not be reproduced on any import path.

Ask

Is Smart Splitting conditional on resource type / parser / config (if so, please document the trigger conditions), not yet implemented, or planned? Happy to provide the repro file and raw vector/scroll dumps.


Reported from a self-hosted deployment; happy to iterate with more evidence.

lexyaowork avatar Sep 07 '26 13:09 lexyaowork

Thanks for the report. Could you share the repro Markdown file, or at least its full section structure and approximate per-section content size?

From the current implementation, default add_resource does allow Markdown splitting, but splitting is threshold-based rather than “one file per heading”: documents under max_section_size/max_section_chars stay as one file, and small sections are merged. A 4048-byte file may therefore legitimately remain single-file depending on its token estimate and section sizes.

sponge225 avatar Sep 08 '26 06:09 sponge225

Thanks for the report. Smart Splitting is implemented in the default Markdown import path and is threshold-based. With the current defaults, a document within both 2,048 estimated tokens and 6,000 characters stays in one file; small sections can also be merged. Five headings do not require five output files, so the 4 KB example does not establish a splitting defect.

The separate retrieval claim about a 14 KB table cannot be assessed without the document and its actual parsing results; we are not claiming that case has been fixed or disproved. Closing this report with the splitting behavior clarified, as the supplied example does not establish a parser change to make.

qin-ctx avatar Sep 10 '26 13:09 qin-ctx