Skip to content

[Perf] Chunk Size·Overlap 검색 품질 및 비용 비교 Benchmark 추가 - #149

Merged
Gimini-3 merged 5 commits into
developfrom
feature/147
Aug 11, 2026
Merged

[Perf] Chunk Size·Overlap 검색 품질 및 비용 비교 Benchmark 추가#149
Gimini-3 merged 5 commits into
developfrom
feature/147

Conversation

@Gimini-3

@Gimini-3 Gimini-3 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

변경 내용

  • 제품 FixedSizeChunker로 8개 Chunk Size·Overlap Profile을 같은 Corpus에서 비교합니다.
  • 400·800·1000·1600 경계마다 3개씩 총 12개 한국어 Query/Document Case와 완전한 근거 범위 Ground Truth를 추가했습니다.
  • 실제 BAAI/bge-m3 Batch API와 메모리 내 Exact Cosine Ranking으로 Answer Coverage, Hit@1, Hit@3, MRR@10을 측정합니다.
  • Chunk 수·중복 Code Point·Embedding Median/p95·검색 Median/p95·실패 수를 함께 기록합니다.
  • Model명, 응답 개수·순서, 1024차원, 유한값과 0이 아닌 Norm을 검증합니다.
  • 실제 모델 Benchmark를 일반 테스트와 분리한 chunkQualityPerformanceTest Gradle Task를 추가했습니다.
  • 실제 8 Profile × 2 Round 원본 JSON, 비교표와 Trade-off SVG를 기록했습니다.

실측 결과

Chunk/Overlap Coverage Hit@3 MRR@10 Chunk 수 중복 비율 Embedding p95
400/0 25.0% 16.7% 0.176 72 0.0% 26.85s
400/80 100.0% 66.7% 0.600 84 21.8% 34.52s
800/0 50.0% 33.3% 0.315 36 0.0% 30.74s
800/160 100.0% 66.7% 0.660 48 21.8% 38.42s
1000/0 75.0% 16.7% 0.239 36 0.0% 41.46s
1000/200 현재 기본 100.0% 33.3% 0.302 36 18.2% 38.90s
1600/0 75.0% 0.0% 0.093 24 0.0% 47.69s
1600/320 100.0% 50.0% 0.530 24 14.5% 45.10s

20% Overlap은 모든 Profile의 완전한 근거 Coverage를 100%로 복구했지만 중복량이 14.5~21.8% 증가했습니다. 합성 경계 Corpus에서 800/160의 순위 품질이 가장 높았습니다.

이 결과만으로 제품 기본값을 바꾸지 않습니다. 실제 사용자 문서 평가셋을 포함한 별도 의사결정이 필요합니다.

측정 경계

  • Chunking 효과만 분리하기 위해 PostgreSQL·pgvector·HNSW는 제외하고 Exact Cosine을 사용합니다.
  • PDF·DOCX Parser, OCR, 권한 Filter와 RAG 답변 품질은 제외합니다.
  • Apple Silicon Docker CPU 절대 지연은 운영 SLO로 해석하지 않습니다.
  • 제품 Chunking 기본 설정과 Pipeline 동작은 변경하지 않습니다.

검증

  • ./gradlew test --tests '*ChunkQualityBenchmarkSupportTest'
  • DB_SSLMODE=disable JWT_SECRET=<test-secret> ./gradlew test ✅ 734개
  • ./gradlew chunkQualityPerformanceTest ✅ 9분 52초
  • 8 Profile × 2 Round, HTTP·응답·Vector 검증 통과 후 JSON 생성 ✅
  • XML·JSON 결과 계약 및 Git diff 검사 ✅

문서

  • docs/design/gimin-#147-chunk-size-overlap-quality-benchmark.md
  • docs/test-results/gimin-#147-chunk-size-overlap-quality-benchmark.md
  • docs/test-results/gimin-#147-chunk-size-overlap-quality-benchmark-data.json
  • docs/test-results/assets/chunk-quality/chunk-quality-tradeoff.svg

Closes #147

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

실제 FixedSizeChunkerBAAI/bge-m3를 사용하는 Chunk Size·Overlap Benchmark를 추가했습니다. 전용 Gradle 태스크, 결정적 Corpus, 품질 지표 계산, 반복 측정, Vector 검증, JSON 결과 및 결과 문서를 포함합니다.

Changes

Chunk 품질·비용 Benchmark

Layer / File(s) Summary
Benchmark 설계와 측정 계약
docs/design/...benchmark.md
8개 Chunk Profile과 12개 Query Corpus를 정의했습니다. Answer Coverage, Hit@K, MRR, 중복량, 임베딩 시간, 검색 시간 및 실패 수의 계산 규칙을 기록했습니다.
결정적 Corpus와 품질 계산 지원
src/test/java/com/opensource/docgrid/domain/document/benchmark/ChunkQualityBenchmarkSupport.java, src/test/java/com/opensource/docgrid/domain/document/benchmark/ChunkQualityBenchmarkSupportTest.java
제품 Chunker 결과를 사용해 중복량과 Exact Cosine 품질 지표를 계산합니다. Vector와 입력 설정을 검증하고 Timing 통계를 집계합니다. 관련 단위 테스트를 추가했습니다.
실제 모델 Benchmark 실행
build.gradle, src/test/java/com/opensource/docgrid/domain/document/benchmark/ChunkQualityPerformanceBenchmark.java, docs/test-results/*
전용 Gradle 태스크가 외부 모델 Benchmark를 실행합니다. BGE-M3 Batch 임베딩, 워밍업, 반복 측정, 결정성 검증, Pareto 후보 계산 및 JSON 보고서 생성을 수행합니다. 측정 결과와 재현 명령을 문서화했습니다.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ChunkQualityPerformanceBenchmark
  participant FixedSizeChunker
  participant BGE-M3EmbeddingServer
  participant ExactCosineRanking
  participant JsonReport

  ChunkQualityPerformanceBenchmark->>FixedSizeChunker: Profile별 문서 청킹
  ChunkQualityPerformanceBenchmark->>BGE-M3EmbeddingServer: Chunk와 Query Batch 임베딩 요청
  BGE-M3EmbeddingServer-->>ChunkQualityPerformanceBenchmark: Vector 응답
  ChunkQualityPerformanceBenchmark->>ExactCosineRanking: Vector 기반 Exact Cosine 검색
  ExactCosineRanking-->>ChunkQualityPerformanceBenchmark: 품질 지표와 검색 시간 반환
  ChunkQualityPerformanceBenchmark->>JsonReport: Profile별 결과 저장
Loading

Possibly related PRs

  • DocGrid/backend#76: 이 PR의 FixedSizeChunker와 Chunk 설정을 Benchmark 대상으로 사용합니다.
  • DocGrid/backend#102: 이 PR이 도입한 BGE-M3 Batch 임베딩 API를 Benchmark에서 호출합니다.
  • DocGrid/backend#144: 전용 Benchmark 태스크와 설정 가능한 측정·JSON 보고서 구조가 연결됩니다.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed #147의 Benchmark 구현, 품질·비용 지표, Vector 불변식, 반복 측정, 결과 문서화 요구사항을 검토 가능한 변경에서 확인했습니다.
Out of Scope Changes check ✅ Passed 변경 사항은 Chunk Benchmark 구현, 검증 테스트, 결과 문서와 재현 자료 범위에 포함되며 관련 없는 코드 변경은 확인되지 않습니다.
Title check ✅ Passed 제목은 Chunk Size·Overlap 검색 품질과 비용을 비교하는 Benchmark 추가라는 PR의 주요 변경을 명확하게 요약합니다.
Description check ✅ Passed 설명은 변경 내용, 측정 결과, 범위, 검증 방법, 문서와 이슈 연결을 구체적으로 포함해 PR 목적과 결과를 충분히 설명합니다.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/147

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (8)
docs/test-results/gimin-#147-chunk-size-overlap-quality-benchmark.md (1)

120-126: 🔒 Security & Privacy | 🔵 Trivial | 💤 Low value

JWT 값을 자리표시자로 바꾸는 편이 안전합니다.

Line 124가 JWT_SECRET 값을 평문으로 기록합니다. 이 값은 로컬 회귀 테스트용 더미로 보이며 운영 비밀이 아닙니다. 코딩 가이드라인의 비밀 하드코딩 금지 규칙도 **/*.{java,yml,yaml}를 대상으로 하므로 이 Markdown 문서에는 직접 적용되지 않습니다.

다만 문서에 남은 리터럴은 다른 환경으로 복사되기 쉽습니다. 자리표시자로 바꾸면 그 위험이 사라집니다.

-JWT_SECRET=docgrid-test-secret-key-for-local-regression-2026 \
+JWT_SECRET=<로컬 테스트용 임의 문자열> \

Swagger UI 수동 테스트 결과를 기록하지 않은 판단은 적절합니다. 이 PR은 제품 API를 변경하지 않고 Benchmark만 추가합니다.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/test-results/gimin-`#147-chunk-size-overlap-quality-benchmark.md around
lines 120 - 126, Replace the literal JWT_SECRET value in the documented
./gradlew test command with a clearly named placeholder, while preserving
DB_SSLMODE and the command’s purpose. Do not alter the Swagger UI testing note
or other benchmark results.

Source: Learnings

src/test/java/com/opensource/docgrid/domain/document/benchmark/ChunkQualityBenchmarkSupport.java (3)

249-263: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

입력 검증을 정렬보다 먼저 실행하세요.

Line 253에서 sorted()를 먼저 실행하고, Line 254에서 null·비유한·음수를 검증합니다. 순서가 뒤바뀌어 있습니다.

samplesMillis에 null 원소가 있으면 sorted()Double.compareTo를 호출하면서 NullPointerException을 먼저 던집니다. 그 결과 Line 254의 value == null 분기는 절대 실행되지 않습니다. 의도한 IllegalArgumentException 대신 NullPointerException이 호출자에게 전달됩니다.

현재 호출부는 primitive double을 boxing한 List만 전달하므로 실제 실행 경로에서는 발생하지 않습니다. 다만 계약을 명확히 하려면 검증을 앞으로 옮기세요.

♻️ 검증 순서 교정
-        List<Double> sorted = samplesMillis.stream().sorted().toList();
-        if (sorted.stream().anyMatch(value -> value == null || !Double.isFinite(value) || value < 0.0)) {
+        if (samplesMillis.stream().anyMatch(value -> value == null || !Double.isFinite(value) || value < 0.0)) {
             throw new IllegalArgumentException("Timing 표본은 0 이상의 유한값이어야 합니다.");
         }
+        List<Double> sorted = samplesMillis.stream().sorted().toList();
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/test/java/com/opensource/docgrid/domain/document/benchmark/ChunkQualityBenchmarkSupport.java`
around lines 249 - 263, Update summarizeTimings to validate every samplesMillis
element for null, finiteness, and non-negativity before calling sorted().
Preserve the existing IllegalArgumentException messages and percentile/max
calculation after validation.

232-244: 🚀 Performance & Scalability | 🔵 Trivial | 💤 Low value

cosineSimilarity가 Vector 검증과 Norm 계산을 반복합니다.

rank()는 후보마다 cosineSimilarity(queryVector, ...)를 호출합니다. 그때마다 Query Vector의 1024개 원소를 다시 검증하고 Norm을 다시 계산합니다. 후보 수만큼 같은 계산이 반복됩니다.

현재 규모(최대 84 후보)에서는 실측 searchMillis가 16ms 이하이므로 실제 병목은 아닙니다. 다만 searchMillis 지표에 중복 검증 비용이 포함됩니다. Query Norm을 rank() 진입 시 한 번만 계산하면 지표가 순수 Ranking 비용에 더 가까워집니다.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/test/java/com/opensource/docgrid/domain/document/benchmark/ChunkQualityBenchmarkSupport.java`
around lines 232 - 244, Update the ranking flow around rank() and
cosineSimilarity() so the query vector is validated and its norm is computed
once at rank() entry, then reused for every candidate comparison. Adjust
cosineSimilarity() to accept or use the precomputed query norm while retaining
validation and norm calculation for candidate vectors.

426-436: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

중복 ID를 조용히 덮어쓰지 않도록 검증을 추가하세요.

ids에 중복 값이 있으면 LinkedHashMap.put이 앞선 Vector를 덮어씁니다. 예외는 발생하지 않습니다. 결과 Map의 크기가 ids.size()보다 작아집니다. 그 뒤 requiredVector도 다른 ID의 Vector를 반환하므로 실패를 감지할 수 없습니다.

현재 호출부는 documentId + ":" + chunkIndex 형태의 고유 ID를 전달하므로 중복은 발생하지 않습니다. 다만 설계 문서 8절은 불변식 위반 시 부분 결과를 정상 수치로 기록하지 않는다고 규정합니다. 크기 검증을 추가하면 이 원칙이 코드로 보장됩니다.

♻️ 중복 ID 검증 추가
         Map<String, float[]> result = new LinkedHashMap<>();
         for (int index = 0; index < ids.size(); index++) {
             validateVector(vectors.get(index));
-            result.put(ids.get(index), vectors.get(index).clone());
+            if (result.put(ids.get(index), vectors.get(index).clone()) != null) {
+                throw new IllegalArgumentException("중복된 Vector ID입니다: " + ids.get(index));
+            }
         }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/test/java/com/opensource/docgrid/domain/document/benchmark/ChunkQualityBenchmarkSupport.java`
around lines 426 - 436, Update vectorMap to verify that the constructed result
contains exactly ids.size() entries after inserting all IDs, and throw an
IllegalArgumentException when duplicates caused overwrites. Preserve the
existing size validation, vector validation, cloning, and Map.copyOf behavior.
src/test/java/com/opensource/docgrid/domain/document/benchmark/ChunkQualityPerformanceBenchmark.java (3)

297-308: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

validate()를 compact constructor로 옮기면 검증이 항상 보장됩니다.

현재 validate()fromSystemProperties()에서만 호출됩니다. BenchmarkConfiguration을 다른 경로에서 직접 생성하면 검증이 생략됩니다. compact constructor로 옮기면 모든 생성 경로가 검증을 거칩니다.

URL 검증(scheme 제한, userInfo 금지)은 SSRF와 자격증명 노출을 막는 방어입니다. 이 방어가 생성 경로에 묶이는 편이 안전합니다.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/test/java/com/opensource/docgrid/domain/document/benchmark/ChunkQualityPerformanceBenchmark.java`
around lines 297 - 308, Move the validation currently invoked by
fromSystemProperties() into BenchmarkConfiguration’s compact constructor so
every construction path enforces the same checks. Preserve the existing URL
scheme and userInfo restrictions and remove the redundant explicit validate()
call from the factory path.

153-161: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

failureCount는 구조상 항상 0입니다. 지표 의미를 명확히 하세요.

Line 160은 failureCount에 상수 0을 전달합니다. 실제 실패 경로를 확인하면 다음과 같습니다.

  • embed()는 Model명이 다르면 IllegalStateException을 던집니다.
  • validateVector는 불변식 위반 시 IllegalArgumentException을 던집니다.
  • RestClient는 HTTP 오류 시 예외를 던집니다.

세 경우 모두 Benchmark가 중단되고 JSON은 생성되지 않습니다. 따라서 기록된 failureCount는 언제나 0입니다.

이 fail-fast 동작 자체는 설계 문서 8절과 일치합니다. 다만 설계 문서 10절 1항은 "Failure Count가 0인 Profile만 비교한다"를 판정 기준으로 제시합니다. 항상 0인 값은 판정 기준으로서 정보를 주지 않습니다.

두 가지 해석이 가능합니다. 선택이 필요합니다.

  1. fail-fast를 유지한다면 failureCount 필드와 문서 10절 1항을 제거하고, 대신 "JSON이 생성되면 모든 검증을 통과한 것"임을 문서에 명시합니다.
  2. 판정 기준을 유지한다면 재시도 가능한 실패를 집계하고 계속 진행하는 경로를 구현합니다.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/test/java/com/opensource/docgrid/domain/document/benchmark/ChunkQualityPerformanceBenchmark.java`
around lines 153 - 161, Resolve the mismatch between the always-zero
failureCount in the benchmark result construction and the documented comparison
criteria: either remove failureCount and the corresponding “failure count is
zero” criterion while documenting that generated JSON indicates all validations
passed, or implement retryable-failure aggregation with continued execution so
failureCount becomes meaningful. Apply the chosen behavior consistently in the
RoundMeasurement creation near chunkEmbeddings.requestCount() and the related
design documentation.

213-215: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

참조 동등성 비교 의도를 주석으로 남기세요.

other != candidate는 참조 동등성을 사용합니다. ProfileResult는 record이므로 equals는 값 기반입니다. 두 Profile의 모든 지표가 같으면 equalstrue를 반환합니다. 그 경우 !other.equals(candidate)를 쓰면 자기 자신이 아닌 Profile까지 비교에서 빠집니다.

즉 현재 참조 비교가 올바른 선택입니다. 다만 의도가 코드에 드러나지 않습니다. 이후 리팩터링에서 equals로 바뀌면 Pareto 판정이 조용히 틀어집니다.

♻️ 의도 주석 추가
     private boolean isParetoCandidate(ProfileResult candidate, List<ProfileResult> results) {
+        // record의 값 기반 equals는 지표가 같은 다른 Profile까지 제외하므로 참조 동등성으로 자기 자신만 뺀다.
         return results.stream().noneMatch(other -> other != candidate && dominates(other, candidate));
     }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/test/java/com/opensource/docgrid/domain/document/benchmark/ChunkQualityPerformanceBenchmark.java`
around lines 213 - 215, Add a concise comment in isParetoCandidate explaining
that other != candidate intentionally uses reference identity because
ProfileResult record equality is value-based, and equal-valued distinct profiles
must still be compared. Leave the existing comparison logic unchanged.
src/test/java/com/opensource/docgrid/domain/document/benchmark/ChunkQualityBenchmarkSupportTest.java (1)

143-150: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Relevant 판정 로직이 테스트에 중복 구현되어 있습니다.

Line 144-148은 ChunkQualityBenchmarkSupport.isRelevant와 같은 세 가지 조건을 다시 작성합니다. 두 곳의 로직이 갈라지면 이 테스트는 실제 Ground Truth 계약을 더 이상 검증하지 못합니다. 그래도 테스트는 통과합니다.

isRelevant는 현재 private입니다. 테스트가 같은 패키지에 있으므로 package-private으로 바꾸면 중복 없이 실제 판정 경로를 검증할 수 있습니다.

♻️ 실제 판정 메서드 재사용

ChunkQualityBenchmarkSupport.java에서 접근 제한자를 변경합니다.

-    private static boolean isRelevant(QueryCase queryCase, ChunkCandidate candidate) {
+    static boolean isRelevant(QueryCase queryCase, ChunkCandidate candidate) {

테스트에서 재사용합니다.

-            boolean covered = chunked.candidates().stream().anyMatch(candidate ->
-                candidate.documentId().equals(queryCase.documentId())
-                    && candidate.charStart() <= queryCase.evidenceStart()
-                    && candidate.charEnd() >= queryCase.evidenceEnd()
-            );
+            boolean covered = chunked.candidates().stream()
+                .anyMatch(candidate -> ChunkQualityBenchmarkSupport.isRelevant(queryCase, candidate));
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/test/java/com/opensource/docgrid/domain/document/benchmark/ChunkQualityBenchmarkSupportTest.java`
around lines 143 - 150, Change ChunkQualityBenchmarkSupport.isRelevant from
private to package-private, then update the covered assertion in
ChunkQualityBenchmarkSupportTest to reuse that method for each
candidate/queryCase pair instead of duplicating the document ID and
character-boundary conditions. Preserve the existing expected-result assertions
while validating the actual ground-truth implementation.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/test-results/gimin-`#147-chunk-size-overlap-quality-benchmark.md:
- Line 6: Update the JSON link in the benchmark document to URL-encode the #
character as %23, preserving the existing relative link target so it resolves to
the committed file rather than being interpreted as a fragment.

---

Nitpick comments:
In `@docs/test-results/gimin-`#147-chunk-size-overlap-quality-benchmark.md:
- Around line 120-126: Replace the literal JWT_SECRET value in the documented
./gradlew test command with a clearly named placeholder, while preserving
DB_SSLMODE and the command’s purpose. Do not alter the Swagger UI testing note
or other benchmark results.

In
`@src/test/java/com/opensource/docgrid/domain/document/benchmark/ChunkQualityBenchmarkSupport.java`:
- Around line 249-263: Update summarizeTimings to validate every samplesMillis
element for null, finiteness, and non-negativity before calling sorted().
Preserve the existing IllegalArgumentException messages and percentile/max
calculation after validation.
- Around line 232-244: Update the ranking flow around rank() and
cosineSimilarity() so the query vector is validated and its norm is computed
once at rank() entry, then reused for every candidate comparison. Adjust
cosineSimilarity() to accept or use the precomputed query norm while retaining
validation and norm calculation for candidate vectors.
- Around line 426-436: Update vectorMap to verify that the constructed result
contains exactly ids.size() entries after inserting all IDs, and throw an
IllegalArgumentException when duplicates caused overwrites. Preserve the
existing size validation, vector validation, cloning, and Map.copyOf behavior.

In
`@src/test/java/com/opensource/docgrid/domain/document/benchmark/ChunkQualityBenchmarkSupportTest.java`:
- Around line 143-150: Change ChunkQualityBenchmarkSupport.isRelevant from
private to package-private, then update the covered assertion in
ChunkQualityBenchmarkSupportTest to reuse that method for each
candidate/queryCase pair instead of duplicating the document ID and
character-boundary conditions. Preserve the existing expected-result assertions
while validating the actual ground-truth implementation.

In
`@src/test/java/com/opensource/docgrid/domain/document/benchmark/ChunkQualityPerformanceBenchmark.java`:
- Around line 297-308: Move the validation currently invoked by
fromSystemProperties() into BenchmarkConfiguration’s compact constructor so
every construction path enforces the same checks. Preserve the existing URL
scheme and userInfo restrictions and remove the redundant explicit validate()
call from the factory path.
- Around line 153-161: Resolve the mismatch between the always-zero failureCount
in the benchmark result construction and the documented comparison criteria:
either remove failureCount and the corresponding “failure count is zero”
criterion while documenting that generated JSON indicates all validations
passed, or implement retryable-failure aggregation with continued execution so
failureCount becomes meaningful. Apply the chosen behavior consistently in the
RoundMeasurement creation near chunkEmbeddings.requestCount() and the related
design documentation.
- Around line 213-215: Add a concise comment in isParetoCandidate explaining
that other != candidate intentionally uses reference identity because
ProfileResult record equality is value-based, and equal-valued distinct profiles
must still be compared. Leave the existing comparison logic unchanged.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: de191f95-0755-4ee4-9183-71fe41c45935

📥 Commits

Reviewing files that changed from the base of the PR and between 93a96cb and 56b0478.

⛔ Files ignored due to path filters (1)
  • docs/test-results/assets/chunk-quality/chunk-quality-tradeoff.svg is excluded by !**/*.svg
📒 Files selected for processing (7)
  • build.gradle
  • docs/design/gimin-#147-chunk-size-overlap-quality-benchmark.md
  • docs/test-results/gimin-#147-chunk-size-overlap-quality-benchmark-data.json
  • docs/test-results/gimin-#147-chunk-size-overlap-quality-benchmark.md
  • src/test/java/com/opensource/docgrid/domain/document/benchmark/ChunkQualityBenchmarkSupport.java
  • src/test/java/com/opensource/docgrid/domain/document/benchmark/ChunkQualityBenchmarkSupportTest.java
  • src/test/java/com/opensource/docgrid/domain/document/benchmark/ChunkQualityPerformanceBenchmark.java

Comment thread docs/test-results/gimin-#147-chunk-size-overlap-quality-benchmark.md Outdated
@Gimini-3
Gimini-3 merged commit f0e935b into develop Aug 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chunk Size·Overlap 검색 품질 및 비용 비교 Benchmark 지원 추가 구현

1 participant