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.
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
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.