Engineering Trustworthy Legal AI: Notes from İçtiHub
A few of the engineering ideas I've found most interesting since joining İçtiHub as an AI Engineer — where the whole job is making AI fast and helpful for lawyers while keeping it grounded in real law.
Legal AI carries one unforgiving constraint that most consumer AI doesn't: a fabricated citation isn't a quirky bug — it's a professional liability for the lawyer who relied on it. That single fact reframes the entire engineering problem. The interesting question stops being "can the model write something plausible?" and becomes "can we prove every claim traces back to a real decision or statute?"
Below are a few of the patterns I've enjoyed working on. I'll keep it at the architecture level — the ideas matter more than any one line of code.
1. Plan before you answer
The naive approach is to hand the user's question straight to one large model and hope. We do something more deliberate: the first step is handled by a small set of specialized planning agents that run in parallel — one infers intent, one evaluates the conversation context, one designs the actual search strategy. Splitting the decision keeps each agent narrow and fast, and the parallel layout has a nice property: if one planner has a bad moment, the system degrades gracefully and merges what it has rather than failing the whole request. This kind of small-agent orchestration turned out to be far more reliable — and easier to reason about — than a single monolithic prompt.
2. Grounding, not guessing
This is the part I'm proudest of, and it's the core of why İçtiHub delivers high-accuracy, well-sourced answers. Search returns candidate decisions, but instead of letting the model paraphrase from memory, a second focused pass extracts verbatim passages from the actual decision text. Then, after a response is drafted, every citation is verified back against the source material — case numbers and statute references have to genuinely exist in what was retrieved, and quoted passages have to actually appear in the source. The effect is that a lawyer can confirm an answer in seconds rather than re-checking it from scratch, which is exactly the kind of trust the profession demands.
3. Writing documents with an orchestrator and sub-agents
Drafting a full petition or contract is too large a task for one prompt to do well. So we use an orchestrator agent that builds a global plan — which sections to write, the tone, how much legal reasoning each part needs — and then lightweight section sub-agents that each draft their part, sharing context so the document stays coherent end to end. Facts like parties, amounts, and dates are extracted up front; consistency and citations are validated at the end. In practice this turns what used to be hours of drafting into a time-saving few minutes, while keeping the lawyer firmly in control of the final text.
4. Reading a document from four sides
For risk analysis we examine the same document through several lenses — client, opposing party, judge, and a neutral view — because a risk that's invisible from one seat is obvious from another. Each finding carries a structured risk signal, and a deterministic scoring step turns those signals into a single, explainable picture. It's a small idea that makes the analysis feel much closer to how an experienced lawyer actually reads a file.
5. The unglamorous parts that make it work
None of the above survives contact with production without the boring fundamentals: clean architecture with clear interfaces, so an AI component can be swapped for a deterministic fallback when confidence is low; routing heavy reasoning to a stronger model while high-volume steps go to a faster, cheaper one; and budgeting how much context each retrieved source earns based on its relevance. These quiet decisions are what let the system stay fast and accurate at the same time, instead of trading one for the other.
Curious how these ideas come together into a product lawyers actually use every day?
Explore İçtiHub →Working on this has been the most engaging problem set I've had — real constraints, real users, and a domain where getting it right genuinely matters. If you'd like to see what these ideas add up to, take a look at ictihub.com — a time-saving, high-accuracy legal assistant built for lawyers in Turkey, with a free first week and no credit card required.