Skip to main content

AI safety toolkit for clinicians and health content creators

Project description

MedCreatorGuard

AI safety toolkit for clinicians and health content creators

License: MIT Python 3.10+ PyPI

의사이자 AI creator의 관점에서 설계한 의료 콘텐츠 안전성 검토 오픈소스 도구.


What is this?

MedCreatorGuard is an open-source AI toolkit that helps clinicians and health creators review medical content for factual accuracy, evidence quality, and patient safety before publishing.

SNS에 올라오는 건강 콘텐츠 중 많은 부분이:

  • 효과를 과장하거나 ("완치됩니다", "모든 사람에게 효과")
  • 근거 없는 주장을 하거나 ("독소 배출", "간 해독")
  • 전문 의료를 불필요하게 여기게 만듭니다 ("병원 안 가도 됩니다")

MedCreatorGuard는 이런 문제를 자동으로 감지하고, 더 안전한 표현으로 수정을 제안합니다.


Features

  • Rule-based scan — API 호출 없이 위험 패턴 즉시 감지 (한국어 + 영어, --no-llm)
  • LLM analysis — OpenAI(gpt-4o-mini) 또는 Anthropic Claude로 의료 주장 추출, 근거 등급 평가, 안전한 재작성 제안
  • CLI tool — 터미널에서 바로 사용 (medguard check, medguard rewrite)
  • Paper-to-post — 연구 논문 초록 → 안전한 SNS 포스트 자동 변환

Installation

Option 1: PyPI (권장)

pip install medcreatorguard

# Claude를 사용하려면:
pip install "medcreatorguard[claude]"

Option 2: GitHub에서 직접 설치

git clone https://github.com/aimekoreaofficial/MedCreatorGuard.git
cd MedCreatorGuard
pip install -e .

API 키 설정

LLM 분석을 사용하려면 API 키가 필요합니다. (룰 기반 검사만 쓰려면 --no-llm — 키 불필요)

# OpenAI (기본, --llm openai)
export OPENAI_API_KEY=<your-api-key>       # Mac/Linux
set OPENAI_API_KEY=<your-api-key>          # Windows cmd

# Anthropic Claude (--llm claude)
export ANTHROPIC_API_KEY=<your-api-key>

Quick Start

# 텍스트 직접 분석
medguard check --text "마그네슘을 먹으면 불면증이 완치됩니다."

# API 키 없이 룰 기반 검사만
medguard check --no-llm --text "부작용 없는 100% 효과 보장!"

# 파일 분석
medguard check examples/korean_sleep_caption.txt

# Claude로 분석
medguard check --llm claude --text "당뇨가 완치됩니다."

# 안전한 표현으로 재작성
medguard rewrite --text "이 방법만 하면 병원에 가지 않아도 됩니다."

# 연구 논문 초록 → SNS 포스트 변환
medguard paper-to-post examples/abstract.txt --platform instagram

# JSON 형식으로 출력
medguard check --text "당뇨가 완치됩니다." --json

Example Output

medguard check --text "마그네슘을 먹으면 불면증이 대부분 해결됩니다."

╭─── MedCreatorGuard Report ───╮
│ Risk Score: 🟡 중간 (Medium) │
╰──────────────────────────────╯

Detected Claims
 Claim                            Type              Evidence  Risk    Concern
 마그네슘 섭취가 불면증을 해결한다   treatment_effect  C         medium  효과가 과장됨.
                                                                     근거는 제한적임.

⚠ Risky Phrases
  • 대부분 해결됩니다
    불면증 해결을 과장함
    → 일부 사람에게 수면 개선에 도움이 될 수 있습니다

╭─ Suggested Safe Rewrite ─────────────────────────────────╮
│ 마그네슘은 일부 사람의 수면 관리에 도움이 될 수 있지만,      │
│ 불면증은 다양한 원인이 있습니다. 증상이 지속되면 의료진과    │
│ 상담하는 것이 좋습니다.                                    │
╰──────────────────────────────────────────────────────────╯

╭─ Suggested Disclaimer ───────────────────────────────────╮
│ 이 콘텐츠는 일반적인 건강 정보 제공 목적이며               │
│ 개인의 진단이나 치료를 대체하지 않습니다.                  │
╰──────────────────────────────────────────────────────────╯

CLI Options

Option Commands Description
--text, -t check, rewrite 인라인 텍스트 분석
--llm all LLM 프로바이더: openai(기본) 또는 claude
--model, -m all 모델 지정 (기본: openai=gpt-4o-mini, claude=claude-opus-4-8)
--no-llm check, rewrite API 키 없이 룰 기반 검사만 실행
--json check, paper-to-post 원시 JSON 출력
--platform, -p paper-to-post 대상 플랫폼 (기본: instagram)

LLM 호출이 실패하면(타임아웃, 잘못된 응답 등) 크래시하지 않고 룰 기반 결과로 자동 전환되며 경고가 표시됩니다.


Evidence Levels

Grade Meaning
A 강한 근거 — 메타분석 / 대규모 RCT
B 중등도 근거 — 소규모 임상 / 관찰연구
C 제한적 근거 — 전문가 의견 / 기전 추론
D 근거 부족 또는 과장 가능성

Development

git clone https://github.com/aimekoreaofficial/MedCreatorGuard.git
cd MedCreatorGuard
pip install -e ".[dev,claude]"
pytest

License

MIT License — 자유롭게 사용, 수정, 배포 가능합니다.


Built by @aimekoreaofficial

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

medcreatorguard-0.2.0.tar.gz (22.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

medcreatorguard-0.2.0-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file medcreatorguard-0.2.0.tar.gz.

File metadata

  • Download URL: medcreatorguard-0.2.0.tar.gz
  • Upload date:
  • Size: 22.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for medcreatorguard-0.2.0.tar.gz
Algorithm Hash digest
SHA256 bf254cbb4da2d47fd52631919067ed17b99afd312c8c18ad71d3d2f972186f8a
MD5 6a8d46de4957cf4a9470b8fa3da4057f
BLAKE2b-256 203e960cfef4b3f0060b61dae2577d2ab98cdf5877afcf7bce6824485e2e0aed

See more details on using hashes here.

File details

Details for the file medcreatorguard-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for medcreatorguard-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ff759a9b2f8d72c47c97d7938f200dd400398b6dd219f66a391cad2e131f7ba7
MD5 00030f4a7c47702577557cd8a311e1e2
BLAKE2b-256 b351dde62bcd4c7d45a2ce1d62022652e2c676baf59b85e49146e0025c012cfc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page