TLDRCommunity

Margot: an AI intake assistant for a law and tax firm, in English and Spanish

What it is Margot is the intake assistant I built for Fusion Legal & Tax, where I am the Director of Operations. We are a Denver-based firm with attorneys, CPAs, and bookkeepers under one roof. She replaces the contact form. A prospective client tells her what is going on in their own words ("I got a letter from the IRS," "We're starting a business," "I keep putting off my will"), she gathers the details, and the firm follows up within one business day.

She also does intake in Spanish, where she goes by "Margarita," so Spanish-speaking clients get the same experience without a translator or a second form.

Who is it for? People with a legal or tax problem who don't know where to go or what to do. And as a small firm, we don't want to lose a lead searching for answers at 11:30 PM.

What Margot is not: a lawyer. She is automated and can be wrong, she doesn't give legal advice, talking to her doesn't create an attorney-client relationship, and a licensed attorney reviews every matter the firm accepts. Test her out. The harness should prevent unauthorized practice of law.

Image 1 in a post by @roy_mcfarlandImage 2 in a post by @roy_mcfarland

How I built it Stack: Next.js 16 (App Router), React 19, TypeScript, Tailwind 4, Postgres on Neon, deployed on Vercel. Clerk for invitation-only firm accounts, Resend for mail in and out.

Models: visitor replies run on Kimi K3.1 through OpenRouter and intake summaries on DeepSeek V4.1 Flash, with every request pinned to zero-data-retention providers. Claude Sonnet 5 is used only as the judge in the eval, deliberately a different model from the one under test.

I built it almost entirely with coding agents, split into a Builder and a Verifier that both answer to one PROJECT.md. Every decision gets a numbered entry (240-plus so far), every PR adds a changelog row, and CI fails if it doesn't.

The decisions that mattered:

  • Compliance first. I'm a Colorado attorney, so the design starts from the ethics rules. Nothing can be typed until the visitor acknowledges a notice (Colorado Rule 1.18) that the chat isn't confidential and isn't legal advice, and the server checks that record on every request.

  • No transcripts. The conversation lives in the browser. The server redacts sensitive identifiers, calls the model, and stores only a rolling structured summary for the firm's follow-up.

  • Signed replies. Because the browser holds the history, a visitor could forge something Margot "said." Every reply is signed over the whole conversation so far, and forged history is rejected before the model sees it.

  • An adversarial eval as a merge gate. 100 cases, three runs each, any failed run fails the case: legal advice, outcome predictions, forged history, safety disclosures, off-topic requests. Prompt, model, and routing changes don't merge without it, and every run is logged, including the failed ones.

  • Spanish as its own path. Margarita has her own name, banner, emails, and eval cases, and the firm gets her summary in English above the Spanish. Small touch: the sparkles around her turn into daisies in Spanish, since a margarita is a daisy.

What surprised me or went wrong The model was rarely the problem. The provider was. One eval run went sideways because throughput routing had quietly shifted almost all traffic to a single provider. Every failure in that run came from it, and one reply leaked the model's reasoning into the visible message even though reasoning was excluded. I now pin an ignore list and log the serving provider on every reply.

Upgrading the model made things worse before they got better. Moving replies from Kimi K2.6 to K3.1 dropped the eval from 88 of the 91 cases it had at the time to 84 of 91. The newer model was more helpful and more talkative, which at a law firm means volunteering things it shouldn't. It took six counsel-approved sentences in the prompt to get back to a clean run.

Contact capture broke silently. One day I found that no chat lead had a name, email, or phone. On synthetic conversations the old summary prompt missed 25 emails, 50 names, and 17 phones, and recorded details it shouldn't have 14 times, including another person's address. The fix was to keep only contact details the visitor actually typed, which got to 439 of 440 runs.

Evals are noisy, and I got my own bookkeeping wrong. A 100-case, three-run pass fails a case at random often enough that you need six-run reruns to tell intermittent from real. One logged result didn't add up against its own description because it had been read through a truncated view. The log now carries a correction entry, since past entries are never edited.

What I'd do differently: sign replies from day one. I first accepted the forged-history risk and leaned on the prompt, and the reasoning leaks showed up in exactly those cases.

Also, I ran the OpenRouter balance below zero in the middle of a full evaluation. Set a credit alert.

Try it: https://www.margot.tax

1 of 2 · Press Esc or click outside to closeTap outside to close

roy_mcfarlandOps (Biz + Legal) & Applied AI1h

0 comments

No comments yet.