Graph RAG and Multi-Agent Systems for Legal Case Discovery and Document Analysis

whyhow · Legal · year n/a · source Agentic: yes · promotional bias: low · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: legal case discovery and mass-tort research

WhyHow needed to find potential class-action and mass-tort cases earlier than lawyers could manually, while transforming web complaints and discovery documents into accurate, lawyer-specific, legally usable reports and queryable evidence graphs.

Constraints:

Architecture

WhyHow combines web scraping, ML filtering, LLM-enabled multi-agent workflows, lawyer-specific schemas, and graph-backed state. The system scrapes broad web sources, filters and qualifies signals against each lawyer's schema, builds and updates graph structures for products, harms, ingredients, concentrations, people, complaints, and lawsuits, then uses graph RAG and report-generation agents to produce lawyer-specific actionable reports. Discovery workflows similarly extract and structure information from large document sets so experts can query, visualize, and decide from relevant subgraphs.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  web_and_discovery_sources["Web and discovery sources"] --> scraping_and_ingestion_layer["Scraping and ingestion layer"]
  scraping_and_ingestion_layer --> ml_filtering_layer["ML filtering layer"]
  scraping_and_ingestion_layer --> graph_construction_pipeline["Graph construction pipeline"]
  ml_filtering_layer --> multi_agent_workflow["Multi-agent workflow"]
  graph_construction_pipeline --> lawyer_specific_graph_state["Lawyer-specific graph state"]
  lawyer_specific_graph_state --> multi_agent_workflow
  lawyer_specific_graph_state --> graph_rag_query_layer["Graph RAG query layer"]
  multi_agent_workflow --> report_generator["Report generator"]
  graph_rag_query_layer --> report_generator
  multi_agent_workflow --> guardrails_and_human_review["Guardrails and human review"]
  guardrails_and_human_review --> lawyer_or_domain_expert["Lawyer or domain expert"]
  graph_rag_query_layer --> lawyer_or_domain_expert
  report_generator --> lawyer_or_domain_expert
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Web and discovery sources External complaints, forums, government sites, social media, newsletters, and discovery documents. Scraping and ingestion layer
Scraping and ingestion layer Collects web-scale signals and document corpora at relevant frequencies. ML filtering layer, Graph construction pipeline
ML filtering layer Filters scraped data before LLM/agent stages, narrowing broad web data into candidate legal signals. Multi-agent workflow
Multi-agent workflow Breaks legal workflows into testable steps with different state, frequency, and requirements. Lawyer-specific graph state, Report generator, Guardrails and human review
Lawyer-specific graph state Extensible schema and episodic memory for each lawyer's preferred entities, filters, reports, and process. Graph construction pipeline, Graph RAG query layer, Multi-agent workflow
Graph construction pipeline Extracts, structures, updates, prunes, and stores entities and relationships from documents and web signals. Lawyer-specific graph state
Graph RAG query layer Retrieves subgraphs and lets lawyers query lawsuit information in natural language. Report generator, Lawyer or domain expert
Report generator Composes lawyer-specific reports from qualified graph signals and retrieved subgraphs. Lawyer or domain expert
Guardrails and human review Controls agent outputs and adds human checks where legal accuracy risk is high. Multi-agent workflow, Lawyer or domain expert
Lawyer or domain expert Human recipient and reviewer who evaluates reports, graph views, and natural-language evidence. Graph RAG query layer, Report generator, Guardrails and human review

Data flow

The system scrapes the web or ingests discovery documents, extracts and structures information into graphs, filters signals through lawyer-specific schemas, and manages state by expanding, pruning, and querying graph structures. Multi-agent workflows perform stepwise qualification and report generation, with guardrails and human-in-the-loop review where legal accuracy matters. Lawyers receive personalized reports or natural-language graph queries that expose only the signals and subgraphs they care about.

3 supporting quotes
“we have agents, uh, we have graphs. We store that information. We scrape the web. We qualify that with a proprietary process.”transcript, stated
“we start and scrape the entire web. Now, anyone can scrape the entire web. It's doable.”transcript, stated
“from there once we've honed down just to the signals that they care about the qualified signals that are specific to them that signal can then further generate a report”transcript, stated

Why this architecture

Legal case discovery needs both precise structure and expert-specific flexibility. Graphs provide explicit relationships, multihop analytics, visual inspection, and extensible schemas; ML filters reduce noisy web scale; LLMs let formerly incompatible workflow steps pipe together; and multi-agent decomposition makes each step testable while guardrails and humans compensate for compounded agent uncertainty.

3 supporting quotes
“break down a complicated white collar workflow down into a specific set of steps that I can IO test”transcript, stated
“I need to have a very specific control and structure and schema for the way that we build these systems.”transcript, stated
“it's very much for us not an LLM filtered system. It's an ML filtered system that LLMs have allowed us to pipe together”transcript, stated

Models used: LLMs · traditional ML systems · multi-agent systems

Scale

Alternatives considered (roads not taken)

Use probabilistic LLM agents in isolation

Rejected because: Legal workflows require exact language and correctness, and isolated probabilistic agents are not trustworthy enough for that standard.

“probabilistic large language models don't necessarily work for that just in isolation.”transcript, stated
“I need to have a very specific control and structure and schema for the way that we build these systems.”transcript, stated

Rely on a chat RAG interface as the primary legal product

Rejected because: Lawyers appreciate answers, but they also need familiar report formats generated from retrieved subgraphs.

“we have less of a chat rag interface. While the lawyers definitely do appreciate that”transcript, stated
“what they also want is the form factor that they're used to.”transcript, stated

Search web complaints with generic best-case ranking

Rejected because: There is no universal perfect lawsuit; each lawyer or firm needs personalized schemas and filters.

“there's no such thing as a perfect case. There's no such thing as a perfect lawsuit.”transcript, stated
“it is not a problem of best. It's a problem of specific and personalized.”transcript, stated

Manually review discovery documents end to end

Rejected because: Discovery corpora can be physically impossible to read within lawsuit timelines.

“A lot of the time it's manually reviewed.”transcript, stated
“It is physically impossible to read all of the information that is given in the discovery of the processing of a lawsuit.”transcript, stated

Patterns

rag-retrieval (graph-backed legal retrieval)

WhyHow retrieves lawyer-specific subgraphs from structured legal data and uses those subgraphs to answer questions and generate actionable reports.

“some subgraph from that broader monolithic structure is then brought in and composed into a report that a lawyer can action.”transcript, stated
“we have agents in production right now that lawyers can in natural language query and further understand the lawsuit”transcript, stated

multi-agent-orchestration (legal workflow decomposition)

The system decomposes legal work into multiple agent steps with different state, frequency, and requirements rather than using one large prompt.

“break down a complicated white collar workflow down into a specific set of steps that I can IO test”transcript, stated
“each of those steps have different requirements different frequencies different state and that state can be controlled often in our case by a graph”transcript, stated

agent-memory (graph state management)

WhyHow stores episodic and workflow state in graphs, then captures, expands, prunes, structures, and queries that state over time.

“We spend time making sure that the memor is not just immediate but it's episodic.”transcript, stated
“capturing, expanding, pruning, structuring and then querying state for us happens in a graphical format”transcript, stated

human-in-the-loop-gate (legal expert decision)

The system presents graph-derived evidence and reports to lawyers or domain experts so humans make legal decisions from structured signals.

“I can give that visual to the expert who can make an immediate decision.”transcript, stated
“humans in the loop that can bring these agents to a point that it is accurate enough that people are willing to use them.”transcript, stated

eval-driven-development (stepwise agent quality)

WhyHow designs multi-agent steps so they can be input/output tested and so failures can be pinpointed instead of hidden inside an end-to-end chain.

“break down a complicated white collar workflow down into a specific set of steps that I can IO test”transcript, stated
“I need to be able to test and be able to pinpoint exactly what is going right and wrong at any point in time.”transcript, stated

structured-output-contract (lawyer-specific reports)

Reports are generated from consistent schemas and personalized graph state, preserving a stable structure for each lawyer while adapting content to their case preferences.

“that report can be entirely specific to the lawyer as well.”transcript, stated
“every report is going to be different but the structure is going to be the same for each lawyer”transcript, stated

guardrails-io-filtering (agent reliability)

The team spends significant effort guardrailing agents because a badly prompted agent or chained agent workflow can be wrong in legally unacceptable ways.

“I can write a bad prompt very easily and all of a sudden I have a bad agent.”transcript, stated
“We spend a lot of time guardrailing as much as we possibly can.”transcript, stated

Tradeoffs

Use graphs as controlled state.

Chose Graph-backed episodic and workflow state over Immediate prompt context or unstructured memory alone.

Rationale: Graphs make state extensible, prunable, structured, queryable, and visually inspectable for high-stakes legal workflows.

“We spend time making sure that the memor is not just immediate but it's episodic.”transcript, stated
“having the structure, having the extendability and then having the ability to remove that extension is really important for us.”transcript, stated

Combine ML filters with LLM pipe-fitting.

Chose ML-filtered system where LLMs connect probabilistic workflow steps over An LLM-filtered system alone.

Rationale: Traditional ML handles filtering where it is strong, while LLMs make previously incompatible workflow steps composable end to end.

“it's very much for us not an LLM filtered system. It's an ML filtered system that LLMs have allowed us to pipe together”transcript, stated
“It's an ML filtered system that LLMs have allowed us to pipe together”transcript, stated

Generate reports rather than only chat answers.

Chose Graph-RAG report generation in lawyer-specific formats over Chat RAG as the main interface.

Rationale: Lawyers need familiar actionable form factors, not just conversational answers.

“what they also want is the form factor that they're used to.”transcript, stated
“some subgraph from that broader monolithic structure is then brought in and composed into a report”transcript, stated

Personalize schemas per lawyer.

Chose Different multi-agent system and graph backing each lawyer's workflow over A single shared legal-discovery schema for everyone.

Rationale: Each lawyer cares about different filters, report forms, and case criteria, so personalization is core to usefulness.

“a different lawyer can have a different multi- aent system and a different graph that backs up their specific way that they like to work”transcript, stated
“the structure is going to be the same for each lawyer and each lawyer has a different process.”transcript, stated

Use humans and guardrails to raise usable accuracy.

Chose Guardrails plus humans in the loop over Relying on agent accuracy alone.

Rationale: The speaker does not trust individual agents enough for legal work, and sequential chains compound error risk.

“So when it comes to what is the agent that I trust, very few. We spend a lot of time guardrailing as much as we possibly can.”transcript, stated
“systems that I can put in place like guardrails and humans in the loop that can bring these agents to a point”transcript, stated

Gotchas (what bit them)

Chaining good-but-imperfect agents quickly degrades end-to-end reliability.

Root cause: A five-step workflow with individually 95% accurate agents has only about 77% expected end-to-end accuracy.

Resolution: Break workflows into testable steps, add guardrails, graph state, and human checks rather than trusting a long opaque chain.

“five 95% accurate agents chained together sequentially. That's 77% expected accuracy.”transcript, stated
“That is part of probably if I was to summarize my main problem would be that it' be decision-m under uncertainty”transcript, stated

Legal users do not tolerate casual probabilistic errors.

Root cause: Lawyers require correctness, proper language, and traceable detail before creative argumentation can be useful.

Resolution: Use explicit schemas, graph structure, tests, guardrails, and expert review around LLM/agent output.

“lawyers don't really like when things are incorrect”transcript, stated
“make this very specifically correct and proper and definitely in the right language.”transcript, stated

Generic graph visuals can create false shared understanding.

Root cause: Different people can look at the same graph and think they understand it while interpreting it differently.

Resolution: Define the graph schema explicitly and keep lawyer-specific structure consistent.

“People look at them and go well that's fantastic. I have a great understanding of what this is. And someone else says me too.”transcript, stated
“there isn't necessarily a consistency in what those two people just said.”transcript, stated

Discovery corpora contain far more irrelevant material than useful evidence.

Root cause: Opposing parties may provide huge volumes of documents, and lawsuit timelines make manual full review impossible.

Resolution: Extract and structure the corpus into graphs so irrelevant information can be dismissed and useful subgraphs surfaced visually and through language.

“Here is 500 GB of emails that don't matter. Go nuts, right?”transcript, stated
“that mountain of emails becomes a lot of information I can immediately dismiss and a bunch of generally, you know, genuinely useful information”transcript, stated

A universal ranking of case leads does not fit legal practice.

Root cause: Whether a case is valuable depends on the lawyer, partner, firm, jurisdiction, money amount, and preferred theory.

Resolution: Maintain lawyer-specific schemas and personalized report generation.

“it is not a problem of best. It's a problem of specific and personalized.”transcript, stated
“Those specific filters that schema can be applied throughout the entire process.”transcript, stated

Evaluation

WhyHow evaluates through stepwise input/output testing of multi-agent workflows, explicit tracking of where a workflow goes right or wrong, agent-chain accuracy reasoning, signal velocity/density over time, lawyer-specific feedback, and confidence growth after initial lead detection.

Metrics: single-agent accuracy example: 95% · five chained 95% agents produce 77% expected accuracy · discovery example: 500 GB of emails · case signal can be found within about 15 minutes · confidence in a lead can take about a month · large law firm timing can be eight or nine months after complaints start · complaint density uses count multiplied by complaint velocity over months

3 supporting quotes
“break down a complicated white collar workflow down into a specific set of steps that I can IO test”transcript, stated
“that density is a combination of how many complaints multiplied by the velocity of complaints.”transcript, stated
“for us, we can find it uh within about 15 minutes and then generally it takes probably a month”transcript, stated

Outcomes

The source describes web-scale scraping, discovery corpora such as 500 GB of emails, potentially millions of graph nodes, and early lead identification measured in minutes to months rather than law-firm timelines of eight or nine months after complaints begin.

3 supporting quotes
“lawyers can in natural language query and further understand the lawsuit and the individuals that they're representing.”transcript, stated
“mass scraping the web down to a specific signal generated just for the lawyer.”transcript, stated
“every single report gets better because we're able to manage the state”transcript, stated