
Jed Nykolle Harme
Ask ChatGPT or Claude a question about Philippine law, and you’ll probably get a convincing answer. It might even cite Supreme Court decisions, complete with case titles and General Register numbers.
But does the case actually exist? Sometimes, it really doesn’t.
Atty. Rabelais “Rab” Atty. Medina, a Filipino lawyer and AI engineer, wants to help address that problem. He developed RAB PH LAW, a free, open-source tool that connects AI chatbots such as ChatGPT and Claude to a searchable collection of Philippine legal materials.
Its goal is to help AI-generated legal answers draw from actual Philippine laws and jurisprudence instead of relying solely on what a model remembers from its training.
Why AI gets Philippine law wrong
AI chatbots generate answers based on patterns in their training data. They don’t automatically look up or verify legal authorities each time they answer.
In law, that’s risky. A chatbot may invent a G.R. number, misstate a ruling, cite a decision that has since been overturned, or pass off foreign doctrine as Philippine law.
Atty. Medina says the tools themselves aren’t the issue.
“ChatGPT and Claude are genuinely excellent AI tools. But when it comes to Philippine legal research, they have one major limitation: they don’t always have reliable access to authoritative Philippine legal sources.” he wrote in his Facebook post.
How RAB PH LAW works
Atty. Medina said the system allows ChatGPT or Claude to retrieve relevant Philippine legal documents and use those materials when formulating a response.
It uses semantic search, which matches meaning, not just exact keywords. Someone asking about the “requisites of a valid contract” can find the relevant provisions even if the source uses different wording.
The database covers Philippine statutes, Supreme Court jurisprudence and selected regulations from the Bangko Sentral ng Pilipinas (BSP), Bureau of Internal Revenue (BIR), Securities and Exchange Commission (SEC) and National Privacy Commission (NPC), drawn from the Supreme Court E-Library and Lawphil.
How to connect RAB PH LAW to Claude and ChatGPT
RAB PH LAW uses the Model Context Protocol (MCP), a standard that allows AI applications to connect to external tools and information sources.
Atty. Medina provides an MCP endpoint for the service: https://rabelais-phlaw.ngrok.app/mcp
To use it, users need to add the endpoint as a custom MCP connection in an AI application that supports remote MCP servers.
For Claude (Free, Pro, Max, Team, Enterprise)
Step 1: Go to Customize → Connectors.
Step 2: Click + Add → Add custom connector.
Step 3: Name it RAB PH LAW and paste the server address.
Step 4: Under Authentication, select No sign in, then click Add.
Step 5: In a chat, click + → Connectors and enable RAB PH LAW.
For ChatGPT (where custom MCP connections are available)
Step 1: Open ChatGPT on the web and go to Plugins.
Step 2: Click + → Add custom MCP server.
Step 3: Name it RAB PH LAW and paste the server address.
Step 4: Under Authentication, select No authentication.
Step 5: Review the security warning, then click Create as a plugin.
Step 6: Complete setup and select RAB PH LAW in your chat.
For Grok
Step 1: Go to grok.com/connectors.
Step 2: Click New Connector → Custom.
Step 3: Name it RAB PH LAW.
Step 4: Paste the server address.
Step 5: Leave authentication empty (No authentication / No sign-in required).
Step 6: Click Add Connector.
The exact setup steps and availability may vary depending on the AI platform, subscription, and current MCP support.
“Once connected, you can start asking Philippine legal questions. You should be able to see ChatGPT or Claude using RAB PH LAW to search for relevant legal sources before generating its answer,” he explained.
Atty. Medina is clear about the tool’s limits. “This is a research aid, not legal advice. AI can still make mistakes. Always independently verify citations, quotations, and legal authorities,” he wrote.
From a law school capstone to a tool for Filipino lawyers
Atty. Medina developed RAB PH LAW as a capstone project in July 2026, after testing it with lawyers beginning in May 2026.
His background combines legal training and technical expertise. He holds a Juris Doctor degree from the University of the Philippines College of Law, a Bachelor of Science in Computer Science from UP Diliman, and a Master of Engineering in Artificial Intelligence, also from UP Diliman. He is also an Artificial Intelligence Governance Professional (AIGP).
He previously served as Head of Privacy and AI Technology Standards at Mynt, the company behind GCash. He has also taught at Manuel L. Quezon University School of Law and worked as an AI engineer and data scientist at the Anti-Money Laundering Council.
The project comes at a time when Philippine legal institutions are also considering how AI should be used in legal education.
The UP College of Law, for example, has introduced restrictions on AI tools and digital devices for first-year Juris Doctor students in onsite core subjects for Academic Year 2026–2027.
Users can send feedback, suggestions and bug reports to Atty. Medina at [email protected].
“Feel free to try it and share with fellow lawyers, law students, and legal researchers!” he said.