<?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 Anand Das on Medium]]></title>
        <description><![CDATA[Stories by Anand Das on Medium]]></description>
        <link>https://medium.com/@ananddas227?source=rss-b543f379d3e4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Cbn33L09eGNR7GCU</url>
            <title>Stories by Anand Das on Medium</title>
            <link>https://medium.com/@ananddas227?source=rss-b543f379d3e4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 22:35:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ananddas227/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[JudgeIt: Automating RAG Evaluation using LLM-as-a-Judge]]></title>
            <link>https://medium.com/towards-generative-ai/judgeit-automating-rag-evaluation-using-llm-as-a-judge-d7c10b3f2eeb?source=rss-b543f379d3e4------2</link>
            <guid isPermaLink="false">https://medium.com/p/d7c10b3f2eeb</guid>
            <category><![CDATA[evaluation]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[generative-ai-use-cases]]></category>
            <dc:creator><![CDATA[Anand Das]]></dc:creator>
            <pubDate>Fri, 11 Oct 2024 05:26:45 GMT</pubDate>
            <atom:updated>2024-10-14T19:38:13.357Z</atom:updated>
            <content:encoded><![CDATA[<h4>Human level judgement to scale your RAG applications quickly to Prod using Judgeit framework</h4><p>Star GH Repo of <a href="https://github.com/ibm-ecosystem-engineering/JudgeIt-LLM-as-a-Judge">JudgeIt Here</a></p><p>In the fast-changing world of Generative AI, accuracy and reliability are paramount. When developing Generative AI pipelines, it is crucial to implement robust evaluation frameworks to test these systems throughout the development process. While human evaluation may be accurate, it often takes a high degree of manual effort and is difficult to scale efficiently.</p><p>To learn more about <strong>JudgeIt</strong>, visit our cover blog</p><p><a href="https://medium.com/@KunalSavvy/judgeit-the-most-accurate-framework-to-automate-evaluation-of-gen-ai-34785d3cff6e">JudgeIT — The Most Accurate Framework to Automate Evaluation of Gen AI</a></p><h3>Key Features</h3><ul><li><strong>Automated Evaluation</strong>: JudgeIt automates the batch evaluation process, significantly improving efficiency compared to traditional human testing methods.</li><li><strong>Customization</strong>: Tailor the evaluation process with your datasets, LLM models, and specific parameters to meet your needs.</li><li><strong>Multi-Pipeline Support</strong>: Evaluate various types of LLM pipelines, including:</li></ul><ol><li><strong>RAG Evaluation</strong>: Assess generated text (RAG outputs) against golden text.</li><li><strong>Multi-turn Query Rewriting Evaluation</strong>: Evaluate rewritten queries based on a multi-turn conversation against golden rewritten queries.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dEbCLVMtKvyGGKYruer65w.png" /><figcaption>JudgeIt Flow</figcaption></figure><h3>JudgeIt for RAG Evaluation</h3><p>One of the most common Generative AI frameworks is Retrieval-Augmented Generation (RAG). This framework uses an external knowledge base to provide context to LLM’s as they generate responses to user queries. As this external knowledge base scales, the variety of user queries increases. Therefore, it is critical to test the quality of RAG outputs at a batch level to ensure quality of output for this variety user queries.</p><p>A common method of evaluating RAG outputs is to build a list of user queries and golden answers, generate RAG outputs for each user query, and evaluate the generated text against the golden answers.</p><p>For example:<br>1. Question: “What is the capital of France?”<br>2. Golden Answer: “The capital of France is Paris”<br>3. Generated Answer: “Paris is the capital of France since medieval times.”</p><p>Although the texts aren’t exact string matches, the generated answer should evaluate to correct. This method of RAG evaluation often requires a human evaluator to understand and grade the similarity between the generated and golden text. As the knowledge base scales, this manual effort becomes inefficient. JudgeIt uses an LLM as a judge to more efficiently assess the similarity between these RAG outputs and the golden answers.</p><p>There are two types of evaluation currently available for RAG workflows:</p><ol><li>The RAG Answer Similarity judge uses a prompt to score similarity using a binary method, where 1 indicates strong similarity between the generated and golden text, and 0 indicates dissimilarity and contradictions.</li><li>The RAG Answer Rating judge uses a prompt to score similarity using a grading scale, where 1 indicates dissimilarity, 2 indicates partial similarity, and 3 indicates strong similarity.</li></ol><h3>Reliability</h3><p>To ensure reliability, JudgeIt has been tested against human evaluation for various RAG pipelines. This process involved building a dataset of user queries, golden answers, RAG answers, and human evaluations of the similarity between the RAG and golden answers.</p><h3>Getting Started</h3><p>The GitHub repository containing the assets for spinning up JudgeIt can be found <a href="https://github.com/ibm-ecosystem-engineering/JudgeIt-LLM-as-a-Judge">here</a>. There are two methods for spinning up JudgeIt:</p><ol><li>Framework: The repository contains python modules to run evaluations via cli. The Framework method takes input data in the form of excel or csv files for any of these evaluations.</li><li>Service-Oriented Architecture: This repository contains a REST API backend and NextJS frontend to run evaluations via a UI. The SOA method takes input data in the form of excel/csv files or single inputs for any of these evaluations.</li></ol><h3>Framework Method</h3><p>One method of using JudgeIt is through the JudgeIt Python framework. The framework contains Python modules for different types of LLM Judge evaluations.</p><h3>Prerequisites</h3><p>The following prerequisites are required to run the tester:</p><ol><li>Python3</li><li>IBM Cloud api key (this must be for the same cloud account that hosts your watsonx.ai instance)</li><li>watsonx.ai project id: watsonx.ai project’s Manage tab (Project -&gt; Manage -&gt; General -&gt; Details)</li><li>This project must be associated with a WML instance</li></ol><h3>Installation</h3><ol><li>Change directory into the JudgeIt Framework</li></ol><pre>cd JudgeIt-LLM-as-a-Judge/Framework</pre><p>2. Configure your parameters in config.ini. Below is a sample config file</p><pre>[Default]<br>home_dir = /&lt;home_directory&gt;/JudgeIt-LLM-as-a-Judge/<br>model_id = meta-llama/llama-3–70b-instruct<br>input_file_name = Framework/data/input/sample_rag_answer_similarity_input.xlsx<br>output_file_name = Framework/data/output/sample_rag_answer_similarity_output.xlsx<br>judge_type = rag_eval_answer_similarity<br>[WML_CRED]<br>wml_url = https://us-south.ml.cloud.ibm.com<br>api_key = &lt;ibm_cloud_api_key&gt;<br>project_id = &lt;watsonx.ai_project_id&gt;</pre><ol><li>home_dir : the path to the folder where you have downloaded the repository</li><li>model_id: the watsonx.ai model id that will be used for your LLM Judge</li></ol><p>3. input_file_name : a sample input file for each evaluation type is located in <a href="https://github.com/ibm-ecosystem-engineering/JudgeIt-LLM-as-a-Judge/blob/main/Framework/data/input">JudgeIt-LLM-as-a-Judge/Framework/data/input</a>. See the Configuring Your Input File for more details</p><p>4. output_file_name : specify the name of your output file</p><p>5. `judge_type`: specify the LLM Judge type. Possible values:rag_eval_answer_similarity , rag_eval_answer_rating</p><p>6. wml_url : you watsonx.ai url: <a href="https://&lt;your_region&gt;.ml.cloud.ibm.com/">https://&lt;your_region&gt;.ml.cloud.ibm.com</a></p><p>7. api_key : your IBM Cloud apikey: &lt;<a href="https://cloud.ibm.com/iam/apikeys&gt;">https://cloud.ibm.com/iam/apikeys&gt;</a></p><p>8. project_id : your watsonx.ai project id: watsonx.ai project’s Manage tab (Project -&gt; Manage -&gt; General -&gt; Details)</p><p>9. Run the following to evaluate.</p><pre>python main.py</pre><p>The output of the evaluation will be printed in your terminal, and a copy of the results will be saved to /JudgeIt-LLM-as-a-Judge/Framework/data/output</p><p>10. Run the following command to exit the python virtual environment:</p><pre>deactivate</pre><h3>Configuring your Input File</h3><p>Each type of LLM Judge will accept an excel/csv file as an input file. The repository contains a sample input file for each type of LLM Judge that you can copy, edit, and use to test. They are located at: <a href="https://github.com/ibm-ecosystem-engineering/JudgeIt-LLM-as-a-Judge/blob/main/Framework/data/input">JudgeIt-LLM-as-a-Judge/Framework/data/input</a></p><p>1. RAG Evaluation (Similarity): provide an excel/csv file with a `golden_text` column and `generated_text` column to compare</p><p>2. RAG Evaluation (Rating): provide an excel/csv file with a `golden_text` column and `generated_text` column to compare</p><p>Note: Your input files can contain additional columns than the ones specified above. These columns will have no effect on the LLM Judge and will be perserved in the output file.</p><h3>Understanding the Results</h3><p>The generated results will be saved to an excel/csv file at the location specified in your config file. Each file will contain all the columns provided in the input file.</p><p>1. For RAG Evaluation (Similarity), the LLM Judge will output a `Grade` and `Explanation`. A grade of 0 means the texts are dissimilar, while a grade of 1 means the texts are similar.</p><p>2. For RAG Evaluation (Rating), the LLM Judge will output a `Grade` and `Explanation`. A grade of 1 means the texts are dissimilar, a grade of 2 means the texts are partially similar, and a text of 3 means the texts are significantly similar.</p><h3>GUI Method using User Application</h3><p>Another method of using JudgeIt is through a Service-Oriented Architecture (SOA) based user application. You can refer to the following blog to understand this architecture and how to spin it up: <a href="https://medium.com/@himadricuet/b98f4213a8dc">https://medium.com/@himadricuet/b98f4213a8dc</a></p><h3>Summary</h3><p>JudgeIt offers an efficient and scalable solution for evaluating Generative AI pipelines. By automating the evaluation process with LLM judges, it removes the manual effort traditionally required for testing and provides reliable results across multiple AI tasks. By ensure accuracy and efficiency, JudgeIt can aid in building robust RAG pipelines. Its flexibility to integrate into different workflows, through both its framework and service-oriented architecture, makes it a valuable tool for anyone looking to optimize and validate their AI models.</p><p>Follow <a href="https://medium.com/towards-generative-ai">Towards Generative AI</a> for more content related to the latest in AI advancement.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d7c10b3f2eeb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/towards-generative-ai/judgeit-automating-rag-evaluation-using-llm-as-a-judge-d7c10b3f2eeb">JudgeIt: Automating RAG Evaluation using LLM-as-a-Judge</a> was originally published in <a href="https://medium.com/towards-generative-ai">Towards Generative AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>