Merged
Conversation
Issue: - #373 Why: - 클라이언트가 RAG Chat 답변 출처를 표시하기 위해 별도 management search를 재호출하면 실제 답변 생성 context와 표시 근거가 달라질 수 있다. What: - RagContextBuilder가 실제 prompt context에 포함된 RagSearchResult 목록을 BuildResult.usedResults로 반환하도록 확장했다. - /api/ai/chat/rag 응답 metadata에 ragReferences를 추가하고 documentId, sourceName, chunkId, chunkOrder, score, content, page/slide/sourceRef 등 표시용 근거 정보를 내려준다. - context expansion fallback 시에도 실제 사용된 원본 chunk가 ragReferences에 남도록 테스트를 보강했다. - AI web README에 ragReferences 응답 계약을 문서화했다. Validation: - ./gradlew :starter:studio-platform-starter-ai-web:test: PASS - ./gradlew test: PASS - git diff --check: PASS
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
What
RagContextBuilder.BuildResult에 실제 프롬프트에 포함된usedResults를 추가했습니다./api/ai/chat/rag응답metadata.ragReferences에index,documentId,sourceName,chunkId,chunkOrder,score,content, page/slide/sourceRef 등 표시용 metadata를 포함했습니다.ragReferences에 남도록 테스트를 추가했습니다.Related Issues
Validation
./gradlew :starter:studio-platform-starter-ai-web:test./gradlew testgit diff --checkRisk / Rollback
ragReferences.content는 요구사항에 따라 실제 prompt context 본문을 포함하므로, 기존 diagnostics보다 응답 metadata가 커질 수 있습니다. 기존 RAG Chat 권한 경계 안에서만 반환됩니다.AI / Subagent Usage
Checklist
AI-Assistedvalue is correct