<?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[DarrowAI - Medium]]></title>
        <description><![CDATA[Welcome to the Darrow.ai Research Group’s publication! Here, we share our exploration into NLP and machine learning, focusing on their transformative potential. Check out our latest research and insights as we delve into the technologies shaping our future. Join the conversation - Medium]]></description>
        <link>https://medium.com/darrowai?source=rss----6ef11e79d864---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>DarrowAI - Medium</title>
            <link>https://medium.com/darrowai?source=rss----6ef11e79d864---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 04:11:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/darrowai" 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 Theory to Practice: Why You Should Validate Ideas by Building POCs]]></title>
            <link>https://medium.com/darrowai/from-theory-to-practice-why-you-should-validate-ideas-by-building-pocs-430746607bda?source=rss----6ef11e79d864---4</link>
            <guid isPermaLink="false">https://medium.com/p/430746607bda</guid>
            <category><![CDATA[proof-of-concept]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Shahafc]]></dc:creator>
            <pubDate>Mon, 01 Jul 2024 14:27:03 GMT</pubDate>
            <atom:updated>2024-07-01T14:27:03.459Z</atom:updated>
            <content:encoded><![CDATA[<p>As a tech lead at <a href="https://darrow.ai/">Darrow.ai</a>, a company navigating the vast and uncharted waters of a blue ocean market, I have learned that the quickest way to validate ideas is through building Proofs of Concept (POCs).<br>Inspired by a scene in the movie “Oppenheimer” where Oppenheimer realizes the limitations of theory without practical validation, I want to share my experience in creating fast, efficient, and maintainable POCs.</p><h3>Focus on the Mission</h3><p>A successful POC starts with a well-defined goal. It’s easy to get sidetracked by “nice to have” features, but it’s crucial to stay focused on the primary objective. For example, when we were developing an innovative platform to research mobile applications, our main goal was to validate the accuracy of our algorithms and reduce the research time for our analysts.<br>By concentrating on this core mission, we avoided unnecessary distractions and delivered a functional POC that met our needs.</p><h3>Fast Iterations</h3><p>Constant communication with stakeholders is vital for the success of a POC. By keeping everyone aligned and in the loop, we can quickly adapt to feedback and redefine our mission as necessary. At Darrow, we hold regular check-ins and review sessions to ensure that our POCs are on track and evolving in the right direction. This iterative process is not about saving time, but about shaping it to get the results you want.</p><h3>Quick is Not Necessarily Dirty</h3><p>One common misconception is that speed sacrifices quality. However, it’s possible to write maintainable code quickly. By using clear coding standards and best practices, you can ensure that even a rapidly developed POC remains clean and extendable. In my work at Darrow, I often rely on frameworks and tools that facilitate rapid development without compromising the integrity of the codebase. (<a href="https://github.com/shahafc13?tab=stars">My GitHub profile</a> reflects my strong passion for open-source projects.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HMMF0ljDm5J22sm6" /></figure><h3>Conclusion</h3><p>Building fast POCs is an essential strategy in a blue ocean market like ours. By prioritizing maintainable code, focusing on the mission, and embracing fast iterations, we can efficiently validate our ideas and move forward with confidence. Just as Oppenheimer realized the importance of practical experimentation, <strong>we must also balance theory with hands-on validation to achieve success.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=430746607bda" width="1" height="1" alt=""><hr><p><a href="https://medium.com/darrowai/from-theory-to-practice-why-you-should-validate-ideas-by-building-pocs-430746607bda">From Theory to Practice: Why You Should Validate Ideas by Building POCs</a> was originally published in <a href="https://medium.com/darrowai">DarrowAI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Finding the Needle in the Legal Haystack]]></title>
            <link>https://medium.com/darrowai/finding-the-needle-in-the-legal-haystack-030090eb370d?source=rss----6ef11e79d864---4</link>
            <guid isPermaLink="false">https://medium.com/p/030090eb370d</guid>
            <category><![CDATA[embedding]]></category>
            <category><![CDATA[legaltech]]></category>
            <category><![CDATA[nlp]]></category>
            <dc:creator><![CDATA[Dor Bernsohn]]></dc:creator>
            <pubDate>Mon, 10 Jun 2024 06:01:30 GMT</pubDate>
            <atom:updated>2024-07-01T14:33:46.631Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h_g5_Rsy4zCtPQlqZbAZbw.jpeg" /></figure><p>The complexity of legal data poses significant challenges for professionals tasked with navigating vast archives of cases, statutes, and legal precedents. Advanced case embeddings offer a sophisticated approach to mitigating these challenges, transforming unwieldy legal texts into structured, analyzable data. In the following sections, we will delve into the types of legal case embeddings, examine their various applications, and discuss both the advantages they offer and the challenges they present.</p><h3>Overcoming Challenges with Advanced Case Embeddings</h3><p>Embeddings are computational techniques designed to convert information into numerical vectors, enabling algorithms to process this data efficiently. These embeddings support a range of tasks from semantic search to pattern recognition. There are two primary types of embeddings: dense and sparse embeddings.</p><ul><li><strong>Dense Embeddings:</strong> These involve representing data in continuous vector spaces, where each dimension captures some semantic meaning. Dense embeddings are typically learned through neural networks and can capture intricate relationships within the data, making them powerful for various natural language processing (NLP) tasks.</li><li><strong>Sparse Embeddings:</strong> These involve representing data in high-dimensional vector spaces, often with many dimensions having a value of zero. Sparse embeddings are useful for capturing specific, discrete pieces of information, such as word occurrences in documents.</li></ul><p>Below is an overview of the primary types of embeddings utilized in legal analytics.</p><h4>Metadata Embeddings</h4><p>Metadata embeddings distill case information — such as jurisdiction, court name, parties involved, and case filing dates — into numerical vectors. Jurisdiction embeddings elucidate the legal boundaries and context, whereas embeddings of court data highlight the specific venue, which is essential for identifying trends within jurisdictions. Party embeddings provide differentiation between the entities involved, whether they are individuals or corporations. Finally, embeddings for dates capture the chronological sequence, offering insights that go beyond the mere filing date to include important milestones that may affect the case trajectory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WSXXu-y2qORtMe29rAIlzA.png" /><figcaption>Metadata Embeddings</figcaption></figure><h4>Law-Specific Embeddings</h4><p>This method involves extracting and encoding detailed legal information from case documents into a structured, analyzable format. Three main parts to process:</p><ul><li><strong>Allegations</strong>: The specific claims and legal issues brought forth by the plaintiff, which provide the foundational context of the case.</li><li><strong>Statutes</strong>: The written laws applicable to the case, which may be cited to support the allegations or defenses.</li><li><strong>Precedents</strong>: Prior judicial decisions that bear relevance to the current case, offering a historical legal context that may influence its outcome.</li></ul><p>Each of these data points is converted into numerical vectors. The allegations are parsed to identify the key legal issues at stake. Statutes are coded to reflect the relevant laws that the court must consider. Precedents are analyzed to include the weight of historical decisions.</p><p>Through this process, each segment of legal information is synthesized into a composite embedding, representing the complex network of legal reasoning and principles pertinent to the case.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mX8l04B8SjOY3vJp__K5RA.png" /><figcaption>Law-Specific Embeddings</figcaption></figure><h4>Citation Graph Embeddings</h4><p>The Citation Graph utilizes the power of embeddings to map the relationships between cases based on their citations. By representing each case as a node in a network, and each citation as a link between nodes, this graph visually demonstrates how different cases influence one another. This is particularly useful for understanding the precedence and authority of cases, as well as the legal reasoning that spans multiple cases. Algorithms can analyze these networks to detect influential cases, common legal foundations, and emerging trends in case law.</p><p>In practice, Citation Graphs can help legal researchers quickly identify landmark cases and understand the structure of legal arguments within a specific area of law. They also make it easier to predict how future cases might be decided based on past citations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*EBJkmqxIBp18ODQPsHX20Q.png" /><figcaption>Graph Embeddings</figcaption></figure><h4>Legal Entities Graph Embeddings</h4><p>In the Legal Entities Graph, relationships among various specific legal entities — such as Violations, Defendants, Laws, Locations, Outcomes, and Evidence — are meticulously mapped. Each of these entities is represented as a node within the graph. Connections between these nodes (edges) illustrate legal interactions such as the application of laws to particular violations, the roles of defendants in those violations, and how different pieces of evidence are linked to outcomes in distinct locations. This structured visualization aids in revealing the intricate web of legal dependencies and interactions.</p><h4>Temporal Embeddings</h4><p>Temporal embeddings are vital for understanding how the sequence and timing of events influence legal case outcomes. This technique translates the chronological progression of legal actions — such as filing dates, evidence submissions, and hearing schedules — into numerical representations.</p><h4>Hybrid Graph Embeddings</h4><p>Hybrid graph embeddings integrate various types of embeddings into a unified, graph-based model, offering a holistic view of legal data. This approach combines elements such as citation patterns, legal entity relationships, and temporal data to capture a comprehensive feature space of legal interactions. By synthesizing multiple data dimensions, hybrid graph embeddings provide a deeper insight into the complex network of legal precedents, entities, and procedural timelines, enhancing the ability to analyze and predict outcomes in the legal field.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e7OWY-9DOhi0uJGlNGxLvQ.png" /><figcaption>Hybrid Graph Embeddings</figcaption></figure><h3>Exploring Hypothetical Scenarios to Enhance Embedding Spaces: Leveraging Counterfactual Cases with Detailed Legal Elements</h3><p>Exploring counterfactual hypothetical scenarios offers a unique opportunity to enrich the embedding space in legal research. Detailed yet theoretical cases can be constructed, structured into nodes and edges representing legal entities such as Violations, Defendants, Laws, Locations, Outcomes, and Evidence. Each scenario is built with comprehensive elements including facts, allegations, and crucial legal components, organized into a dynamic, graph-based model. This method generates embeddings that encapsulate a diverse array of legal intricacies and variables, providing deep insights into the interplay and impact of various legal factors on case outcomes.</p><p>These hypothetical scenarios, though not grounded in real cases, allow for a sophisticated analysis of how different factors might influence legal decisions. For example, scenarios can map out how a “Violation” such as “Failure to Present Terms Clearly” might interact with a “Defendant” like a business under specific “Laws” and in particular “Locations,” leading to various “Outcomes” supported by “Evidence” such as subscription agreements. This structured approach facilitates a nuanced exploration of legal information, enhancing implicit search capabilities and in-depth analysis across a wide spectrum of legal possibilities.</p><p>In practice, this method enables legal professionals to conduct “what-if” analyses, providing valuable insights into how a case might have been decided under different circumstances. Such analyses are invaluable for legal education, strategy planning, and understanding the flexibility and limits of the law, ultimately broadening the scope of legal understanding and uncovering hidden correlations, patterns, and trends within legal datasets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fA9Q7wiUY1OrRWZyz7hAHQ.png" /></figure><p>The JSON content illustrates a series of “what-if” scenarios, crucial for conducting hypothetical legal analyses. These scenarios are meticulously structured with nodes and edges representing different legal entities such as Violations, Defendants, Laws, Locations, Outcomes, and Evidence. Each scenario explores potential legal outcomes of specific violations under predefined conditions, aiding in the understanding of how various factors might influence legal decisions in a controlled, theoretical framework. This structured approach enables legal professionals to simulate and analyze complex legal interactions, thereby enhancing strategic planning and educational insights within the legal field.</p><pre>{<br>    &quot;scenario_1&quot;: {<br>        &quot;nodes&quot;: [<br>            {&quot;id&quot;: &quot;Violation&quot;, &quot;label&quot;: &quot;Failure to Present Terms Clearly&quot;},<br>            {&quot;id&quot;: &quot;Defendant&quot;, &quot;label&quot;: &quot;Business&quot;},<br>            {&quot;id&quot;: &quot;Law&quot;, &quot;label&quot;: &quot;Automatic Renewal Law&quot;},<br>            {&quot;id&quot;: &quot;Location&quot;, &quot;label&quot;: &quot;California&quot;},<br>            {&quot;id&quot;: &quot;Outcome&quot;, &quot;label&quot;: &quot;Potential Legal Action for Non-Compliance&quot;},<br>            {&quot;id&quot;: &quot;Evidence&quot;, &quot;label&quot;: &quot;Subscription Agreement Lacking Clear Terms&quot;}<br>        ],<br>        &quot;edges&quot;: [<br>            {&quot;source&quot;: &quot;Violation&quot;, &quot;target&quot;: &quot;Defendant&quot;, &quot;relation&quot;: &quot;committed by&quot;},<br>            {&quot;source&quot;: &quot;Violation&quot;, &quot;target&quot;: &quot;Law&quot;, &quot;relation&quot;: &quot;violates&quot;},<br>            {&quot;source&quot;: &quot;Violation&quot;, &quot;target&quot;: &quot;Location&quot;, &quot;relation&quot;: &quot;occurred in&quot;},<br>            {&quot;source&quot;: &quot;Violation&quot;, &quot;target&quot;: &quot;Outcome&quot;, &quot;relation&quot;: &quot;results in&quot;},<br>            {&quot;source&quot;: &quot;Violation&quot;, &quot;target&quot;: &quot;Evidence&quot;, &quot;relation&quot;: &quot;supported by&quot;}<br>        ]<br>    },<br>    &quot;scenario_2&quot;: {<br>        &quot;nodes&quot;: [<br>            {&quot;id&quot;: &quot;Violation&quot;, &quot;label&quot;: &quot;Charging Without Affirmative Consent&quot;},<br>            {&quot;id&quot;: &quot;Defendant&quot;, &quot;label&quot;: &quot;Business&quot;},<br>            {&quot;id&quot;: &quot;Law&quot;, &quot;label&quot;: &quot;Automatic Renewal Law&quot;},<br>            {&quot;id&quot;: &quot;Location&quot;, &quot;label&quot;: &quot;California&quot;},<br>            {&quot;id&quot;: &quot;Outcome&quot;, &quot;label&quot;: &quot;Potential Legal Action for Unauthorized Charges&quot;},<br>            {&quot;id&quot;: &quot;Evidence&quot;, &quot;label&quot;: &quot;Consumer Complaints of Unauthorized Charges&quot;}<br>        ],<br>        &quot;edges&quot;: [<br>            {&quot;source&quot;: &quot;Violation&quot;, &quot;target&quot;: &quot;Defendant&quot;, &quot;relation&quot;: &quot;committed by&quot;},<br>            {&quot;source&quot;: &quot;Violation&quot;, &quot;target&quot;: &quot;Law&quot;, &quot;relation&quot;: &quot;violates&quot;},<br>            {&quot;source&quot;: &quot;Violation&quot;, &quot;target&quot;: &quot;Location&quot;, &quot;relation&quot;: &quot;occurred in&quot;},<br>            {&quot;source&quot;: &quot;Violation&quot;, &quot;target&quot;: &quot;Outcome&quot;, &quot;relation&quot;: &quot;results in&quot;},<br>            {&quot;source&quot;: &quot;Violation&quot;, &quot;target&quot;: &quot;Evidence&quot;, &quot;relation&quot;: &quot;supported by&quot;}<br>        ]<br>    },<br>    &quot;scenario_3&quot;: {<br>        &quot;nodes&quot;: [<br>            {&quot;id&quot;: &quot;Violation&quot;, &quot;label&quot;: &quot;Failure to Provide Easy Cancellation&quot;},<br>            {&quot;id&quot;: &quot;Defendant&quot;, &quot;label&quot;: &quot;Business&quot;},<br>            {&quot;id&quot;: &quot;Law&quot;, &quot;label&quot;: &quot;Automatic Renewal Law&quot;},<br>            {&quot;id&quot;: &quot;Location&quot;, &quot;label&quot;: &quot;California&quot;},<br>            {&quot;id&quot;: &quot;Outcome&quot;, &quot;label&quot;: &quot;Potential Legal Action for Impeding Cancellation&quot;},<br>            {&quot;id&quot;: &quot;Evidence&quot;, &quot;label&quot;: &quot;Lack of or Hard to Find Cancellation Option&quot;}<br>        ],<br>        &quot;edges&quot;: [<br>            {&quot;source&quot;: &quot;Violation&quot;, &quot;target&quot;: &quot;Defendant&quot;, &quot;relation&quot;: &quot;committed by&quot;},<br>            {&quot;source&quot;: &quot;Violation&quot;, &quot;target&quot;: &quot;Law&quot;, &quot;relation&quot;: &quot;violates&quot;},<br>            {&quot;source&quot;: &quot;Violation&quot;, &quot;target&quot;: &quot;Location&quot;, &quot;relation&quot;: &quot;occurred in&quot;},<br>            {&quot;source&quot;: &quot;Violation&quot;, &quot;target&quot;: &quot;Outcome&quot;, &quot;relation&quot;: &quot;results in&quot;},<br>            {&quot;source&quot;: &quot;Violation&quot;, &quot;target&quot;: &quot;Evidence&quot;, &quot;relation&quot;: &quot;supported by&quot;}<br>        ]<br>    },<br>    &quot;scenario_4&quot;: {<br>        &quot;nodes&quot;: [<br>            {&quot;id&quot;: &quot;Violation&quot;, &quot;label&quot;: &quot;Not Providing Required Notices&quot;},<br>            {&quot;id&quot;: &quot;Defendant&quot;, &quot;label&quot;: &quot;Business&quot;},<br>            {&quot;id&quot;: &quot;Law&quot;, &quot;label&quot;: &quot;Automatic Renewal Law&quot;},<br>            {&quot;id&quot;: &quot;Location&quot;, &quot;label&quot;: &quot;California&quot;},<br>            {&quot;id&quot;: &quot;Outcome&quot;, &quot;label&quot;: &quot;Potential Legal Action for Failure to Notify&quot;},<br>            {&quot;id&quot;: &quot;Evidence&quot;, &quot;label&quot;: &quot;Consumer Reports of No Pre-Renewal Notification&quot;}<br>        ],<br>        &quot;edges&quot;: [<br>            {&quot;source&quot;: &quot;Violation&quot;, &quot;target&quot;: &quot;Defendant&quot;, &quot;relation&quot;: &quot;committed by&quot;},<br>            {&quot;source&quot;: &quot;Violation&quot;, &quot;target&quot;: &quot;Law&quot;, &quot;relation&quot;: &quot;violates&quot;},<br>            {&quot;source&quot;: &quot;Violation&quot;, &quot;target&quot;: &quot;Location&quot;, &quot;relation&quot;: &quot;occurred in&quot;},<br>            {&quot;source&quot;: &quot;Violation&quot;, &quot;target&quot;: &quot;Outcome&quot;, &quot;relation&quot;: &quot;results in&quot;},<br>            {&quot;source&quot;: &quot;Violation&quot;, &quot;target&quot;: &quot;Evidence&quot;, &quot;relation&quot;: &quot;supported by&quot;}<br>        ]<br>    }<br>}</pre><h3>Conclusions</h3><p>This exploration of advanced case embeddings has demonstrated their transformative potential in legal analytics. By converting complex legal documents into structured, analyzable data, these technologies enhance capabilities in semantic search, pattern recognition, and predictive analytics. The integration of various embedding types allows for sophisticated “what-if” analyses, enabling legal professionals to simulate and evaluate potential legal outcomes under different scenarios. Advanced case embeddings significantly improve the efficiency and quality of legal research and outcomes, representing a notable advancement in the application of technology within the legal field.</p><p>At <a href="https://darrow.ai/">Darrow.ai</a>, we’re building a vision of frictionless justice with cutting-edge algorithms. Embeddings are the cornerstone of this effort. In this blog, we review how we’ve tailored embeddings specifically for the legal field.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=030090eb370d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/darrowai/finding-the-needle-in-the-legal-haystack-030090eb370d">Finding the Needle in the Legal Haystack</a> was originally published in <a href="https://medium.com/darrowai">DarrowAI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Evaluating LLMs Summarizations]]></title>
            <link>https://medium.com/darrowai/evaluating-llms-summarizations-890a6ef81a35?source=rss----6ef11e79d864---4</link>
            <guid isPermaLink="false">https://medium.com/p/890a6ef81a35</guid>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[text-summarization]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[nlp]]></category>
            <dc:creator><![CDATA[Yaron Vazana]]></dc:creator>
            <pubDate>Tue, 21 May 2024 10:23:03 GMT</pubDate>
            <atom:updated>2024-05-21T10:23:03.263Z</atom:updated>
            <content:encoded><![CDATA[<h4>Overview of different approaches for evaluating summarizations generated by LLMs</h4><p>LLMs have stepped into almost every field in NLP (Natural Language Processing), some would say even bringing us closer to full AI (a.k.a AGI). Amongst these fields, text summarization is considered one that has received lots of attraction and progress thanks to the major advancements in Generative AI, making us rethink our existing approaches and calibrate our workflows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lhUaksF7WtcsUN2HGo3Zsg.png" /><figcaption>LLMs for Text Summarization</figcaption></figure><h3><strong>Text Summarization in a nutshell</strong></h3><p>Imagine you are given a legal case document, containing hundreds of pages, thousands of sections and subsections, and lots of facts, that when put together, describe the overall occurrence of the matters in the case.</p><p>Reading the entire document may be inefficient and unnecessary as only parts of it contain relevant information from the main topics. What we would like to have is a way to briefly skim a condensed, but yet reliable, version of the original document, one that makes us feel confident we haven’t missed any important information we must have.</p><p>To put it differently, we need a well-structured, cohesive, reliable and <strong>short </strong>summary of our original document<strong>.</strong></p><h3><strong>Summarization with LLMs</strong></h3><p>Recent advancements in GenAI have made it possible to prompt an LLM with a simple request to summarize any input text and get back a shorter version of it, that, according to Microsoft, preserves the same meaning.</p><blockquote>When AI like ChatGPT receives the command to summarize or paraphrase a block of text, it expresses the same ideas while using different words and sentence structures. The meaning is the same, but the content is put together in a new way. The AI might change words around, substitute synonyms, or entirely restructure a block of text. (M<a href="https://www.microsoft.com/en-us/microsoft-365-life-hacks/writing/using-chatgpt-summarizing-paraprasing-text">icrosoft</a>)</blockquote><p>Adding the fact that new LLMs are soon to support 1M tokens as context window size (i.e. 750K words or 1500 pages), this makes them perfect for summarizing extremely long texts such as textbooks, magazines, papers, or in our case legal cases.</p><blockquote>As we roll out the full 1 million token context window, we’re actively working on optimizations to improve latency, reduce computational requirements and enhance the user experience. <a href="https://blog.google/technology/ai/google-gemini-next-generation-model-february-2024/#architecture">(Google)</a></blockquote><h3>Evaluating LLMs Summaries</h3><p>There’s no doubt LLMs have made the summarization task easier, but what about the evaluation? After all, in most cases, you can’t blindly trust the text produced by the LLM and present it as is to your users.</p><p>Let’s review two interesting methods for evaluating summaries that were generated using LLMs which were presented in the last <a href="https://aclanthology.org/events/eacl-2024/">EACL2024</a> conference that was held in Malta earlier this year.</p><p>Since at <a href="https://www.darrow.ai/">Darrow</a>, we are a legal tech company, driven to create a world where justice is frictionless and accessible to all, our next examples will use texts taken from our in-house legal dataset, containing more than 100k past and ongoing class-action legal cases.</p><h4>Method 1: Evaluating Using Guidelines Questions</h4><p>In this approach, before sending our documents to the LLM for summarization, we prepare a set of distilled <em>yes</em>/<em>no</em> questions that together verify all the quality aspects of our generated summary. Each question alone, asks about a very specific criteria that measures a single aspect of the summary.</p><p>For simplicity, we can divide the questions into three groups:</p><ul><li><strong>Structural-related questions</strong> — here we ask about the structure of the summary and make sure it follows our standards.</li><li><strong>Content-related questions</strong> — here we ask about how good the generated content is and whether it consists of all our must-have information.</li><li><strong>Domain-related questions</strong> — here we ask more specific questions that can distinguish between a general good summary and a domain-specific good summary.</li></ul><p><strong>Examples of such questions:</strong></p><ol><li><em>(Structural)</em> Is the summary both well-organized with headings or sections for cohesive presentation and free from significant omissions that might impact a comprehensive understanding?</li><li><em>(Content)</em> Do the facts of the summary still follow the correct order chronologically?</li><li><em>(Domain) </em>Does the summary provide a clear overview of the main issue or legal violation?</li></ol><p>In our practices, we noticed that a few (4–5) questions from each category did a good job and captured most of the requirements we had from the summary.</p><p>In addition, you could use these questions to further improve your summarization prompt and be more specific with your desired output.</p><p>Also, to overcome the position bias where the different ordering of the questions leads to different results, you can prompt the LLM multiple times and shuffle the questions between the runs, then average the results for each question.</p><p>Moreover, instead of binary <em>yes/no</em> questions, you can prompt the LLM with a request to rate the result on a 1–5 scale, in such cases we noticed that the description for each score in the scale should be also included in the prompt.</p><p>Lastly, we had some experiments on using different LLMs (mixture of experts), others than the one that generated the summary, to answer these questions and score the summary, but that’s a topic for a different post.</p><h4>Method 2: Evaluating Using Fact-Checking</h4><p>Looking at legal case documents, one can argue that at the base of it, we have a complex legal story, usually describing some violations that were made and consisting of many facts presented in chronological order, describing the overall sequence of events in the case.</p><p>In this approach for evaluating the summary, we will focus on the most important facts that appear in the original text, and make sure they exist also in the generated summary.</p><p>The advantage of this approach is twofold: <strong>(1)</strong> It gives us the ability to compute standard ML metrics such as [<em>precision</em>, <em>recall</em> and <em>f1] </em>by counting the facts we were able to identify in the summary, thus making the optimization objective clear and concise. <strong>(2) </strong>It focuses on making the content as reliable as possible by making sure as many facts as possible are covered.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/407/1*FYndEf6VdCspageENFsI4w.png" /><figcaption>ML metrics for facts checking in a text summary</figcaption></figure><p><strong>Matching Facts</strong></p><p>Given an original long text document and a corresponding summary generated using an LLM, to compute the metrics mentioned above, we still need a way to match between facts in the original document and the summary to count how many we covered (measuring the quality of the facts is also important but won’t be discussed here).</p><p>Here are a few options for facts-matching:</p><ol><li><strong>Basic Similarity:</strong> <br>With unlimited ways to embed short texts into vectors, you can take each matched pair of facts and embed them into a lower dim space, then compute the similarity and decide on a threshold that optimizes your metrics.</li><li><strong>NLI (Natural Language Inference):</strong><br>Given 2 facts, use an existing NLI model to classify them into one of the categories <em>&lt;entail, contradict, neutral&gt;</em>,<em> </em>then use the entailed pairs to set a threshold that gives satisfying results.</li></ol><h3>Epilogue</h3><p>Evaluating summaries has always been a challenging task, also for humans. Even if you take several domain experts in a specific field, you will likely get<strong> </strong>disagreements that will make the review process difficult. Leveraging LLMs and other ML techniques to help skim through summaries and evaluate them can reduce your human labeling efforts, which itself is not intuitive, and make your pipelines more automated over time.</p><p>If you’d like to hear more about what we’ve been working on, don’t hesitate to contact me.</p><p><a href="https://www.linkedin.com/in/yaronv/">Yaron</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=890a6ef81a35" width="1" height="1" alt=""><hr><p><a href="https://medium.com/darrowai/evaluating-llms-summarizations-890a6ef81a35">Evaluating LLMs Summarizations</a> was originally published in <a href="https://medium.com/darrowai">DarrowAI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Code Green: Addressing the Environmental Impact of Language Models]]></title>
            <link>https://medium.com/darrowai/code-green-addressing-the-environmental-impact-of-language-models-0161eb790c21?source=rss----6ef11e79d864---4</link>
            <guid isPermaLink="false">https://medium.com/p/0161eb790c21</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[carbon-emissions]]></category>
            <category><![CDATA[environment]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Gil Semo]]></dc:creator>
            <pubDate>Tue, 07 May 2024 08:31:12 GMT</pubDate>
            <atom:updated>2024-05-07T08:31:12.500Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l0Z0m5j4TJRlZG0bsebwoA.jpeg" /></figure><p>As we witness the rapid advancements in artificial intelligence, particularly through the development of large language models (LLMs), it’s crucial to also consider their environmental footprint. Recent studies, including one notable study by<a href="https://arxiv.org/pdf/2311.16863.pdf"> </a>Hugging Face and Carnegie Mellon University, have illuminated the substantial energy consumption inherent in AI-driven tasks. For instance, the energy required for training GPT-4 is equivalent to the carbon emissions produced by driving a gasoline-powered car for nearly 29 million kilometers, which is approximately 3.5 round trips from Earth to the moon. This comparison, highlighted in the report “<a href="https://arxiv.org/pdf/2311.16863.pdf">Power Hungry Processing: Watts Driving the Cost of AI Deployment</a>,” serves as a crucial wake-up call to the hidden environmental costs of our technological advancements.</p><p>The evolution of LLMs underscores a critical, yet often neglected concern: their environmental impact. As these models grow in complexity, they require significant computational resources, leading to substantial energy usage and carbon emissions. This issue gains urgency as sustainability and climate action become global priorities. The decisions we make now in developing, deploying, and utilizing AI will shape its ecological footprint, setting the stage for a more sustainable integration of this powerful technology into our lives.</p><h3><strong>Core Elements of AI’s Energy Consumption</strong></h3><p>Understanding the carbon footprint of machine learning is crucial for developing more sustainable AI technologies. A variety of interrelated factors define this footprint, each playing a significant role in the overall energy consumption of machine learning systems:</p><p><strong>Hardware</strong>: The efficiency and type of hardware used, including GPUs, is crucial in determining the energy consumption of ML models. While newer, more efficient hardware can offset some energy demands, the high-end requirements for training large models may negate these gains.</p><p><strong>Training data</strong>: The scale and complexity of datasets directly influence the energy needed for processing. Larger datasets increase the carbon footprint; thus, optimizing dataset size and complexity is essential for maintaining sustainability.</p><p><strong>Model architecture</strong>: The design of neural networks crucially impacts their energy consumption. Larger and more complex networks inherently require more energy. Additionally, the duration of training plays a significant role in energy use — the longer a model trains, the more energy it consumes. Streamlining the architecture of these models can lead to substantial reductions in energy usage without compromising their performance. By focusing on efficient model design and optimizing training time, we can take a more direct path to minimizing energy consumption and enhancing sustainability.</p><p><strong>Location of data centers</strong>: The carbon footprint of data centers depends heavily on the source of electricity. Centers using renewable energy sources have lower carbon footprints; choosing locations with access to renewables is a strategic decision for minimizing environmental impact.</p><h3><strong>Case Studies of Energy Consumption</strong></h3><p>The environmental cost of training and operating large language models (LLMs) becomes strikingly clear when we examine specific case studies that illustrate their significant energy use and carbon emissions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LuPJxwShNBvAyc8f" /></figure><h4>LLMs Environmental Footprint</h4><p>The training of GPT-4, one of the most sophisticated language models to date, required significant resources, leading to substantial environmental impacts. The carbon footprint generated during its development is comparable to the emissions from driving a gasoline-powered car nearly 29 million kilometers or powering over 1,300 homes for a year.* These comparisons highlight the scale of energy and environmental considerations that come with advanced technological developments.</p><blockquote>Calculation based on the use of 25,000 Nvidia A100 GPUs over 100 days, consuming a total of 28,800,000 kWh of electricity when including data center inefficiencies, resulting in approximately 6,912,000 kg of CO2 emissions.</blockquote><p>The LLama3 model, though using less energy than GPT-4, still had a notable impact. The total carbon emissions from training both versions of the LLama model (8B and 70B) were equivalent to the energy required to power 452 homes for a year. Additionally, over 2,600 acres of U.S. forest would be needed to sequester the carbon emitted during this training process.</p><h4>Energy Consumption During Inference</h4><p>The inference stage of AI, where the model interacts with new data, often requires more energy than the training phase. For example, 60% of the total energy consumed in AI operations is attributed to inference, according to <a href="https://research.google/blog/good-news-about-the-carbon-footprint-of-machine-learning-training/">Google</a>. Notably, a day’s operation of GPT-3 alone results in a carbon footprint equivalent to around 8.4 tons of CO2 annually. Given the widespread use of models like ChatGPT, which attracted 100 million users within two months of its release, the energy demand becomes substantial. A single query in ChatGPT may use up to 100 times the energy of a standard Google search, underscoring the high environmental cost of popular AI applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TJyuYJYECp8VQ_94" /></figure><h3><strong>What Can We Do?</strong></h3><p><strong>Choosing the Right Model:</strong> Not every AI application requires the power of a large language model. Where possible, opt for smaller, more specialized models that can be fine-tuned to meet your needs. This approach conserves energy and computing resources while still delivering high-quality results. Fine-tuning existing models rather than training new ones from scratch can drastically cut down on both carbon emissions and expenses.</p><p><strong>Modifying and Streamlining Model Architecture</strong>: Adjusting the architecture of AI models to eliminate redundant parameters and adopt more efficient designs can significantly reduce both energy and storage requirements. For instance, AI21’s Jamba model exemplifies this strategy by achieving a threefold increase in throughput with reduced energy use, showcasing how structural changes can optimize operational efficiency. Similarly, Microsoft’s BitNet b1.58 leverages quantization to drastically lower bit usage per parameter, substantially cutting down energy consumption and carbon emissions without sacrificing performance. These adaptations demonstrate that thoughtful architectural adjustments are key to advancing sustainability in AI development.</p><p><strong>Selecting the Right Hardware:</strong> Opt for the appropriate hardware based on your specific AI needs. Not every task requires the most powerful GPU; choosing hardware that matches the demands of your projects can significantly reduce energy consumption and cost.</p><p><strong>Algorithm Selection:</strong> Optimize your AI’s performance and environmental impact by choosing the right algorithms for the task. For large-scale systems, actively employ carbon estimation tools like <a href="https://codecarbon.io/">Code Carbon</a> and <a href="https://mlco2.github.io/impact/">ML CO2</a> Impact to measure and manage your carbon footprint. Encouraging developers to incorporate these assessments into major projects can promote alignment of AI development with sustainability objectives.</p><h3><strong>Conclusion</strong></h3><p>As we look to the future, the potential of LLMs is limitless, offering unprecedented opportunities for advancement. It’s imperative that we embrace this potential while ensuring that our use of LLMs is environmentally responsible. By harnessing their power in a more sustainable manner, we not only maximize their benefits but also contribute to addressing pressing global issues like climate change. This strategic approach ensures that our progress is not only innovative but also environmentally conscious, paving the way for a brighter and more sustainable future for generations to come.</p><p><strong>References</strong></p><ul><li><a href="https://arxiv.org/pdf/2311.16863.pdf"><strong>https://arxiv.org/pdf/2311.16863.pdf</strong></a></li><li><a href="https://arxiv.org/pdf/2402.17764.pdf"><strong>https://arxiv.org/pdf/2402.17764.pdf</strong></a></li><li><a href="https://www.google.com/url?q=https://ai.googleblog.com/2022/02/good-news-about-carbon-footprint-of.html&amp;sa=D&amp;source=docs&amp;ust=1713254586932687&amp;usg=AOvVaw2bwxT314WDYwJLvAauWuvi">Good News About the Carbon Footprint of Machine Learning Training</a></li><li><a href="https://www.linkedin.com/pulse/carbon-impact-large-language-models-ais-growing-cost-vaidheeswaran-fcbhc/"><strong>https://www.linkedin.com/pulse/carbon-impact-large-language-models-ais-growing-cost-vaidheeswaran-fcbhc/</strong></a></li><li><a href="https://www.cutter.com/article/large-language-models-whats-environmental-impact"><strong>https://www.cutter.com/article/large-language-models-whats-environmental-impact</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0161eb790c21" width="1" height="1" alt=""><hr><p><a href="https://medium.com/darrowai/code-green-addressing-the-environmental-impact-of-language-models-0161eb790c21">Code Green: Addressing the Environmental Impact of Language Models</a> was originally published in <a href="https://medium.com/darrowai">DarrowAI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Collaborative AI Development Is Breaking Boundaries in Legal Tech]]></title>
            <link>https://medium.com/darrowai/how-collaborative-ai-development-is-breaking-boundaries-in-legal-tech-fdf7e5353faf?source=rss----6ef11e79d864---4</link>
            <guid isPermaLink="false">https://medium.com/p/fdf7e5353faf</guid>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[ai-for-good]]></category>
            <category><![CDATA[alignment]]></category>
            <category><![CDATA[justice]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Ben Hagag]]></dc:creator>
            <pubDate>Thu, 02 May 2024 13:43:25 GMT</pubDate>
            <atom:updated>2024-05-02T13:34:32.692Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ASJA1CqLrzA47GksNmnyCw.jpeg" /></figure><p>In recent years there have been incredible advancements in AI-related research. The <a href="https://2024.eacl.org/">European Charter of the Association for Computational Linguistics 2024 conference</a> (EACL), amidst the historical richness of Malta, was not just a journey through the current landscape of AI and Natural Language Processing (NLP); it was a glimpse into the future. At the conference, it became evident how the leaps in AI technology are intersecting with and boosting sectors across the board, including legal tech.</p><p>Our time at the conference went beyond introducing our latest endeavor, <a href="https://arxiv.org/abs/2402.04335">LegalLens</a> (the first ever benchmark for legal violation identification). It was about diving deep into the collective wisdom of the AI community.</p><h3>The uncharted frontiers of AI and human creativity</h3><p>During the conference, <a href="https://scholar.google.com/citations?user=qIL9dWUAAAAJ&amp;hl=en">Prof. Hinrich Schütze</a> presented a compelling perspective on the evolving role of generative AI in augmenting human creativity. He clarified that as generative AI excels in areas rich with data, it acts not as a rival but as a catalyst for human productivity, particularly in niche domains where data is scarce. This dynamic suggests a cyclical collaboration where humans explore new frontiers, thereby generating new data and knowledge domains. In turn, this new information feeds back into “the AI”, enhancing its capabilities and enabling further human exploration and creativity. Schütze articulated a future where AI and humans continually push the envelope of creativity and innovation together, highlighting the synergistic potential of this partnership. This vision champions AI as an ally in our quest to expand humanity’s knowledge and boundaries.</p><p>Professor Schütze’s perspective is true to Darrow’s belief, and thus the AI technology we have developed.<a href="https://www.darrow.ai/law-3-0-lawyering-in-the-age-of-data/"> AI in legal tech</a> does not imply the obsolescence of legal expertise, there is and always will be a place for human intelligence, empathy, advocacy, judgment, and reasoning in the justice system. Rather it marks the dawn of a new chapter. Legal professionals, empowered by AI, find themselves with the freedom to dive deeper into the realms of specialization and niche practices, enriching and advancing the field in unprecedented ways. The relationship between AI and human capability in legal tech isn’t about replacement; it’s about amplification and elevation, driving us toward a future where the synergy between human insight and artificial intelligence brings about unparalleled growth and innovation in the justice system and legal landscape.</p><h3>The ecosystem approach</h3><p>Perhaps the most compelling narrative from EACL 2024 was the unanimous call to shift from building AI monoliths (a software architecture where all components of a system are tightly integrated into a single, indivisible unit) to nurturing ecosystems, a theme brilliantly articulated in <a href="https://www.linkedin.com/in/mirella-lapata-b431513/?utm_source=share&amp;utm_campaign=share_via&amp;utm_content=profile&amp;utm_medium=ios_app">Prof. Mirella Lapata’s</a> keynote. This approach moves us beyond the question of which Large Language Model (LLM) to use, focusing instead on how we integrate these models within a broader system to achieve the desired impact. It’s an acknowledgment that the true potential of AI lies not in the models alone but in their sophisticated integration with other components, from data structuring and prompt engineering to conversational memory, agent interactions and much more.</p><p>This ecosystem-centric view is not new, it’s akin to how data engineers leverage microservices, and how full stack developers employ a range of technologies across the stack. This method is well known for others, but not yet established for Data Scientists. There are various approaches on how to implement this, such as <a href="https://colinraffel.com/talks/simons2023build.pdf">Collin Raffle’s Build an Ecosystem, Not a Monolith</a>, and <a href="https://arxiv.org/pdf/2302.11529.pdf">Jonas Pieffer’s Modular Deep Learning</a>. However <a href="https://www.pinecone.io/learn/llm-ecosystem/">Pinecone’s insights on the LLM ecosystem</a> clearly articulates this approach, highlighting the importance of a cohesive strategy that leverages the unique strengths of each component</p><p>The resonance of this perspective was louder than ever at EACL 2024, with key papers and discussions emphasizing components complementary to LLMs and their critical role in enhancing task performance. This collective shift towards an ecosystem approach underlines a broader understanding within the AI community: impactful solutions emerge from how well we can orchestrate the symphony of available technologies, crafting systems that are far greater than the sum of their parts.</p><h3>AI as a catalyst for legal innovation</h3><p>At EACL 2024 Darrow was honored to not only participate but also contribute to the ongoing conversations around the latest and groundbreaking papers and advancements in AI. The potential of artificial intelligence to revolutionize industries, streamline processes, solve complex problems, and enhance our daily lives is undeniable. At Darrow, we strongly believe in AI for good. Our guiding vision of “frictionless justice,” a world where people can trust that every legal violation is swiftly discovered, precisely valued, and efficiently resolved — requires collaboration across disciplines. Sharing our findings alongside our data and code helps to achieve that. This is driven by our belief that making a significant impact in this niche yet critical domain requires us to not only broaden understanding but also clearly articulate why what we do is impactful, challenging, and fundamentally important, and encourage more people to join our journey.</p><p>Reflecting on the myriad discussions and presentations at EACL 2024, it’s clear that the future of AI, especially in sectors as critical as legal tech, lies in fostering a collaborative partnership between technology and human expertise. The insights shared by Prof. Schütze and Prof. Lapata offer both a vision and a challenge: to build AI systems that respect and augment human creativity and expertise.</p><p>Inspired by the conference’s visionary work and pioneering ideas, our commitment is stronger than ever. We’re on a quest to discover how AI and legal expertise can synergize, pushing towards a future where technology and human ingenuity meld to open up new realms of possibility. The road ahead is undoubtedly challenging, but it’s also ripe with opportunities for breakthroughs and transformative changes. Together, we’re mapping out an AI-enhanced future, where collaboration, creativity, and a human-centric approach lead the way.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fdf7e5353faf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/darrowai/how-collaborative-ai-development-is-breaking-boundaries-in-legal-tech-fdf7e5353faf">How Collaborative AI Development Is Breaking Boundaries in Legal Tech</a> was originally published in <a href="https://medium.com/darrowai">DarrowAI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>