Skip to content

Advanced Chunking Mode in Knowledge Base Settings not working #702

Description

@NG85

[Description]
In the Knowledge Base Settings page, the Chunking Mode configuration’s Advanced Mode does not work as expected.
After saving, the page fails to display the saved configuration correctly.

[Steps to Reproduce]

  1. Go to Knowledge Base → Settings
  2. Set Chunking Mode to Advanced
  3. Fill in the configuration parameters and save
  4. Refresh the page
  5. Observe that the advanced configuration is not displayed correctly

[Root Cause]
Frontend field structure does not match the backend service's data format:

Frontend sent json:
{
"mode": "advanced",
"rules": {
"text/plain": {
"splitter": "SentenceSplitter",
"splitter_config": {
"chunk_size": 1024,
"chunk_overlap": 200,
"paragraph_separator": "\n\n"
}
},
"text/markdown": {
"splitter": "MarkdownSplitter",
"splitter_config": {
"chunk_size": 1200,
"chunk_header_level": 2
}
}
}
}

Backend expected:
{
"mode": "advanced",
"rules": {
"text/plain": {
"splitter": "SentenceSplitter",
"splitter_options": {
"chunk_overlap": 200,
"chunk_size": 1024,
"paragraph_separator": "\n\n"
}
}
},
"text/markdown": {
"splitter": "MarkdownNodeParser",
"splitter_options": {
"chunk_header_level": 2,
"chunk_size": 1200
}
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions