Merged
Conversation
stephentoub
reviewed
Nov 5, 2025
src/Libraries/Microsoft.Extensions.DataIngestion/Chunkers/SectionChunker.cs
Outdated
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new SectionChunker class for the Microsoft.Extensions.DataIngestion library, which treats each IngestionDocumentSection as a separate entity for chunking. The implementation handles nested sections and maintains header context across chunks.
- Adds
SectionChunkerclass to support section-based document chunking - Creates comprehensive test coverage for the new chunker through
SectionChunkerTests - Introduces a base test class
DocumentChunkerTestsfor shared chunker test scenarios
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/Libraries/Microsoft.Extensions.DataIngestion/Chunkers/SectionChunker.cs |
Implements the new SectionChunker class with support for nested sections and header context preservation |
test/Libraries/Microsoft.Extensions.DataIngestion.Tests/Chunkers/SectionChunkerTests.cs |
Provides comprehensive test coverage including single/multiple sections, nested sections, size limits, and headers |
test/Libraries/Microsoft.Extensions.DataIngestion.Tests/Chunkers/DocumentChunkerTests.cs |
Defines abstract base test class with common test scenarios for all document chunkers |
src/Libraries/Microsoft.Extensions.DataIngestion/Chunkers/SectionChunker.cs
Show resolved
Hide resolved
test/Libraries/Microsoft.Extensions.DataIngestion.Tests/Chunkers/SectionChunkerTests.cs
Outdated
Show resolved
Hide resolved
…rs/SectionChunkerTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
adamsitnik
approved these changes
Nov 10, 2025
Member
adamsitnik
left a comment
There was a problem hiding this comment.
LGTM, thank you @KrystofS !
jeffhandley
pushed a commit
to jeffhandley/extensions
that referenced
this pull request
Nov 21, 2025
12 tasks
jeffhandley
pushed a commit
that referenced
this pull request
Nov 21, 2025
This was referenced Dec 11, 2025
This was referenced Dec 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Microsoft Reviewers: Open in CodeFlow