The Chain Reaction
How LegalChain steps through a strictly defined sequence of cognitive operations, from retrieval to synthesis.
Most legal AI benchmarks are "single-shot": you feed a question and get an answer. LegalChain is "chained." The runner executes a sequence of 10 distinct steps (S1-S10), where the output of each step becomes the context for the next. This mimics the actual cognitive workflow of a human lawyer.
The 10-Skill Pipeline
Chain Context
The "ChainContext" object is the spine of the execution. It accumulates state. S6 (Synthesis) cannot "see" the future, but it can see everything S1-S5 produced.
Error Propagation
In a chain, failure compounds. If S2 (Rule Extraction) fails to find any rules, what happens to S6 (Synthesis)?
LegalChain uses Degraded Execution. If a step fails, the runner passes an empty or default value to the next step rather than crashing. This forces the model to attempt recovery—mimicking a lawyer who can't find a perfect case but must still advise the client.
However, Integrity Failures (S8) result in a zero integrity score and are flagged in scoring details. The run continues to completion to capture full diagnostic data.