yureong

yureong

Verifies Korean legal citations (case numbers, statutes) against the official government database to detect AI hallucinations. Works as CLI, MCP server, or Python library.

Category
Visit Server

README

yureong (์œ ๋ น) ๐Ÿ‘ป

AI๊ฐ€ ์ง€์–ด๋‚ธ ์œ ๋ นํŒ๋ก€๋ฅผ ์žก์•„๋ƒ…๋‹ˆ๋‹ค.

ChatGPTยทClaudeยทGemini๊ฐ€ ์ƒ์„ฑํ•œ ๋ฒ•๋ฅ  ๋‹ต๋ณ€์ด๋‚˜ ์„œ๋ฉด ์ดˆ์•ˆ์—์„œ ํŒ๋ก€๋ฒˆํ˜ธยทํ—Œ์žฌ์‚ฌ๊ฑดยท๋ฒ•๋ น ์กฐ๋ฌธ ์ธ์šฉ์„ ์ถ”์ถœํ•ด, ๋ฒ•์ œ์ฒ˜ ๊ตญ๊ฐ€๋ฒ•๋ น์ •๋ณด ๊ณต์‹ DB์™€ ์‹ค์‹œ๊ฐ„ ๋Œ€์กฐํ•ฉ๋‹ˆ๋‹ค. ์‹ค์žฌํ•˜์ง€ ์•Š๋Š” "์œ ๋ น ์ธ์šฉ"์„ ์ œ์ถœ ์ „์— ๊ฑธ๋Ÿฌ๋‚ด๋Š” ๋„๊ตฌ์ž…๋‹ˆ๋‹ค.

๋ฏธ๊ตญ์—์„œ๋Š” ๋ณ€ํ˜ธ์‚ฌ๊ฐ€ ChatGPT๊ฐ€ ์ง€์–ด๋‚ธ ๊ฐ€์งœ ํŒ๋ก€๋ฅผ ์„œ๋ฉด์— ๊ทธ๋Œ€๋กœ ์ธ์šฉํ•ด ๋ฒ•์› ์ œ์žฌ๋ฅผ ๋ฐ›๋Š” ์‚ฌ๊ฑด์ด ๋ฐ˜๋ณต๋˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค(Mata v. Avianca ์ดํ›„ ์ˆ˜๋ฐฑ ๊ฑด). ํ•œ๊ตญ์–ด ๋ฒ•๋ฅ  ์ธ์šฉ์„ ๊ธฐ๊ณ„ ๋Œ€์กฐํ•˜๋Š” ๊ณต๊ฐœ ๋„๊ตฌ๊ฐ€ ์—†์–ด์„œ, ํ˜„์ง ํ˜•์‚ฌ๋ณ€ํ˜ธ์‚ฌ๊ฐ€ ์ง์ ‘ ๋งŒ๋“ค์—ˆ์Šต๋‹ˆ๋‹ค.

์˜์กด์„ฑ 0 โ€” ํŒŒ์ด์ฌ ํ‘œ์ค€๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋งŒ ์”๋‹ˆ๋‹ค. LLM๋„ ์•ˆ ์”๋‹ˆ๋‹ค(๊ฒฐ์ •๋ก ์  ๋Œ€์กฐ).

๐ŸŸข [ํŒ๋ก€] ๋Œ€๋ฒ•์› 2026๋„459 โ€” ์‹ค์žฌ ํ™•์ธ
   ์‹ค์žฌ ํ™•์ธ โ€” ๋ฒ”์ฃ„๋‹จ์ฒด๊ฐ€์ž…ยท๋ฒ”์ฃ„๋‹จ์ฒดํ™œ๋™ยท์‚ฌ๊ธฐยท์ž๋ณธ์‹œ์žฅ๊ณผ๊ธˆ์œตํˆฌ์ž์—…์—๊ด€ํ•œ๋ฒ•๋ฅ ์œ„๋ฐ˜
   ๊ณต์‹ ํ‘œ๊ธฐ: ๋Œ€๋ฒ•์› 2026-04-30 2026๋„459

๐Ÿ”ด [ํŒ๋ก€] ๋Œ€๋ฒ•์› 2020๋‹ค999888 โ€” ์œ ๋ น ์˜์‹ฌ โ€” ์›๋ฌธ ํ™•์ธ ํ•„์ˆ˜
   ๋Œ€๋ฒ•์› ์‚ฌ๊ฑด๋ฒˆํ˜ธ๊ฐ€ ๊ณต๊ฐœ ํŒ๋ก€DB์— ์—†์Œ โ€” ์œ ๋ น ์ธ์šฉ ์˜์‹ฌ

๐ŸŸก [ํŒ๋ก€] ๋Œ€๋ฒ•์› 2025๋‹ค213488 โ€” ์ฃผ์˜ โ€” ํ™•์ธ ํ•„์š”
   ์‚ฌ๊ฑด๋ฒˆํ˜ธ๋Š” ์‹ค์žฌํ•˜๋‚˜ ์„ ๊ณ ์ผ ๋ถˆ์ผ์น˜(๋ณธ๋ฌธ 2024-12-01 โ‰  ์‹ค์ œ 2026-04-30)
   โ€” ๋‹ค๋ฅธ ํŒ๋ก€๋ฅผ ์„ž์—ˆ์„ ์ˆ˜ ์žˆ์Œ

๐Ÿ”ด [๋ฒ•๋ น] ํ˜•๋ฒ• ์ œ999์กฐ โ€” ์œ ๋ น ์˜์‹ฌ โ€” ์›๋ฌธ ํ™•์ธ ํ•„์ˆ˜
   ํ˜„ํ–‰ ํ˜•๋ฒ•์— ์ œ999์กฐ๊ฐ€ ์—†์Œ โ€” ์œ ๋ น ์กฐ๋ฌธ ์˜์‹ฌ

๊ฒ€์‚ฌ 8๊ฑด โ†’ ๐ŸŸข 4  ๐ŸŸก 2  ๐Ÿ”ด 2
๐Ÿ”ด ์œ ๋ น ์˜์‹ฌ ์ธ์šฉ์ด ์žˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋Œ€๋กœ ์ œ์ถœํ•˜์ง€ ๋งˆ์„ธ์š”.

์„ค์น˜

pipx install yureong        # ๋˜๋Š” pip install yureong

๋ฒ•์ œ์ฒ˜ Open API ํ‚ค(๋ฌด๋ฃŒ)๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. open.law.go.kr์—์„œ ์‹ ์ฒญํ•˜๋ฉด ๊ฐ€์ž… ์ด๋ฉ”์ผ์˜ ์•„์ด๋”” ๋ถ€๋ถ„์ด ๊ณง ํ‚ค์ž…๋‹ˆ๋‹ค (์˜ˆ: me@gmail.com โ†’ me).

export LAW_GO_KR_OC=<์ด๋ฉ”์ผ์•„์ด๋””>

์‚ฌ์šฉ๋ฒ•

CLI

yureong ์„œ๋ฉด์ดˆ์•ˆ.md              # ํŒŒ์ผ ๊ฒ€์‚ฌ
cat ai๋‹ต๋ณ€.txt | yureong -       # ํŒŒ์ดํ”„
yureong --text "๋Œ€๋ฒ•์› 2020๋‹ค12345 ํŒ๊ฒฐ์— ๋”ฐ๋ฅด๋ฉด..."
yureong ์„œ๋ฉด์ดˆ์•ˆ.md --json       # ๊ธฐ๊ณ„์šฉ ์ถœ๋ ฅ

์ข…๋ฃŒ์ฝ”๋“œ๋กœ ๊ฒŒ์ดํŠธ๋ฅผ ๋งŒ๋“ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค: 0 ์ด์ƒ ์—†์Œ ยท 1 ๐Ÿ”ด ์กด์žฌ ยท 2 ์„ค์ • ์˜ค๋ฅ˜. CI๋‚˜ ํ›…์— ๋„ฃ์œผ๋ฉด "์œ ๋ น ์ธ์šฉ์ด ์žˆ์œผ๋ฉด ๋ณ€ํ™˜ยท์ œ์ถœ์„ ๊ธฐ๊ณ„์ ์œผ๋กœ ์ฐจ๋‹จ"์ด ๋ฉ๋‹ˆ๋‹ค.

MCP ์„œ๋ฒ„ (Claude Code ยท Claude Desktop ๋“ฑ)

claude mcp add yureong --env LAW_GO_KR_OC=<ํ‚ค> -- yureong mcp

์ดํ›„ AI์—๊ฒŒ "์ด ๋‹ต๋ณ€ yureong์œผ๋กœ ๊ฒ€์ฆํ•ด"๋ผ๊ณ  ํ•˜๋ฉด verify_citations ๋„๊ตฌ๊ฐ€ ํ˜ธ์ถœ๋ฉ๋‹ˆ๋‹ค. AI๊ฐ€ ์Šค์Šค๋กœ ์ƒ์„ฑํ•œ ์ธ์šฉ์„ ์Šค์Šค๋กœ ๊ฒ€์ฆํ•˜๊ฒŒ ๋งŒ๋“œ๋Š” ๊ตฌ์กฐ์ž…๋‹ˆ๋‹ค.

Python

from yureong import check_text

result = check_text(open("์„œ๋ฉด.md").read())
print(result["counts"])   # {'GREEN': 4, 'AMBER': 2, 'RED': 2, 'ERROR': 0}

ํŒ์ •์˜ ์˜๋ฏธ โ€” ๋ฐ˜๋“œ์‹œ ์ฝ์œผ์„ธ์š”

ํŒ์ • ์˜๋ฏธ ์•„๋‹Œ ๊ฒƒ
๐ŸŸข GREEN ์‚ฌ๊ฑด๋ฒˆํ˜ธยท์กฐ๋ฌธ์ด ๊ณต์‹ DB์— ์‹ค์žฌ ์ธ์šฉ ์ทจ์ง€๊นŒ์ง€ ๋งž๋‹ค๋Š” ๋ณด์ฆ ์•„๋‹˜
๐ŸŸก AMBER ์‹ค์žฌํ•˜๋‚˜ ์„ ๊ณ ์ผยท๋ฒ•์› ๋ถˆ์ผ์น˜ / ํ•˜๊ธ‰์‹ฌ์ด๋ผ DB ๋ถ€์žฌ๋กœ ๋‹จ์ • ๋ถˆ๊ฐ€ / ๋ฒ•๋ น๋ช… ๋ฏธํ™•์ธ ๋ฌด์‹œํ•ด๋„ ๋œ๋‹ค๋Š” ๋œป ์•„๋‹˜
๐Ÿ”ด RED ๊ณต๊ฐœ DB์—์„œ ํ™•์ธ ๋ถˆ๊ฐ€ โ€” ์œ ๋ น ์˜์‹ฌ 100% ๊ฐ€์งœ๋ผ๋Š” ๋‹จ์ • ์•„๋‹˜

๋ฒ•์ œ์ฒ˜ ํŒ๋ก€ DB๋Š” ๊ณต๊ฐœ๋œ ํŒ๋ก€๋งŒ ์ˆ˜๋กํ•ฉ๋‹ˆ๋‹ค. ์‹ฌ๋ฆฌ๋ถˆ์†ํ–‰ ๊ธฐ๊ฐ, ๋ฏธ๊ณต๊ฐœ ํ•˜๊ธ‰์‹ฌ ๋“ฑ ์‹ค์žฌํ•˜์ง€๋งŒ DB์— ์—†๋Š” ํŒ๋ก€๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋ž˜์„œ ๐Ÿ”ด์˜ ์ •ํ™•ํ•œ ์˜๋ฏธ๋Š” "์ด๋Œ€๋กœ ์ œ์ถœํ•˜๋ฉด ์•ˆ ๋˜๊ณ , ์›๋ฌธ์„ ์ง์ ‘ ํ™•๋ณดํ•ด์•ผ ํ•œ๋‹ค"์ž…๋‹ˆ๋‹ค. ๋ฐ˜๋Œ€๋กœ ๐ŸŸข๋„ ์กด์žฌ ํ™•์ธ์ผ ๋ฟ โ€” AI๊ฐ€ ์‹ค์žฌ ํŒ๋ก€์— ์—‰๋šฑํ•œ ๋ฒ•๋ฆฌ๋ฅผ ๋ถ™์ด๋Š” ํ™˜๊ฐ(์ทจ์ง€ ์™œ๊ณก)์€ ์ด ๋„๊ตฌ๊ฐ€ ์žก์ง€ ๋ชปํ•ฉ๋‹ˆ๋‹ค(๋กœ๋“œ๋งต ์ฐธ์กฐ).

์ด ๋„๊ตฌ๋Š” ์ธ์šฉ์„ ํ†ต๊ณผ์‹œํ‚ค๋Š” ๋„๊ตฌ๊ฐ€ ์•„๋‹ˆ๋ผ, ์˜์‹ฌ ์ง€์ ์„ ๋…ธ์ถœํ•˜๋Š” ๋„๊ตฌ์ž…๋‹ˆ๋‹ค. ์ตœ์ข… ํ™•์ธ ์ฑ…์ž„์€ ์–ธ์ œ๋‚˜ ๋ฒ•๋ฅ ๊ฐ€์—๊ฒŒ ์žˆ์Šต๋‹ˆ๋‹ค.

ํ•œ๊ณ„ (v0.1)

  • ๊ณต๋ฐฑ ํฌํ•จ ๊ธด ์ •์‹๋ช…์นญ(์˜ˆ: "์„ฑํญ๋ ฅ๋ฒ”์ฃ„์˜ ์ฒ˜๋ฒŒ ๋“ฑ์— ๊ด€ํ•œ ํŠน๋ก€๋ฒ•")์€ ใ€Œใ€ ์—†์ด ์“ฐ๋ฉด ์ผ๋ถ€๋งŒ ์ธ์‹๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค โ†’ ๐ŸŸก๋กœ ์•ˆ์ „ํ•˜๊ฒŒ ์ฒ˜๋ฆฌ๋ฉ๋‹ˆ๋‹ค. ์•ฝ์นญ(์„ฑํญ๋ ฅ์ฒ˜๋ฒŒ๋ฒ•)์€ ์ง€์›.
  • ๊ตฌ๋ฒ•(๊ฐœ์ • ์ „) ์กฐ๋ฌธ ๋ฒˆํ˜ธ๋Š” ํ˜„ํ–‰๋ฒ• ๊ธฐ์ค€์œผ๋กœ ๐Ÿ”ด๊ฐ€ ๋œฐ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค โ€” ์—ฐํ˜ ํ™•์ธ ํ•„์š”.
  • ํ–‰์ •์‹ฌํŒ ์žฌ๊ฒฐยท์กฐ์„ธ์‹ฌํŒ ๊ฒฐ์ • ๋“ฑ์€ ์•„์ง ๋Œ€์ƒ์ด ์•„๋‹™๋‹ˆ๋‹ค.

๋กœ๋“œ๋งต

  • [ ] v0.2 โ€” ์ทจ์ง€ ๋Œ€์กฐ: ์ธ์šฉ ์ฃผ๋ณ€ ๋ฌธ์žฅ๊ณผ ์‹ค์ œ ํŒ์‹œ์‚ฌํ•ญ์˜ ์˜๋ฏธ ์œ ์‚ฌ๋„ ๋น„๊ต (์œ ๋ น ๋ฒ•๋ฆฌ ํƒ์ง€)
  • [ ] v0.2 โ€” ๊ณต๋ฐฑ ํฌํ•จ ์ •์‹๋ช…์นญ ์ธ์‹ ๊ฐœ์„ , ๊ตฌ๋ฒ• ์—ฐํ˜ ์กฐํšŒ
  • [ ] v0.3 โ€” ํ์ง€ ๋ฒ•๋ นยท๊ฐœ์ • ์—ฐํ˜ ๊ฒฝ๊ณ , ํ–‰์ •์‹ฌํŒ ์žฌ๊ฒฐ๋ก€

ํ”„๋ผ์ด๋ฒ„์‹œ

๊ฒ€์‚ฌ ํ…์ŠคํŠธ ์ „์ฒด๊ฐ€ ์•„๋‹ˆ๋ผ ์ถ”์ถœ๋œ ์‚ฌ๊ฑด๋ฒˆํ˜ธยท๋ฒ•๋ น๋ช…๋งŒ ๋ฒ•์ œ์ฒ˜ API๋กœ ์ „์†ก๋ฉ๋‹ˆ๋‹ค. ๊ทธ ์™ธ ๋ณธ๋ฌธ์€ ๋กœ์ปฌ์„ ๋– ๋‚˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ๊ทธ๋ž˜๋„ ์‹ค๋ช… ์‚ฌ๊ฑด๋ฒˆํ˜ธ ๋“ฑ ๋ฏผ๊ฐ์ •๋ณด๊ฐ€ ๊ฑฑ์ •๋˜๋ฉด ๋งˆ์Šคํ‚น ํ›„ ์‚ฌ์šฉํ•˜์„ธ์š”.

License

MIT โ€” ์ž์œ ๋กญ๊ฒŒ ์“ฐ๊ณ , ๊ณ ์น˜๊ณ , ์ž„๋ฒ ๋“œํ•˜์„ธ์š”.


English

yureong ("ghost" in Korean) detects AI-hallucinated Korean legal citations. It extracts case numbers (Supreme Court, Constitutional Court, lower courts) and statute references from any text and verifies them against the official Korean government legal database (law.go.kr Open API). Zero dependencies, no LLM โ€” deterministic lookup only. Ships as a CLI, an MCP server (yureong mcp), and a Python library. Exit codes make it usable as a CI/pre-submission gate. A red flag means "not found in the public DB โ€” verify before use," not "proven fake"; green means the citation exists, not that the claimed holding matches. Final verification is always the lawyer's job.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured