Skip to content

[고객지원 챗봇 만들기] 신관규 제출합니다.#5

Open
Soundbar91 wants to merge 45 commits into
cho-log:mainfrom
Soundbar91:soundbar91
Open

[고객지원 챗봇 만들기] 신관규 제출합니다.#5
Soundbar91 wants to merge 45 commits into
cho-log:mainfrom
Soundbar91:soundbar91

Conversation

@Soundbar91
Copy link
Copy Markdown
Contributor

@Soundbar91 Soundbar91 commented May 21, 2026

구현 내용

챗봇 플로우는 다음과 같습니다.

  • FaqReader, CurrentPolicyReader, InternalPolicy, ChatlogReader 클래스에서 대응되는 데이터 레이어를 읽어 Document로 변환합니다.
  • 이후 VectorStore에 Document를 적재합니다.
  • 사용자 질의가 들어오면 각 데이터 레이어에 대해서 유사도 검색을 통해 Document를 조회합니다.
  • 이후 조회된 Document를 사용자 질의와 함께 OpenAI에 전송합니다.

학습 내용

학습 내용은 아래 노션 페이지와 wall-report.md에 정리했습니다.

Soundbar91 added 30 commits May 9, 2026 13:00
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request implements a RAG-based chatbot system using Spring AI, featuring custom document readers for FAQ, policies, and chat logs, a vector store for context retrieval, and a chat service for processing queries. It also includes an evaluation framework and documentation on performance optimizations. Review feedback focuses on improving error handling in document readers by providing descriptive exception messages and adding null safety checks when processing AI model responses to prevent potential runtime errors.

Comment thread src/main/java/com/cholog/bootcamp/reader/ChatLogReader.java Outdated
Comment thread src/main/java/com/cholog/bootcamp/reader/CurrentPolicyReader.java Outdated
Comment thread src/main/java/com/cholog/bootcamp/reader/FaqReader.java Outdated
Comment thread src/main/java/com/cholog/bootcamp/reader/InternalPolicyReader.java Outdated
Comment on lines +53 to +60
Usage usage = chatResponse.getMetadata().getUsage();

return QuestionAskResponse.from(
chatResponse.getResult().getOutput().getText(),
usage.getPromptTokens(),
usage.getCompletionTokens(),
usage.getTotalTokens()
);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

chatResponse.getMetadata().getUsage()chatResponse.getResult()null을 반환할 가능성이 있습니다. 특히 모델 응답이 차단되거나 특정 오류 상황에서 메타데이터가 누락될 수 있으므로, 이에 대한 방어적인 널 체크(null check) 로직을 추가하는 것을 권장합니다.

        Usage usage = chatResponse.getMetadata().getUsage();
        String answer = chatResponse.getResult() != null ? chatResponse.getResult().getOutput().getText() : "";

        return QuestionAskResponse.from(
            answer,
            usage != null ? usage.getPromptTokens() : 0,
            usage != null ? usage.getCompletionTokens() : 0,
            usage != null ? usage.getTotalTokens() : 0
        );

Soundbar91 and others added 5 commits May 21, 2026 14:48
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…java

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
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.

1 participant