Multi-Agent Conversation(MAC) 프레임워크로 의료 진단 능력 강화하기
Enhancing diagnostic capability with multi-agents conversational large language models
TL;DR Highlight
여러 AI 의사 에이전트가 MDT 회의처럼 협업하여 희귀 질환 진단 정확도를 GPT-4 단독보다 높인다.
Who Should Read
의료 AI 솔루션을 개발하는 백엔드 개발자 또는 멀티 에이전트 시스템을 설계 중인 AI 엔지니어. 특히 LLM 단독 추론의 한계를 느끼고 에이전트 협업 구조를 고민하는 분들.
Core Mechanics
- 임상 다학제팀(MDT, 여러 전문의가 모여 논의하는 방식)을 모방한 MAC 프레임워크 설계 — 여러 Doctor 에이전트가 토론하고 Supervisor 에이전트가 최종 판단
- 302개 희귀 질환 케이스로 GPT-3.5, GPT-4, MAC 세 가지 비교 — 초진과 추가 상담 모두에서 MAC이 단독 모델 대비 진단 정확도와 검사 제안 정확도 모두 우세
- 최적 구성은 Doctor 에이전트 4명 + Supervisor 에이전트 1명, 베이스 모델은 GPT-4
- CoT(Chain of Thought, 단계별 추론), Self-Refine(스스로 답 수정), Self-Consistency(여러 번 답하고 다수결) 등 기존 프롬프트 기법들과 비교했을 때 MAC이 정확도와 출력 토큰 수 모두에서 앞섬
- 반복 실행 시 결과 일관성이 높아 실제 임상 적용 가능성 있음
Evidence
- MAC은 GPT-4 단독 대비 초진 및 추가 상담 진단 정확도 모두에서 더 높은 수치 달성 (논문 내 희귀질환 302케이스 기준)
- CoT, Self-Refine, Self-Consistency 대비 MAC이 더 높은 진단 정확도 + 더 많은 출력 토큰(근거 서술 풍부) 기록
- Doctor 에이전트 수를 1→4명으로 늘릴수록 성능 향상, 4명에서 최적점 도달
How to Apply
- 복잡한 분류/판단 태스크에서 단일 LLM 호출 대신, 역할이 다른 에이전트(예: 전문가 A, 전문가 B, 검토자)를 병렬로 돌리고 Supervisor 에이전트가 최종 결론 내리는 구조로 바꿔보면 정확도 향상 기대 가능
- GPT-4 기반으로 에이전트를 구성할 때 4~5개 에이전트가 최적 — 에이전트가 너무 많으면 비용과 지연이 증가하고 성능 향상이 둔화되므로 이 범위 참고
- 의료 외에도 법률 검토, 코드 리뷰, 요구사항 분석처럼 여러 관점이 필요한 도메인에 동일한 MDT 패턴 적용 가능 — 각 에이전트에 다른 전문 역할 페르소나를 부여하면 됨
Code Example
# OpenAI API를 활용한 간단한 MAC 패턴 예시
import openai
client = openai.OpenAI()
def doctor_agent(case: str, specialty: str) -> str:
response = client.chat.completions.create(
model="gpt-4",
messages=[
{"role": "system", "content": f"You are an experienced {specialty} physician. Analyze the case and suggest a diagnosis with reasoning."},
{"role": "user", "content": case}
]
)
return response.choices[0].message.content
def supervisor_agent(case: str, doctor_opinions: list[str]) -> str:
opinions_text = "\n\n".join([f"Doctor {i+1}: {op}" for i, op in enumerate(doctor_opinions)])
response = client.chat.completions.create(
model="gpt-4",
messages=[
{"role": "system", "content": "You are a senior supervising physician. Review all doctor opinions and provide a final integrated diagnosis."},
{"role": "user", "content": f"Case:\n{case}\n\nDoctor Opinions:\n{opinions_text}\n\nProvide the final diagnosis."},
]
)
return response.choices[0].message.content
# 사용 예시
case = "28-year-old patient with progressive muscle weakness, fatigue, and elevated CK levels..."
specialties = ["neurologist", "rheumatologist", "internal medicine specialist", "geneticist"]
# 4명의 Doctor 에이전트 실행
opinions = [doctor_agent(case, s) for s in specialties]
# Supervisor가 최종 진단
final_diagnosis = supervisor_agent(case, opinions)
print(final_diagnosis)Terminology
관련 논문
프로덕션 AI 에이전트를 GPT-5.6으로 마이그레이션: 2.2배 빠르고 27% 저렴
마케팅 웹사이트를 자동 생성하는 프로덕션 AI 에이전트를 Claude Opus 4.8에서 GPT-5.6 Sol로 전환한 실전 경험담으로, 단순 모델 교체가 아니라 eval 하네스, 툴 스키마, 캐싱, 추론 리플레이까지 손봐야 했던 과정을 구체적인 수치와 함께 정리했다.
xAI Grok Build CLI가 xAI 서버로 전송하는 데이터: 네트워크 레벨 분석
xAI의 공식 코딩 CLI 도구 Grok Build가 사용자 동의 없이 전체 Git 저장소와 .env 시크릿 파일을 xAI 서버로 업로드한다는 사실이 네트워크 트래픽 분석으로 밝혀졌다.
중요할 때 기억하라: Long-Horizon 에이전트를 위한 Proactive Memory Agent
LLM 에이전트가 긴 작업 중 중요한 정보를 잊어버리는 문제를 별도의 메모리 에이전트가 '적절한 타이밍에' 끼어들어 해결하는 방법
WebSwarm: 깊고 넓은 웹 검색을 위한 재귀적 Multi-Agent Orchestration
복잡한 웹 검색을 재귀적으로 분해하고 각 노드에 적합한 검색 모드를 동적으로 할당하는 멀티에이전트 프레임워크
웹 앱을 리버스 엔지니어링해서 AI Agent 도구로 자동 변환하기
로그인된 웹 앱의 API 호출을 브라우저에서 감시해 자동으로 MCP 도구로 변환하는 에이전트를 만들었다. 소스 코드나 공식 API 문서 없이도 Jira, Spotify 같은 서비스에 AI 어시스턴트를 붙일 수 있다.
FableCut – AI 에이전트가 조작할 수 있는 브라우저 기반 비디오 에디터 (zero deps)
타임라인 전체를 JSON 파일 하나로 표현하고 MCP/REST로 AI 에이전트가 직접 편집할 수 있는 브라우저 비디오 에디터로, Claude 같은 AI가 프롬프트 하나로 영상을 자동 컷편집하고 결과를 실시간으로 UI에 반영해준다.
Original Abstract (Expand)
Large Language Models (LLMs) show promise in healthcare tasks but face challenges in complex medical scenarios. We developed a Multi-Agent Conversation (MAC) framework for disease diagnosis, inspired by clinical Multi-Disciplinary Team discussions. Using 302 rare disease cases, we evaluated GPT-3.5, GPT-4, and MAC on medical knowledge and clinical reasoning. MAC outperformed single models in both primary and follow-up consultations, achieving higher accuracy in diagnoses and suggested tests. Optimal performance was achieved with four doctor agents and a supervisor agent, using GPT-4 as the base model. MAC demonstrated high consistency across repeated runs. Further comparative analysis showed MAC also outperformed other methods including Chain of Thoughts (CoT), Self-Refine, and Self-Consistency with higher performance and more output tokens. This framework significantly enhanced LLMs’ diagnostic capabilities, effectively bridging theoretical knowledge and practical clinical application. Our findings highlight the potential of multi-agent LLMs in healthcare and suggest further research into their clinical implementation.