Skip to content

Add configurable chunking strategies for RAG document processing #1238

Open

Description

@kovtcharov-amd

Use Case

Different document types need different chunking strategies. Jira issues are short and self-contained (chunk = 1 issue). Confluence pages can be 10K+ chars and need section-based splitting. Meeting notes need temporal chunking.

Problem

Current chunking is one-size-fits-all. No way to configure:

  • Chunk size (token count or character count)
  • Overlap between chunks
  • Splitting strategy (sentence, paragraph, section, semantic)
  • Per-document-type chunking rules

Proposed Solution

Configurable chunking pipeline:

chunking:
  default:
    strategy: "semantic"      # or "fixed", "section", "sentence"
    chunk_size: 512           # tokens
    overlap: 64               # tokens
  per_type:
    jira:
      strategy: "document"    # each Jira issue = 1 chunk
    confluence:
      strategy: "section"     # split on H1/H2 headings
      chunk_size: 1024
    pdf:
      strategy: "semantic"
      chunk_size: 512

Context

Activity

  1. github-actions commented on May 29, 2026

    @github-actions
    Contributor

    Good feature request, and partly in scope already — GAIA's RAG has a configurable chunking pipeline today, just not the per-document-type layer you're describing.

    What exists now (RAGConfig in src/gaia/rag/sdk.py:82):

    What's genuinely missing:

    1. A named strategy enum (fixed / sentence / section / semantic) — today it's a boolean (use_llm_chunking)
    2. Section-based splitting on H1/H2 headings — no heading-aware splitter exists yet
    3. Per-document-type rules — chunk_size/strategy are global, not keyed by jira / confluence / pdf
    4. The YAML surface to express all of the above

    Suggested approach that fits existing patterns: extend RAGConfig with an optional per_type: dict[str, ChunkingConfig] and a strategy field, then refactor _split_text_into_chunks to dispatch on resolved strategy. The "document" strategy (1 chunk per item) is trivial for Jira; the "section" strategy is the only net-new splitter to write. This keeps backward compatibility since chunk_size/chunk_overlap already map cleanly onto a default config.

    One open question for a maintainer: the YAML config loader location. RAG is currently configured programmatically via RAGConfig, so where the chunking: block lives (and how openhaimer feeds it in) is an architecture call — tagging @kovtcharov-amd for that.

    Worth a contribution if you're up for it — see CONTRIBUTING.md and the RAG tuning docs at docs/sdk/sdks/rag.mdx.

  2. added
    ragRAG system changes
    domain:automationScheduler, autonomy, RAG, web search, watchers, research
    on Jun 9, 2026
  3. added this to the vFutures milestone on Oct 19, 2026
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

    domain:automationScheduler, autonomy, RAG, web search, watchers, researchenhancementNew feature or requestragRAG system changes

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions