<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Lucas Fourest on Medium]]></title>
        <description><![CDATA[Stories by Lucas Fourest on Medium]]></description>
        <link>https://medium.com/@lucas.fourest?source=rss-d0265652c747------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*EONrCSFsHISVDkuE</url>
            <title>Stories by Lucas Fourest on Medium</title>
            <link>https://medium.com/@lucas.fourest?source=rss-d0265652c747------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 18:44:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@lucas.fourest/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[From Adverse Pleadings Analysis to Counter-Arguments: How We Introduced Legal Intelligence to the…]]></title>
            <link>https://medium.com/doctrine/from-adverse-pleadings-analysis-to-counter-arguments-how-we-introduced-legal-intelligence-to-the-dffa149c28b4?source=rss-d0265652c747------2</link>
            <guid isPermaLink="false">https://medium.com/p/dffa149c28b4</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[legaltech]]></category>
            <dc:creator><![CDATA[Lucas Fourest]]></dc:creator>
            <pubDate>Fri, 20 Mar 2026 14:51:36 GMT</pubDate>
            <atom:updated>2026-03-20T14:51:36.360Z</atom:updated>
            <content:encoded><![CDATA[<h3>From Adverse Pleadings Analysis to Counter-Arguments: How We Introduced Legal Intelligence to the Litigation Flow</h3><p>In French civil litigation, a case typically unfolds through a structured sequence of procedural exchanges: it begins with a <em>writ of summons</em> (<em>assignation</em>), followed by successive rounds of written submissions (<em>conclusions</em>) in which each party replies to the other’s arguments, until the judge closes the debate (<em>clôture</em>). These written submissions, known as procedural acts, are the backbone of any litigation strategy.</p><p>Each act follows a conventional structure, organized around a few well-known legal sections: the <em>statement of facts</em> (<em>rappel des faits</em>), which sets the factual background; the <em>discussion</em>, which is the heart of the legal argumentation itself; and the <em>dispositif</em>, which lists the formal claims the party is putting before the judge. The discussion and the dispositif are, by far, the most information-dense parts of any act: they expose the grounds (<em>moyens</em>) on which each party relies, i.e. the legal reasoning, anchored in statutory provisions or case law, that justifies each claim.</p><p>At Doctrine, our platform allows lawyers to upload private documents related to their ongoing cases, including the adverse acts they receive during the pre-trial exchange phase. Understanding and exploiting the content of these documents is the core value proposition of what we built.</p><h3>Why parsing legal arguments is genuinely hard</h3><p>Identifying standard sections within a procedural act is relatively straightforward: headers like &quot;RAPPEL DES FAITS&quot; , &quot;DISCUSSION&quot; , &quot;PAR CES MOTIFS&quot; etc. follow predictable conventions (that are actually defined by <em>la cour de cassation</em>) and can be reliably detected using simple keyword-matching rules.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qDhcH4NDA6bg0O7agfMagg.png" /><figcaption><em>Extract of the Cour de Cassation Deontology Defining Conclusions Redaction Norms</em> <a href="https://www.courdecassation.fr/files/files/D%C3%A9ontologie/CCC/Charte%20des%20%C3%A9critures/Mod%C3%A8le_Trame_Appel.pdf">[1]</a></figcaption></figure><p>Going deeper into the actual substance of the argumentation is a different challenge entirely. The internal structure of a discussion section varies enormously from one act to another, shaped by the redactional choices, style, and strategy of each individual lawyer. There is no template, no shared format, and no reliable syntactic signal to lean on.</p><p>More fundamentally, legal grounds are semantically dense objects: they rely on specialized vocabulary and syntax, reference specific articles of law or jurisprudential decisions, and can only be properly understood within the broader context of the case. Identifying, isolating, and interpreting them requires both high-level semantic understanding and deep domain knowledge. This is precisely where recent advances in large language models and their enhanced reasoning capabilities have proven valuable.</p><h3>Structuring the argumentation: our insights model</h3><p>To extract meaningful and actionable information from procedural acts, we conducted an in-depth preliminary study with our in-house legal experts. The goal was to define exactly what we wanted to extract from each document, and under what structure. We call these structured outputs <em>insights</em>. The insights parsing captures the following information:</p><ul><li><strong>Parties</strong>: each party&#39;s name, their qualification (plaintiff or defendant), and their status in the case (landlord/tenant, employer/employee, creditor/debtor, etc.)</li><li><strong>Statement of facts</strong>: a concise narrative of the events that led to the dispute</li><li><strong>Claims</strong>: what each party is asking the court for. Each claim is described by a title, the party making it, and (when available, e.g. in court decisions) the court&#39;s ruling on it</li><li><strong>Grounds</strong>: the legal reasoning used to support or refute each claim, which may include a <strong>legal basis</strong> (a statutory article, a case law reference, a contractual clause, or a recognized legal principle)</li></ul><p>Here is a simple example of what these insights could look like in practice on a court decision:</p><pre>{<br>  &quot;parties&quot;: [<br>    {<br>      &quot;nom&quot;: &quot;SOCIETE COGELEC&quot;,<br>      &quot;qualification&quot;: &quot;demandeur&quot;,<br>      &quot;statut&quot;: &quot;entreprise&quot;<br>    }<br>  ],<br>  &quot;rappel_des_faits&quot;: &quot;La SOCIETE COGELEC a présenté une requête au Conseil d&#39;Etat...&quot;,<br>  &quot;demandes&quot;: [<br>    {<br>      &quot;demande&quot;: &quot;Demande d&#39;annulation des arrêtés interministériels et de la circulaire&quot;,<br>      &quot;nom_partie&quot;: &quot;SOCIETE COGELEC&quot;,<br>      &quot;decision_cour_demande&quot;: &quot;Rejeté&quot;,<br>      &quot;moyens&quot;: [<br>        {<br>          &quot;titre_moyen&quot;: &quot;Incompétence du signataire des arrêtés&quot;,<br>          &quot;base_legale&quot;: &quot;Décret du 27 juillet 2005&quot;,<br>          &quot;resume_moyen&quot;: &quot;La société soutient que le signataire des arrêtés contestés n&#39;avait pas compétence pour les signer...&quot;,<br>          &quot;decision_cour_moyen&quot;: &quot;Rejeté&quot;,<br>          &quot;motif&quot;: &quot;La cour a estimé que le signataire avait bien compétence...&quot;<br>        }<br>      ]<br>    }<br>  ]<br>}</pre><p>This rich, structured representation goes far beyond raw text extraction: it situates each ground within its broader legal and factual context, which party raised it, in response to which claim, against which opponent etc. This contextual wrapping is what makes the insights genuinely exploitable for downstream features.</p><h3>Leveraging our stock resources to suggest counter-arguments</h3><p>One of the core features we built on top of these insights is a <strong>counter-argument suggestion</strong> workflow. Given an adverse procedural act uploaded by one of our lawyer customers, we aim to identify each ground raised by the opposing party and to automatically forward relevant counter-argument suggestions, each grounded in actual court decisions sourced from our database. The workflow proceeds as follows:</p><ul><li>The uploaded act is parsed into insights, isolating each adverse ground along with its contextual information (supported claim, legal basis, etc.)</li><li>For each extracted adverse ground, a <strong>multi-stage retrieval pipeline</strong> queries our decision stock to find the most relevant grounds from court rulings on closely related themes</li><li>These retrieved decision grounds are then used to generate an explicit counter-argument supported by official sources, that the lawyer can use in their next submission</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K2Eic60SPDgRmibyuoNiDA.png" /></figure><p>Private procedural acts are parsed into insights once uploaded on our platform, while this is done in an offline manner for the decisions counterpart. The <strong>exhaustivity</strong> of our stock is what makes the retrieval meaningful: we trust that our corpus of millions of court decisions contains grounds that, in related factual and legal contexts, directly contradict or undermine the adverse arguments we are facing. The multi-stage retrieval is designed to surface exactly those decisions that open a breach in the opposing party’s reasoning, and the generated counter-argument makes that breach explicit and actionable for the lawyer.</p><h3>An autonomous evaluation framework to monitor the feature and guide evolutions</h3><p>While building the feature is only the first step, measuring its quality and tracking how it evolves over time is equally critical, and arguably more challenging to do rigorously at scale. Manual evaluation by legal experts is thorough, but time-consuming and fundamentally unscalable. We therefore designed an <strong>automated evaluation framework</strong> to continuously assess the ability of our pipeline to produce relevant suggestions in due time.</p><h4><strong>Which data and which metrics ?</strong></h4><p>We assembled a reference dataset of a dozen public procedural acts, each containing a well-developed discussion section with multiple identifiable grounds. Each act is parsed into insights, and the resulting ground collection is stored in a central table that serves as the fixed checkpoint for periodic evaluation runs. For each ground in the dataset, the feature produces its top-5 suggestions (decision grounds). Each (act ground, decision ground) pair is then graded with <strong>LLM-as-a-judge</strong> approach along two dimensions, scored from 1 to 5:</p><ul><li><strong>Core ground theme similarity</strong>: how closely related are the two grounds in terms of legal substance and reasoning?</li><li><strong>Case factual context similarity</strong>: how comparable are the underlying factual contexts of the two cases?</li></ul><p>Let <em>D</em> be the set of all act documents in the dataset, <em>Gd</em> the set of grounds in a document <em>d</em>, Sg the top-<em>k</em> suggestions (<em>k=5</em>) for a given ground <em>g</em>, and <em>P =</em> {(<em>g, s</em>)<em> | d ∈ D, g ∈ Gd, s ∈ Sg </em>} the full set of ground, suggestion pairs across the dataset. To assess a run in its entirety, we compute two aggregate metrics</p><ul><li><strong>Macro average</strong> — a flat average across all pairs, regardless of the origin document:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*lgCE1MXClx1tRK_5yogTjw.png" /></figure><ul><li><strong>Micro average</strong> — normalizes by document first, giving equal weight to each document independently of how many grounds it contains:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jWuyk1yKYHYqU5q6LvBzow.png" /></figure><p>This last metric is intended to smooth out the influence of massive-length acts on the global scores.</p><p>Although the annotation is LLM-based, the associated prompts were crafted meticulously in collaboration with Doctrine’s internal legal experts. The goal was to provide the LLM judge with rigorous, domain-specific guidelines, supplemented with carefully chosen few-shot examples illustrating expected behavior across a range of typical input pairs. This is what makes the automated grades trustworthy enough to drive real decisions, even though it doesn’t replace human awareness and intuitions, that we still value over the rest.</p><h4>Monitoring and drift detection</h4><p>In addition to production metrics and live events, which we keep track of with tools such as <em>Snowflake</em>, all the benchmark-related data and various run results are fed into a dedicated <strong>evaluations overview dashboard</strong>, which highlights trends across successive pipeline versions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QzFWLMWQBB3h1ZTJSw-GpA.png" /></figure><p>This dashboard serves two purposes. First, it gives us a clear, quantitative signal of the impact of any change we introduce in the retrieval pipeline, whether it’s a new retrieval stage, a prompt update, a model upgrade etc. Second, and perhaps more importantly, it acts as an early-warning system: unexpected metric drifts often indicate a breaking change or an underlying issue in the pipeline that would otherwise go unnoticed, especially as the workflow grows in complexity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*JIyS_2BQe7W8Ioo_liVD1w.png" /><figcaption><em>Example of a metric drift detected in early February</em></figcaption></figure><p>This often allows us to trace back the root cause to a specific change in the retrieval flow, and prompt a timely rollback before the issue impacts production widely.</p><h3>Wrap-up</h3><p>What started as the challenge of making sense of dense, variable legal prose has led us to build an end-to-end intelligence layer over our document platform, from structured argumentation parsing, to RAG-based counter-argument suggestion, to autonomous quality monitoring. Each layer builds on the previous one: the insights structure makes retrieval meaningful, the retrieval makes suggestions grounded and defensible, and the evaluation framework ensures the whole system prevents it from regression and keeps it evolving in a controlled, measurable way. As our pipeline continues to evolve and our decision stock grows, we see this as a long-term foundation for bringing increasingly precise and actionable legal intelligence to the lawyers who rely on our platform every day.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dffa149c28b4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/doctrine/from-adverse-pleadings-analysis-to-counter-arguments-how-we-introduced-legal-intelligence-to-the-dffa149c28b4">From Adverse Pleadings Analysis to Counter-Arguments: How We Introduced Legal Intelligence to the…</a> was originally published in <a href="https://medium.com/doctrine">Inside Doctrine</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>