Custos teaches the intake AI to stop naming your own firm as the counterparty

Two fixes to party extraction: the model now knows which side you're on, and it stops shouting client names in ALL CAPS.

intakecontract-review

When you feed a contract into automated intake, the AI has to figure out who the other party is. Custos found it would sometimes pick the wrong side and return the user's own organisation as the counterparty - because nothing in the setup told the model which firm to exclude. The fix passes your organisation name into the extraction step and adds a backstop that quietly drops any result matching your own name. The catch: it only works if you've filled in your org name in your profile.

A second fix cleans up how party names display. Contracts love writing names in block capitals in the preamble, and the model used to keep them that way - leaving you with "ADOBE INC." that won't group with "Adobe Inc." elsewhere. Now it tidies casing to Title Case while leaving genuine acronyms like IBM and AT&T alone.

So what Anyone relying on automated contract intake should care - these are the small accuracy and tidiness bugs that erode trust in an extraction tool.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

2 commits from Custos/legalos, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
a9426b0c Intake/counterparty: pass user organisation to LLM + self-reference guard Custos 2026-05-04 ↗ GitHub
commit body
The intake and counterparty extraction prompts didn't tell the model
which side of the agreement was "us", so the LLM sometimes returned the
user's own org as the counterparty (Kodex, Inc. on Adobe contracts -
biased by Kodex appearing in the filename).

- userSettings now reads + returns user_profiles.organisation.
- buildSystemPrompt() in intakeAnalysis + counterpartyExtraction injects
  "the user's own organization is X - never return X as the counterparty"
  into the system prompt.
- isSelfReference() guard normalises company suffixes (Inc, LLC, ...) and
  nulls counterparty/parent if the model returns a self-match anyway.
- Orchestrators thread organisation through the analysis call.

Set your org in /account/profile (organisation field) for this to work.
282e57c1 Normalise entity casing on extraction (Adobe Inc., not ADOBE INC.) Custos 2026-05-04 ↗ GitHub

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-43.md from inside the repo you want the changes in.

⬇ Download capture-thread-43.md