Skip to content

Table-aware chunking still splits tables mid-row #2

Description

@flxhrdyn

File: backend/app/index_data.py:208-221

The "table-aware" splitter falls back to "\n| " as a separator once "\n\n\n"/"\n\n" are not found.
For any markdown table larger than CHUNK_SIZE (1500 chars, common for financial/spec tables), RecursiveCharacterTextSplitter splits between table rows.
Overlap only carries the tail of the previous chunk, so later chunks contain data rows with no header row, exactly the "split mid-table, lose context" failure the fix was supposed to prevent.

Failure scenario: A 40-row financial table exceeding 1500 chars. Rows past the first chunk lose the column headers, so the LLM cannot map values to the correct metric/year.

See docs/rag-audit-findings.md (item 2).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions