One Hindsight Setting Decided Whether My Agent Could Learn Judges
Litigators know things that no case file records. Judge Murthy lets the other side have one adjournment. The second time, he says “last opportunity.” The third time, he closes the evidence and puts costs on them. Nobody writes that rule down. It lives in a lawyer’s head, spread across a dozen hearings in three unrelated cases, and it’s the kind of thing a junior learns only after getting burned.…
Litigators possess knowledge that goes beyond what is recorded in case files. Judge Murthy allows the opposing side one adjournment, then issues "last opportunity" on the second, and imposes costs on the third. This rule is not documented anywhere; it is learned through experience after repeated hearings in multiple cases. The author wanted her agent to learn this rule in the same way through notes, without manually inputting it.
The key to this learning lies in a specific field called "Tareekh," which refers to the next hearing date, stored as a memory for the lawyer's practice. When the lawyer uploads documents like photos, order sheets, deeds, or notes, the Hindsight system reads them, splits each into a separate entry per hearing, and files it under the respective case.
The architecture consists of a FastAPI backend, Next.js frontend, Gemini for OCR and reasoning, and Hindsight running locally in Docker. Each lawyer has their own Hindsight bank, and every case resides within it. The ingestion pipeline involves OCR, segmentation, repair, and review of the uploaded documents, with each hearing forming a unique memory entry.
The author aimed to have her agent identify a specific pattern: when a judge allows one adjournment and then imposes costs on a repeated request. She set up observations to capture this pattern, but Hindsight was grouping observations by the full tag set of each item, leading to observations per case rather than across cases. By modifying the memory function, she ensured observations were consolidated under multiple scopes (judge, counsel, and case), allowing the system to identify the pattern across cases and judge behavior.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.