Skip to content

[Test] 검색+RAG 통합 e2e 테스트 - #79

Merged
kangcheolung merged 2 commits into
developfrom
test/78
Jul 30, 2026
Merged

[Test] 검색+RAG 통합 e2e 테스트#79
kangcheolung merged 2 commits into
developfrom
test/78

Conversation

@kangcheolung

@kangcheolung kangcheolung commented Jul 30, 2026

Copy link
Copy Markdown
Member

🔍️ 작업 내용

✨ 상세 설명

RAG 블록(F-RAG-01~05) 구현 완료 후, 실제 인프라(Postgres/embedding-server/Ollama)를 띄운 상태에서 POST /search를 Swagger로 수동 e2e 테스트했습니다.

  • 정상 케이스: results+answer+citations 통합 응답 확인, 환각 방지 프롬프트 정상 동작 확인
  • 에러 케이스: Ollama 콜드스타트로 인한 503(RAG_SERVICE_UNAVAILABLE)이 실제로 재현되어 정상 처리되는지 확인
  • 발견된 이슈 2건 원인 규명: (1) 테스트 문서의 임베딩이 실제 bge-m3 계산값이 아니라 더미 벡터라 similarityScore가 비정상적으로 낮았음 — RAG/검색 코드 버그 아님 (2) citations가 실제 인용 여부와 무관하게 검색 후보 전체를 포함 — 알려진 MVP 설계 한계
  • 나머지 시나리오(NO_CONTEXT, 권한, 입력 검증, 다른 문서 케이스)는 문서 인덱싱 파이프라인(A 담당자 담당, 임베딩 계산+INDEXED 전환)이 아직 미완성이라 보류

자세한 내용은 docs/test-results/kangcheolung-#78-search-rag-e2e-test.md 참고해주세요.

🛠️ 추후 리팩토링 및 고도화 계획

  • 인덱싱 파이프라인 완성 후 보류된 시나리오 재시도
  • citations를 실제 인용된 것만 필터링하는 개선은 백로그로 별도 검토

📸 스크린샷 (선택)

N/A

💬 리뷰 요구사항

  • 인덱싱 파이프라인 미완성으로 일부 시나리오를 보류한 판단이 적절한지
  • 더미 임베딩 이슈를 RAG 블록 버그가 아니라고 결론낸 근거(embeddings.vector 직접 확인)가 충분한지

Summary by CodeRabbit

  • 문서
    • 검색과 RAG 통합 엔드투엔드 테스트 결과를 문서화했습니다.
    • 정상 응답에서 검색 결과, RAG 답변, 출처가 함께 반환되는 사례를 정리했습니다.
    • Ollama 초기화 지연에 따른 503 오류 및 재요청 후 정상 복구 시나리오를 기록했습니다.
    • 유사도 점수와 출처 표시 관련 발견 사항, 후속 검증 항목을 정리했습니다.
    • 전체 자동화 테스트 343건이 실패 없이 통과했습니다.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@kangcheolung, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 51 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 801e3010-9ee1-4bfe-b223-384c82ef826a

📥 Commits

Reviewing files that changed from the base of the PR and between 3d7022e and d478cdd.

📒 Files selected for processing (1)
  • docs/test-results/kangcheolung-#78-search-rag-e2e-test.md
📝 Walkthrough

Walkthrough

검색+RAG 통합 E2E 테스트 결과 문서를 추가했다. 실제 인프라 환경의 정상 응답과 Ollama 장애 응답, 자동화 테스트 결과, similarityScore 및 citations 관련 이슈와 후속 검증 계획을 기록한다.

Changes

검색+RAG 통합 E2E 검증

Layer / File(s) Summary
테스트 범위와 환경
docs/test-results/kangcheolung-#78-search-rag-e2e-test.md
테스트 배경·제약 사항과 PostgreSQL, embedding-server, Ollama, Spring Boot 및 테스트 데이터를 정리했다.
정상·장애 시나리오
docs/test-results/kangcheolung-#78-search-rag-e2e-test.md
POST /searchresults·answer·citations 정상 응답과 Ollama 콜드스타트에 따른 503 응답 및 재요청 성공을 기록했다.
이슈와 검증 결과
docs/test-results/kangcheolung-#78-search-rag-e2e-test.md
더미 임베딩과 citations 처리 한계, 미완료 시나리오, ./gradlew test 결과 및 E2E 결론을 정리했다.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 검색+RAG 통합 e2e 테스트 결과 문서 추가라는 핵심 변경을 정확히 반영합니다.
Description check ✅ Passed 필수 섹션인 작업 내용, 상세 설명, 추후 계획, 스크린샷, 리뷰 요구사항이 모두 포함되어 있습니다.
Linked Issues check ✅ Passed #78의 필수 산출물인 e2e 결과 문서와 정상/장애 케이스, gradlew test 결과를 기록해 주요 목적을 충족합니다.
Out of Scope Changes check ✅ Passed 추가된 변경은 테스트 결과 문서 작성에 한정되어 있어 이슈 범위를 벗어난 코드 변경은 보이지 않습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/78

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: 2

🤖 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/kangcheolung-`#78-search-rag-e2e-test.md:
- Around line 92-95: 문서의 환각 방지 결론을 단일 테스트 실행에서 관찰된 결과로 제한하세요. 해당 문장을 이 시나리오에서
Python 내용이 answer에 포함되지 않았다고 표현하도록 완화하고, 더미 임베딩 환경에서 일반적인 환각 방지 효과를 보장하는 듯한 서술은
제거하세요.
- Around line 152-160: Update the `#78` test-results documentation to resolve the
listed incomplete scenarios: add results for NO_CONTEXT, the permission case
using test@gmail.com, and input validation for empty queryText and topK values
of 21 or higher. If this PR does not cover them, explicitly track each as a
follow-up issue instead of leaving them only marked as pending.
🪄 Autofix (Beta)

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: c5d11e78-d591-461d-bbe8-6a7f239db4b5

📥 Commits

Reviewing files that changed from the base of the PR and between cd61fa5 and 3d7022e.

📒 Files selected for processing (1)
  • docs/test-results/kangcheolung-#78-search-rag-e2e-test.md

Comment thread docs/test-results/kangcheolung-#78-search-rag-e2e-test.md Outdated
Comment on lines +152 to +160
## 미완료 시나리오 (인덱싱 파이프라인 완성 후 재시도)

| 시나리오 | 상태 | 사유 |
|---|---|---|
| 정상 케이스 B (다른 문서 관련 질문) | 보류 | 실제 임베딩 없이는 결과 신뢰 불가 |
| NO_CONTEXT (무관한 질문) | 보류 | 위와 동일 |
| 권한 케이스 (`test@gmail.com`으로 동일 질문) | 보류 | 위와 동일 |
| 입력 검증 (`queryText` 빈 값, `topK` 21 이상) | 보류 | RAG 블록과 무관, 독립적으로 진행 가능하나 이번 세션에서 미실시 |
| Ollama 장애 케이스 (의도적 재현) | **완료** (우연히 재현됨) | 위 "에러 케이스" 참고 |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== locate files =="
git ls-files | rg '(^|/)docs/test-results/|docs/(test-results|design)/' | sed -n '1,120p'

echo
echo "== target file excerpt =="
if [ -f "docs/test-results/kangcheolung-#78-search-rag-e2e-test.md" ]; then
  nl -ba "docs/test-results/kangcheolung-#78-search-rag-e2e-test.md" | sed -n '1,220p'
fi

echo
echo "== search for issue/pr references around test result document =="
rg -n "NO_CONTEXT|권한|입력 검증|topK|queryText|RAG|`#78`|search rag|search-rag|pull request|PR" -S --glob '!node_modules/**' . | sed -n '1,240p'

Repository: DocGrid/backend

Length of output: 2105


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== target file excerpt =="
awk '{printf "%6d %s\n", NR, $0}' "docs/test-results/kangcheolung-#78-search-rag-e2e-test.md" | sed -n '1,230p'

echo
echo "== repository references to `#78` or target scenarios =="
rg -n "NO_CONTEXT|무관한 질문|권한 케이스|test@gmail.com|입력 검증|queryText|topK|21|RAG 블록|`#78`|검색|RAG|search" -S --glob '!node_modules/**' . | sed -n '1,260p'

Repository: DocGrid/backend

Length of output: 50373


🌐 Web query:

kangcheolung-#78-search-rag-e2e-test.md #78 search rag integration e2e test GitHub

💡 Result:

The query "kangcheolung-#78-search-rag-e2e-test.md" does not correspond to a known public technical specification, standard, or widely recognized open-source project. Searches for this specific identifier do not return matching GitHub issues or documentation [1][2][3][4][5]. It is highly likely that "kangcheolung" refers to a personal GitHub username [1], and "#78" likely refers to a specific issue or pull request number within a private or local repository that is not indexed on the public web. In the context of RAG (Retrieval-Augmented Generation) systems, "search rag integration e2e test" refers to end-to-end testing practices for verifying the full pipeline of a RAG application, from document retrieval to generative output. Authoritative practices for such tests typically include: 1. Verification Layers: Separating testing into Retrieval (Recall@K, MRR), Generation (Faithfulness, groundedness), and End-to-End performance (Latency, hallucination rate, and E2E success rate) [6][7]. 2. Test Implementation: E2E tests for RAG systems are often implemented using frameworks like PyTest (often with AsyncMock for handling API calls) [8][9] or specialized evaluation tools like DeepEval [10]. 3. Typical Scenarios: Common E2E test cases include verifying multi-provider orchestration [8], custom search provider integration [11], and ensuring that retrieval results are correctly mapped and cited in the final LLM response [12][9]. If you are working on a specific repository, please check the local tests/e2e/ directory or the issue tracker associated with that repository for the exact implementation details [9][13].

Citations:


검증 대상으로 명시된 미완료 시나리오를 처리하세요.

#78 테스트 결과 문서의 미완료 항목에 NO_CONTEXT, 권한, 입력 검증이 보류로 남아 있습니다. 이 PR이 #78을 종료하는 경우라면 해당 결과를 추가하거나, 그렇지 않다면 후속 이슈로 명시해야 합니다. queryText 빈 값과 topK 21 이상 검증은 인덱싱 파이프라인 완료와 무관하게 별도로 진행 가능합니다.

🤖 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/kangcheolung-`#78-search-rag-e2e-test.md around lines 152 -
160, Update the `#78` test-results documentation to resolve the listed incomplete
scenarios: add results for NO_CONTEXT, the permission case using test@gmail.com,
and input validation for empty queryText and topK values of 21 or higher. If
this PR does not cover them, explicitly track each as a follow-up issue instead
of leaving them only marked as pending.

환각 방지 관련 결론을 단일 질의 관찰로 범위를 명확히 하고, 인덱싱
파이프라인과 무관하게 검증 가능한 입력 검증 항목을 "보류"에서
"확인됨"으로 정리한다(검색 블록 #56에서 이미 검증된 로직, RAG 통합으로
변경 없음).
@kangcheolung
kangcheolung merged commit 1eb1761 into develop Jul 30, 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.

[Test] 검색+RAG 통합 e2e 테스트

1 participant