Python · Claude API · ML

Python · Claude API · ML

Legal help is one of the most expensive kinds of expertise there is, and most people who have a legal question and can’t afford a lawyer just drop it. Advocate is my attempt at closing some of that gap without pretending to be something it isn’t. You describe your situation in plain language, and you get structured analysis back: the issues involved, the principles that apply, and a reasoned read on where you stand. Not a generic chatbot answer.

Under the hood it pairs the Claude API, for the legal reasoning and the conversation, with neural network components. Prompt engineering turned out to be real engineering here. Legal analysis needs structure, careful citation, and honest uncertainty, and getting a model to say “this is ambiguous, and here’s why” instead of guessing confidently took many rounds of prompt architecture and output validation.

The benchmark is the part I’m proudest of. I ran the system against real Supreme Court cases, feeding it the facts and comparing its reasoning and predicted outcome against what the court actually decided. That gave me a number to chase instead of a feeling, and it surfaced some uncomfortable results. It handles settled doctrine far better than novel questions, and its confidence barely tracks its accuracy unless you engineer calibration in on purpose.

The harder problems were ethical, so I treated them as design requirements: heavy disclaimers, output framed as analysis rather than advice, and no dressing it up to sound more certain than it is. Advocate taught me that in a high-stakes domain the hard part isn’t capability. It’s being honest about capability.