When people picture “AI for law,” they picture the language model — the part that writes the fluent answer. But the model is the easy, commodity piece; you can rent it from anyone. The accuracy of a legal search tool is decided long before the model ever speaks, in how the law is collected, classified, split, and ranked.
That's the part you can't buy off a shelf, because it has to encode things only the law itself dictates. A general search engine treats every document as interchangeable text. Philippine legal research can't — a repealed section and a current one are not interchangeable, and a circular does not carry the weight of an en banc ruling. So we built the system around the rules a careful researcher already follows. Below are the failure modes that matter most, and what each one cost us in engineering.
The problem
The repealed provision that still looks current
You search a topic, a clean-looking provision comes up, you cite it — and it was superseded by an amendment three years ago. Nothing on the page warned you.
What we built
Every document in the library carries an effectivity status. Superseded text stays searchable — you often need to see the old rule — but it is scored down and surfaced as superseded, not as the live law. The system is built to know the difference between “this exists” and “this still governs.”
The problem
The short statute that loses to the long case
The controlling rule is a two-line article of the Civil Code. But a verbose Supreme Court decision that merely mentions the topic is longer, denser, and keyword-richer — so a naive search buries the actual provision under the commentary.
What we built
A plain keyword search rewards length; the law does not. We weight results by the authority a document carries, not how many words it spends, so a short, on-point statutory provision can outrank a long decision that only touches the subject in passing.
The problem
The plain-language question that needs an exact citation
Sometimes you type “G.R. No. 214830.” Sometimes you type “getting scammed by a car dealer.” One needs an exact match; the other needs to understand what you mean. Most search boxes are good at one and bad at the other.
What we built
Two searches run at once — a meaning-based search and an exact-text search — then merge. The citation lands on the precise case; the description lands on the right provision. You don’t have to translate your question into keywords first.
The problem
The answer that quietly invents the part it doesn’t have
The most dangerous AI answer isn’t the one that says “I’m not sure.” It’s the confident paragraph with a citation that was never in any source — indistinguishable from a real one until a clerk checks it.
What we built
BatasDB reports what it retrieved and links every citation to a document you can open. When it adds context beyond the sources, it labels that plainly. And when the law simply isn’t in the library, it says so — a known gap is far safer than a confident fabrication.
The problem
The citation that points to half a provision
A result that cuts off mid-section, or stitches two unrelated paragraphs together, is worse than no result — you quote it, and it misstates the rule by omission.
What we built
The corpus is split along the law’s own structure — section, article, paragraph — instead of into arbitrary fixed-size slices. Every result is a real, citable unit you can quote whole, the way it appears in the source.
Three levers, not one
It helps to see why this is more than “better search.” Accuracy in legal research rests on three separate things, and a weakness in any one of them sinks the result:
Completeness decides the ceiling — you can't surface a case that was never collected. Classification decides whether what you have can be found — a provision filed under the wrong type is invisible no matter how good the search is. Ranking decides what actually rises to the top of the results you see. Most tools work on one and assume the rest. The unglamorous truth is that all three have to be built deliberately, and they're built differently for Philippine law than for anything else.
Where the model fits — and where it doesn't
We do use modern language and embedding models; there's no reason to reinvent the parts the industry has already solved well. But we draw a hard line around what they're allowed to do. The model helps understand your question and helps phrase what was found. It does not get to decide what the law is. The law comes from the retrieved documents, and the documents come from authoritative Philippine sources — over 200,000 of them, including every available Supreme Court decision since 1946, indexed directly rather than scraped from a paraphrase.
That boundary is the whole design. Keep the language model on the language, keep the law on the law, and never let the first quietly become the second.
How we keep ourselves honest
None of this is worth anything if it silently breaks. So the behaviour that matters — a repealed provision staying flagged, a short statute beating a long case, a citation landing on the right unit — is checked against a set of questions where we already know the correct answer. When someone improves one part of the system, those checks catch the day a fix in one place quietly breaks the law in another. It's the same discipline a good researcher uses on themselves: don't trust that it's right because it sounds right — verify it against the source.
The bottom line: the impressive part of legal AI isn't the part that talks. It's the part that knows a repealed rule from a living one — and that part has to be built by hand, for Philippine law specifically.
Want the deeper walkthrough? See how our search works and how we rank by authority.