aa0101181514

Open-source CLI for semantic Taiwan legal judgment retrieval. Search judgments, package them for your own AI (ChatGPT/Claude/Gemini), and run a bundle-level citation check. Bring your own LLM; retrieval-only.

44
6
80% credibility
Found May 28, 2026 at 85 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Python
AI Summary

Taiwan Legal RAG is a free tool that helps anyone look up real court decisions in Taiwan and use them with AI assistants for legal research. You search for relevant cases, package them into a bundle with clear citation rules, share the bundle with any AI chatbot, and then run a built-in check to verify the AI actually cited the correct cases from your research instead of making things up. It is designed specifically for retrieval only — it never generates legal advice itself and always reminds users to verify everything and consult real lawyers.

How It Works

1
🔍 Ask about a legal situation

You type your legal question in plain language, like asking about overtime pay disputes or car accident liability.

2
📚 Get matching court cases

The tool searches through millions of Taiwan court decisions and finds the ones most relevant to your question, showing you the case numbers and brief summaries.

3
📦 Package everything for an AI assistant

You create a bundle containing the full text of selected cases, numbered citations (J1, J2, etc.), and clear instructions telling the AI to only cite what is in the bundle.

4
Give the bundle to any AI assistant
📝
Ask follow-up questions

The AI can help you understand the cases using only the provided court decisions as its source material.

📄
Get a written legal summary

Some people copy the AI's answer to share with lawyers or include in documents.

5
⚠️ Verify the AI's answer is honest

Before trusting any answer, you run a check that confirms the AI only cited cases from your bundle and that its quoted text actually appears somewhere in the court decisions.

Get trustworthy legal information

You've successfully gathered real court cases, had an AI help explain them, and verified the AI didn't make up citations or misread the rulings.

Sign up to see the full architecture

4 more

Sign Up Free

Star Growth

See how this repo grew from 85 to 44 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is tw-legal-rag?

A Python CLI tool that retrieves Taiwan court judgments for use with your own AI assistant. You search cases with plain-language queries, get back structured legal bundles with full text excerpts, then use a bundle-level citation checker to verify whether an AI's answer actually cited the cases it claimed. It talks to a REST API over HTTPS, runs entirely locally, and calls no LLM itself. The `pack` command exports a JSON bundle you can hand to ChatGPT, Claude, or any model with citation ids and explicit verification rules baked in.

Why is it gaining traction?

Legal AI is exploding, but most tools either hallucinate case citations or lock you into a vendor's model. This flips that: it's retrieval-only, so you bring your own LLM while the tool stays focused on what it does well. The citation check is deterministic and purely string-based—no AI needed—which means you can catch fabricated quotes without spinning up a separate model. Developers building legal AI workflows like the two-stage split: retrieve first, verify later.

Who should use this?

Legal tech builders integrating Taiwan case law into AI apps. Developers building workflows that hand judgment data to LLMs and need a trust layer. Anyone tired of AI models citing fake cases in legal research.

Verdict

At 44 stars and v0.1.0, this is early-stage but focused on a real problem. The citation verification is clever—pure string functions, no LLM cost—and the bundle system gives you a clean handoff to any AI tool you prefer. Credibility score sits at 0.800000011920929%, reflecting the beta status, but the codebase is clean and the CLI is straightforward. Worth trying if you're building legal AI with Taiwan jurisprudence.

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.