mirror of
https://github.com/hwanny1128/HGZero.git
synced 2025-12-06 10:16:24 +00:00
AI 회의록 자동작성 내부 시퀀스 수정
- AI 서비스의 회의록 자동작성 내부 시퀀스 다이어그램 수정 - 프롬프트 생성, AI 요청, 응답 처리 로직 개선 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
afe02b3d0b
commit
3cf8eb2995
@ -8,39 +8,34 @@ participant "TranscriptService" as Service
|
|||||||
participant "LLMClient" as LLM
|
participant "LLMClient" as LLM
|
||||||
participant "VectorService" as Vector
|
participant "VectorService" as Vector
|
||||||
participant "TranscriptRepository" as Repo
|
participant "TranscriptRepository" as Repo
|
||||||
database "Azure OpenAI<<E>>" as OpenAI
|
database "Azure OpenAI" as OpenAI <<external>>
|
||||||
database "Vector DB<<E>>" as VectorDB
|
database "Vector DB" as VectorDB <<external>>
|
||||||
database "PostgreSQL<<E>>" as DB
|
database "PostgreSQL" as DB <<external>>
|
||||||
|
|
||||||
== TranscriptReady 이벤트 수신 ==
|
== TranscriptReady 이벤트 수신 ==
|
||||||
|
|
||||||
note over Controller
|
note over Controller
|
||||||
Azure Event Hubs로부터
|
Azure Event Hubs로부터
|
||||||
TranscriptReady 이벤트 수신
|
TranscriptReady 이벤트 수신
|
||||||
(meetingId, transcriptText, timestamp)
|
|
||||||
end note
|
end note
|
||||||
|
|
||||||
Controller -> Service: processTranscript(meetingId, transcriptText, timestamp)
|
Controller -> Service: processTranscript(meetingId, transcriptText)
|
||||||
activate Service
|
activate Service
|
||||||
|
|
||||||
Service -> Service: 회의 맥락 정보 조회 준비
|
Service -> Service: 회의 맥락 정보 조회 준비
|
||||||
note right
|
|
||||||
회의 제목, 참석자 정보,
|
|
||||||
이전 회의록 내용
|
|
||||||
end note
|
|
||||||
|
|
||||||
== 병렬 처리: 맥락 정보 수집 ==
|
== 병렬 처리: 맥락 정보 수집 ==
|
||||||
|
|
||||||
par "회의 정보 조회"
|
par 회의 정보 조회
|
||||||
Service -> Repo: getMeetingContext(meetingId)
|
Service -> Repo: getMeetingContext(meetingId)
|
||||||
activate Repo
|
activate Repo
|
||||||
Repo -> DB: SELECT meeting_info, participants
|
Repo -> DB: SELECT meeting_info
|
||||||
activate DB
|
activate DB
|
||||||
DB --> Repo: 회의 정보 반환
|
DB --> Repo: 회의 정보 반환
|
||||||
deactivate DB
|
deactivate DB
|
||||||
Repo --> Service: 회의 맥락 정보
|
Repo --> Service: 회의 맥락 정보
|
||||||
deactivate Repo
|
deactivate Repo
|
||||||
else
|
else 이전 내용 조회
|
||||||
Service -> Repo: getPreviousTranscripts(meetingId)
|
Service -> Repo: getPreviousTranscripts(meetingId)
|
||||||
activate Repo
|
activate Repo
|
||||||
Repo -> DB: SELECT previous_content
|
Repo -> DB: SELECT previous_content
|
||||||
@ -53,41 +48,25 @@ end
|
|||||||
|
|
||||||
Service -> Service: 프롬프트 생성
|
Service -> Service: 프롬프트 생성
|
||||||
note right
|
note right
|
||||||
시스템 프롬프트:
|
시스템 프롬프트 생성
|
||||||
- 역할: 회의록 작성 전문가
|
- 역할 정의
|
||||||
- 지시사항: 구어체→문어체 변환,
|
- 변환 규칙 적용
|
||||||
주제별 분류, 발언자별 정리
|
|
||||||
|
|
||||||
사용자 프롬프트:
|
|
||||||
- 회의 제목: {title}
|
|
||||||
- 참석자: {participants}
|
|
||||||
- 이전 내용: {previous}
|
|
||||||
- 현재 발언: {transcriptText}
|
|
||||||
end note
|
end note
|
||||||
|
|
||||||
== LLM 기반 회의록 작성 ==
|
== LLM 기반 회의록 작성 ==
|
||||||
|
|
||||||
Service -> LLM: generateMinutes(prompt, meetingContext)
|
Service -> LLM: generateMinutes(prompt, context)
|
||||||
activate LLM
|
activate LLM
|
||||||
|
|
||||||
LLM -> OpenAI: POST /chat/completions
|
LLM -> OpenAI: POST /chat/completions
|
||||||
activate OpenAI
|
activate OpenAI
|
||||||
note right
|
note right
|
||||||
요청 파라미터:
|
model: gpt-4o
|
||||||
- model: gpt-4o
|
temperature: 0.3
|
||||||
- temperature: 0.3
|
max_tokens: 2000
|
||||||
- max_tokens: 2000
|
|
||||||
- messages: [system, user]
|
|
||||||
end note
|
end note
|
||||||
|
|
||||||
OpenAI -> OpenAI: 텍스트 분석 및 정리
|
OpenAI -> OpenAI: 텍스트 분석 및 정리
|
||||||
note right
|
|
||||||
1. 주제별 분류
|
|
||||||
2. 발언자별 의견 정리
|
|
||||||
3. 중요 키워드 추출
|
|
||||||
4. 구어체→문어체 변환
|
|
||||||
5. 문법 교정
|
|
||||||
end note
|
|
||||||
|
|
||||||
OpenAI --> LLM: 정리된 회의록 내용
|
OpenAI --> LLM: 정리된 회의록 내용
|
||||||
deactivate OpenAI
|
deactivate OpenAI
|
||||||
@ -98,27 +77,17 @@ deactivate LLM
|
|||||||
== 회의록 저장 ==
|
== 회의록 저장 ==
|
||||||
|
|
||||||
Service -> Service: 회의록 데이터 구조화
|
Service -> Service: 회의록 데이터 구조화
|
||||||
note right
|
|
||||||
구조화 항목:
|
|
||||||
- 논의 주제
|
|
||||||
- 발언자별 의견
|
|
||||||
- 결정 사항
|
|
||||||
- 보류 사항
|
|
||||||
- 요약문
|
|
||||||
end note
|
|
||||||
|
|
||||||
Service -> Repo: saveTranscriptDraft(meetingId, content, timestamp)
|
Service -> Repo: saveTranscriptDraft(meetingId, content)
|
||||||
activate Repo
|
activate Repo
|
||||||
|
|
||||||
Repo -> DB: INSERT INTO ai_transcripts
|
Repo -> DB: INSERT INTO ai_transcripts
|
||||||
activate DB
|
activate DB
|
||||||
note right
|
note right
|
||||||
저장 데이터:
|
저장 데이터:
|
||||||
- meeting_id
|
- meeting_id
|
||||||
- content (JSON)
|
- content (JSON)
|
||||||
- generated_at
|
- status: DRAFT
|
||||||
- version
|
|
||||||
- status: DRAFT
|
|
||||||
end note
|
end note
|
||||||
|
|
||||||
DB --> Repo: 저장 완료
|
DB --> Repo: 저장 완료
|
||||||
@ -127,7 +96,7 @@ deactivate DB
|
|||||||
Repo --> Service: transcriptId
|
Repo --> Service: transcriptId
|
||||||
deactivate Repo
|
deactivate Repo
|
||||||
|
|
||||||
== 벡터 임베딩 생성 (비동기) ==
|
== 벡터 임베딩 생성 ==
|
||||||
|
|
||||||
Service -> Vector: createEmbedding(transcriptId, content)
|
Service -> Vector: createEmbedding(transcriptId, content)
|
||||||
activate Vector
|
activate Vector
|
||||||
@ -135,8 +104,7 @@ activate Vector
|
|||||||
Vector -> OpenAI: POST /embeddings
|
Vector -> OpenAI: POST /embeddings
|
||||||
activate OpenAI
|
activate OpenAI
|
||||||
note right
|
note right
|
||||||
model: text-embedding-3-large
|
model: text-embedding-3-large
|
||||||
input: 회의록 내용
|
|
||||||
end note
|
end note
|
||||||
|
|
||||||
OpenAI --> Vector: 임베딩 벡터
|
OpenAI --> Vector: 임베딩 벡터
|
||||||
@ -144,11 +112,6 @@ deactivate OpenAI
|
|||||||
|
|
||||||
Vector -> VectorDB: INSERT embedding
|
Vector -> VectorDB: INSERT embedding
|
||||||
activate VectorDB
|
activate VectorDB
|
||||||
note right
|
|
||||||
vector_id: transcriptId
|
|
||||||
embedding: [float array]
|
|
||||||
metadata: {meetingId, timestamp}
|
|
||||||
end note
|
|
||||||
|
|
||||||
VectorDB --> Vector: 저장 완료
|
VectorDB --> Vector: 저장 완료
|
||||||
deactivate VectorDB
|
deactivate VectorDB
|
||||||
@ -156,30 +119,26 @@ deactivate VectorDB
|
|||||||
Vector --> Service: 임베딩 생성 완료
|
Vector --> Service: 임베딩 생성 완료
|
||||||
deactivate Vector
|
deactivate Vector
|
||||||
|
|
||||||
== TranscriptSummaryCreated 이벤트 발행 ==
|
== 이벤트 발행 ==
|
||||||
|
|
||||||
Service -> Controller: 회의록 생성 완료 응답
|
Service -> Controller: 회의록 생성 완료 응답
|
||||||
deactivate Service
|
deactivate Service
|
||||||
|
|
||||||
Controller -> Controller: TranscriptSummaryCreated 이벤트 발행
|
Controller -> Controller: TranscriptSummaryCreated 발행
|
||||||
note right
|
note right
|
||||||
이벤트 데이터:
|
이벤트 데이터:
|
||||||
- meetingId
|
- meetingId
|
||||||
- transcriptId
|
- transcriptId
|
||||||
- content
|
- content
|
||||||
- generatedAt
|
|
||||||
|
|
||||||
Partition Key: {meetingId}
|
|
||||||
Consumer: Meeting Service
|
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note over Controller, DB
|
note over Controller, DB
|
||||||
처리 시간:
|
처리 시간:
|
||||||
- 맥락 정보 조회: 100-200ms
|
- 맥락 조회: 100-200ms
|
||||||
- LLM 생성: 3-5초
|
- LLM 생성: 3-5초
|
||||||
- 저장 처리: 100-200ms
|
- 저장: 100-200ms
|
||||||
- 벡터 임베딩: 500ms-1초 (비동기)
|
- 벡터화: 500ms-1초
|
||||||
총 처리 시간: 약 4-7초
|
총: 약 4-7초
|
||||||
end note
|
end note
|
||||||
|
|
||||||
@enduml
|
@enduml
|
||||||
Loading…
x
Reference in New Issue
Block a user