<?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 Aravind Selvamani on Medium]]></title>
        <description><![CDATA[Stories by Aravind Selvamani on Medium]]></description>
        <link>https://medium.com/@aravind-selvamani?source=rss-c5257cc4755d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*_eXAr70wuhGHbhNj0t_qHg.jpeg</url>
            <title>Stories by Aravind Selvamani on Medium</title>
            <link>https://medium.com/@aravind-selvamani?source=rss-c5257cc4755d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 21:41:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aravind-selvamani/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[Spotting AI Hallucinations: A Guide to Accurate LLM Outputs — Blog 1]]></title>
            <link>https://medium.com/appliedengineering/spotting-ai-hallucinations-a-guide-to-accurate-llm-outputs-blog-1-5f3f10e6caca?source=rss-c5257cc4755d------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f3f10e6caca</guid>
            <category><![CDATA[llm-evaluation]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Aravind Selvamani]]></dc:creator>
            <pubDate>Mon, 28 Oct 2024 06:18:30 GMT</pubDate>
            <atom:updated>2024-11-18T05:22:34.558Z</atom:updated>
            <content:encoded><![CDATA[<h3>Spotting AI Hallucinations: A Guide to Accurate LLM Outputs — Blog 1</h3><p>Large Language Models (LLMs) have transformed our engagement with AI, delivering responses that often seem strikingly human. However, their outputs must be reliable for these models to be truly beneficial. A major hurdle in building this reliability is addressing hallucinations — situations where the AI produces inaccurate or unfounded information.</p><p>In this blog, we will delve into the concepts of <strong>Faithfulness</strong> and <strong>Factual</strong> <strong>hallucinations</strong>, explore their various types and real-world examples, and discuss strategies for identifying and mitigating these issues.</p><h3>What are Faithfulness Hallucinations?</h3><p>Faithfulness hallucinations occur when LLMs generate content that deviates from or isn’t supported by the given input, context, or source material.</p><p>This can include:</p><ul><li>Adding extraneous information not present in the original prompt or data.</li><li>Misinterpreting or incorrectly paraphrasing the provided information.</li><li>Omitting crucial details from the source, altering the meaning or intent.</li><li>Combining information from the input with unrelated knowledge in a way that misrepresents the original content.</li></ul><h3>Types of Faithfulness Hallucinations</h3><p>There are three types of faithfulness hallucinations:</p><ol><li>Instruction Inconsistency</li><li>Context Inconsistency</li><li>Logical Inconsistency</li></ol><h4>1. Instruction Inconsistency</h4><p>This occurs when an AI model fails to adhere to or misinterprets the user’s explicit instructions, resulting in responses that deviate from the requested task or format.</p><blockquote><strong>Example</strong>:</blockquote><blockquote><strong>Instruction</strong>: Translate the following English content to German. “What is the capital of India?”</blockquote><blockquote><strong>LLM Output</strong>: The capital of India is New Delhi.</blockquote><blockquote><strong>Explanation</strong>: The user explicitly asked for a translation, but the LLM chose to answer the question instead.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tHy9ZHCaN5G35M-9aIToxA.jpeg" /><figcaption>Instruction Inconsistency</figcaption></figure><h4>2. Context Inconsistency</h4><p>This arises when an AI model’s output contradicts or disregards the contextual information provided by the user, resulting in irrelevant or contradictory information.</p><blockquote><strong>Example</strong>:</blockquote><blockquote><strong>Instruction</strong>: Summarize the following content about the Great Wall of China. “The Great Wall of China stretches over 13,000 miles and was built to protect against invasions.”</blockquote><blockquote><strong>LLM Output</strong>: The Great Wall of China is a famous structure that stretches over 10,000 miles and was built for tourism.</blockquote><blockquote><strong>Explanation</strong>: The LLM’s summary is incorrect in context with the original content. The LLM should have mentioned the correct length of the Great Wall and its purpose for protection.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p7ieJa7JP4OXHvgl-BgA-A.jpeg" /><figcaption>Context Inconsistency</figcaption></figure><h4>3. Logical Inconsistency</h4><p>This emerges when an AI model’s output contains internal contradictions or flawed reasoning, despite potentially correct individual elements.</p><blockquote><strong>Example</strong>:</blockquote><blockquote><strong>Instruction</strong>: Solve the following problem. 4X + 7 = 19 step by step.</blockquote><blockquote><strong>LLM Output</strong>: Step 1: Subtract 7 from both sides. 4X = 12 Step 2: Divide both sides by 4 to get X = 2 Step 3: So the result is 2.</blockquote><blockquote><strong>Explanation</strong>: The first step correctly isolates the term with X to get 4X = 12, but the second step divides both sides by 4 and gets incorrectly X = 2. The correct answer is X = 3.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kc7NwzcKCUxw_nUNsmda3Q.jpeg" /><figcaption>Logical Inconsistency</figcaption></figure><h3>Detecting Faithfulness Hallucinations</h3><p>Faithfulness hallucination detection ensures that the model’s output aligns with the provided context without adding irrelevant or contradictory information.</p><p>Here is the list of possible ways to detect:</p><h4>1. Fact-Based Metrics</h4><p>One straightforward way to assess faithfulness is by checking how well the key facts in the generated content match the source content.</p><p><strong>Methods:</strong></p><p><strong>N-gram-Based Metrics</strong>: Metrics like <a href="https://en.wikipedia.org/wiki/ROUGE_(metric)"><strong>ROUGE</strong></a> measure the overlap of word sequences (n-grams) between the generated content and the source.</p><p><strong>Entity-Based Metrics</strong>: In summarization tasks, the accuracy of key entities (people, places, things) is critical. If a model fails to accurately reproduce these entities, the summary is considered unfaithful.</p><p><strong>Relation-Based Metrics</strong>: Even if the entities are correct, the relationships between them might be wrong. Metrics can check the accuracy of these relationships by comparing relation tuples (pairs of related entities) in the generated content with those in the source.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZYStrH5sfNX2FEbXJov7LQ.jpeg" /><figcaption>Fact-Based Metrics</figcaption></figure><h4>2. Classifier-Based Metrics</h4><p>Classifier-based metrics offer a more direct approach to assessing the faithfulness of content generated by LLMs. These metrics use classifiers trained on datasets that include both hallucinated and faithful content, as well as data from related tasks or synthetically generated data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5PwQCyGbLH390hEuOK8GTg.jpeg" /><figcaption>Classifier-Based Metrics</figcaption></figure><h4><strong>3. Question-Answering (QA) Based Metrics</strong></h4><p>QA-based metrics evaluate how well the content generated by a model aligns with its source information.</p><p><strong>How It Works:</strong></p><ul><li>Identify key pieces of information (target answers) from the model’s output.</li><li>Generate questions based on these target answers.</li><li>Use these questions to extract corresponding answers (source answers) from the original content or user context.</li><li>Evaluate the faithfulness of the model’s output by comparing how well the source and target answers match.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tYL9qGFcr2eUO8gGhd_0gA.jpeg" /><figcaption>Question-Answering (QA) Based Metrics</figcaption></figure><h4>4. Prompting-Based Metrics</h4><p>Prompting-based metrics leverage the strong instruction-following abilities of LLMs to automatically assess the accuracy and reliability of their own generated content.</p><p><strong>How It Works:</strong></p><ul><li>Provide LLMs with specific evaluation guidelines and input both the model-generated content and the original source content.</li><li>The LLM then evaluates the faithfulness of the generated content based on the provided guidelines.</li></ul><p>Stay tuned for our next blog about the <strong>Factual</strong> <strong>hallucinations</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f3f10e6caca" width="1" height="1" alt=""><hr><p><a href="https://medium.com/appliedengineering/spotting-ai-hallucinations-a-guide-to-accurate-llm-outputs-blog-1-5f3f10e6caca">Spotting AI Hallucinations: A Guide to Accurate LLM Outputs — Blog 1</a> was originally published in <a href="https://medium.com/appliedengineering">AppliedEngineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Streamline Your Release Deployment Process with Automation]]></title>
            <link>https://aravind-selvamani.medium.com/streamline-your-release-deployment-process-with-automation-7d8eb4c3865?source=rss-c5257cc4755d------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d8eb4c3865</guid>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[jenkins-pipeline]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[deployment]]></category>
            <dc:creator><![CDATA[Aravind Selvamani]]></dc:creator>
            <pubDate>Fri, 30 Jun 2023 17:32:39 GMT</pubDate>
            <atom:updated>2023-06-30T17:32:39.375Z</atom:updated>
            <content:encoded><![CDATA[<p>In this blog post, I will share my experience of streamlining our deployment process from manual to automaticManual Deployment Process</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yq8rWa3BdqTnvnDgnGfEcg.jpeg" /></figure><h3>Manual Deployment Process:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xBYij61BcH2oz2sgZFtXXA.jpeg" /><figcaption>Manual Release flow</figcaption></figure><p>The current manual release flow has several drawbacks:</p><ol><li><strong>Time-consuming</strong>: All the steps are performed manually, leading to inefficiencies.</li><li><strong>Increased dependencies</strong>: The release owner becomes a bottleneck due to the manual nature of the process.</li><li><strong>Reduced release frequency</strong>: Manual steps slow down the overall release frequency</li></ol><h3>Branching Strategy for Deployment Process:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CcukndF7oVq61z9ObJxnHg.jpeg" /></figure><p>There are advantages to implementing a branching strategy for the deployment process:</p><ol><li><strong>Faster merging</strong>: Developers can merge their pull requests (PRs) as soon as the development phase is completed.</li><li><strong>Reliable rollback flow</strong>: The branching strategy allows for easier and more reliable rollbacks if needed.</li></ol><h3>Automating the Deployment Process:</h3><p>To automate the deployment process, we utilized the following set of tools</p><ol><li>Slack</li><li>Jenkins (CI/CD tool)</li><li>Google Sheet</li><li>Google Calendar</li><li>GIT CLI</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0bp0_9B37-_JEasY5upLoA.jpeg" /></figure><p>Explanation of each phase in the automation process:</p><p>Step 1: A Jenkins job is set as a timing trigger, automatically executing the following steps at specified intervals.</p><p>Step 2: Fetch today’s release events from the calendar.</p><p>Step 3: If there is a staging deployment scheduled for today, post the release timeline for the team in Slack.</p><p>Step 4: Configure the deployment time in the Jenkins file based on the specified timing.</p><p>Step 5: Create a tag from the staging branch using the GIT CLI when the deployment time is reached.</p><p>Step 6: Trigger another job to deploy the staging environment using the created tag and required parameters.</p><p>Step 7: Once the previous job succeeds, trigger another Jenkins job for regression automation and post the automation report in the slack/ mail.</p><p>Step 8: (Manual step) Verify any failures that occur during regression testing.</p><p>Step 9: (Manual step) If any valid issues arise, follow the N+1 commit strategy mentioned in the branching strategy.</p><p>Step 10: Merge the staging branch into the master branch after completing the staging regression.</p><p>Step 11: Trigger another Jenkins job to deploy the production environment with the verified tag from staging.</p><p>Step 12: Trigger another Jenkins job to perform sanity checks in the production environment.</p><p>Step 13: (Manual step) Verify any failures that occur during the sanity checks and post the automation report in the slack/ mail.</p><p>Step 14: (Manual step) If any valid issues arise, follow the N+1 commit strategy mentioned in the branching strategy.</p><p>Step 15: Job ends</p><h3><strong>Conclusion</strong></h3><p>By implementing the above automation job, we have achieved a 2X speed improvement in the deployment process, significantly reducing the manual effort required from the release engineer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d8eb4c3865" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create Your First Atom and Sublime Plugin]]></title>
            <link>https://aravind-selvamani.medium.com/create-your-first-atom-and-sublime-plugin-f0e558b030f8?source=rss-c5257cc4755d------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0e558b030f8</guid>
            <category><![CDATA[package]]></category>
            <category><![CDATA[sublime]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[atom]]></category>
            <category><![CDATA[plugins]]></category>
            <dc:creator><![CDATA[Aravind Selvamani]]></dc:creator>
            <pubDate>Thu, 21 Nov 2019 07:22:05 GMT</pubDate>
            <atom:updated>2019-11-21T07:22:05.491Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uC7ZFoQiiaZqPU5HYKzVpQ.jpeg" /></figure><h3>Getting Started</h3><blockquote><strong>Installing Atom</strong></blockquote><p>Download Atom by following the instructions on the <a href="https://atom.io/">Atom website</a>. We will also need to install apm the <strong>Atom Package Manager</strong> command line tool.</p><ul><li>Go to Atom -&gt; Install Shell Commands in application menu.</li><li>Use apm -v in terminal to check whether the apm was installed correctly</li></ul><pre>apm  2.4.3<br>npm  6.2.0<br>node 10.2.1 x64<br>atom 1.41.0<br>python 2.7.10<br>git 2.19.0</pre><blockquote><strong>Installing Sublime</strong></blockquote><p>Download Sublime by following the instructions on the <a href="https://www.sublimetext.com/3">Sublime website</a>.</p><blockquote><strong>Installing git</strong></blockquote><p>Download and configure git by following the instruction on the <a href="https://www.atlassian.com/git/tutorials/install-git">git installation </a>.</p><h3><strong>Generating package for Atom</strong></h3><p>Let’s begin by creating new package using a utilities provided by Atom.</p><ul><li>Launch the Atom and press cmd+shift+p to open <strong>Command Palette</strong>.</li><li>Search for <strong>Generate Package</strong>. You will able to see a prompt where you can enter the name of the package (ex: user-package). Press enter to generate the starter package.</li></ul><p>Let’s try out the starter package.Open the Command Palette again and run the <em>“Window: Reload”</em> command. Run the package toggle command by navigating to Packages &gt; user-package &gt; Toggle. You should see a black box appear at the top of the screen. Hide it by running the command again.</p><p><strong>Implement your code change</strong></p><p>we’re going to change the toggle to Upper case text selected by the user.</p><p>Replace the below toggle function in lib &gt; user-package.js</p><pre>toggle() {<br>  let editor<br>  if (editor = atom.workspace.getActiveTextEditor()) {<br>    let selection = editor.getSelectedText()<br>    editor.insertText(selection.toUpperCase())<br>  }<br>}</pre><p>To test your changes . Reload Atom by running Window: Reload in the Command Palette. Type anything you like and select it with the cursor and right click and select “Toggle user-package” to run the code</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*763pbD6TPdxp5rqvvxInmQ.gif" /></figure><p>Refer the <a href="https://flight-manual.atom.io/api/v1.41.0/AtomEnvironment/">Atom Environment</a> to get more available properties for Atom editor</p><p>Now we are good to push our code in git.</p><ul><li>Create a repository in git and copy the repo_url</li><li>In terminal go to the package folder path and enter git init it will convert the local project to git project</li><li>To add a new remote use git remote add origin repo_url</li><li>Use git add . to adds all modified and new files in the current directory to the staging area , thus preparing them to be included in the next git commit.</li><li>To commit the changes use git commit -m commit_message</li><li>And Last don’t forgot to Push the changes to git use git push</li></ul><p><strong>Now we are ready for publish our package in atom</strong></p><p>Before you publish a package it is a good idea to check ahead of time if a package with the same name has already been published to <a href="https://atom.io/packages">atom.io packages</a></p><p>Now let’s review what the apm publish command does</p><ul><li>Updates the version field in the package.json file and commits it.</li></ul><pre>cd path-to-your-package<br>apm publish minor</pre><p>apm publish version-type</p><p>where version-type can be major, minor and patch.</p><p>The major option to the publish command tells apm to increment the first number of the version before publishing so the published version will be 1.0.0 and the Git tag created will be v1.0.0.</p><p>The minor option to the publish command tells apm to increment the second number of the version before publishing so the published version will be 0.1.0 and the Git tag created will be v0.1.0.</p><p>The patch option to the publish command tells apm to increment the third number of the version before publishing so the published version will be 0.0.1 and the Git tag created will be v0.0.1.</p><p>You can also run apm help publish to see all the available options and apm help to see all the other available commands.</p><p><strong>Install the published package</strong></p><p>Check whether the package is published successfully and install the package from the settings page use cmd + , to open Core settings page. Go to install tab and search the published package and install</p><blockquote>Yes we are Done for Atom</blockquote><h3>Generate Package for Sublime</h3><p>We can use the utility available in sublime to create a new package</p><ul><li>Go to Tools &gt; Developer &gt; New Plugin</li><li>Enter the plug name and save it. (To view all the available user plugins go to cd Library/Application\ Support/Sublime\Text\3/Packages/User and use ls command)</li></ul><p>Let’s try out our first package in Sublime , Open console using View &gt; Show Console . Press cmd + n to open new file and . Enter the below command in the console</p><pre>view.run_command(&#39;example&#39;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W4MOCFj3BEmJWtvtlKnF4g.png" /></figure><pre>import sublime<br>import sublime_plugin</pre><pre>class ExampleCommand(sublime_plugin.TextCommand):<br> def run(self, edit):<br>  self.view.insert(edit, 0, &quot;Hello, World!&quot;)</pre><p>The above code is the package which we ran now. You’ll notice that Sublime automatically parses the class name “ExampleCommand” as a command to execute since it has the text “Command” appended to the end. Once Sublime recognizes this, it strips the “command” string off of the end and takes the beginning as the actual name in lower case (ex: ExampleCommand = example). Multiple capitals will result in underscore separators between words. In my case, myPackage becomes my_package.</p><p>To make use of available API’s Refer <a href="https://www.sublimetext.com/docs/api-reference">Sublime API’s</a></p><p>Once you done with your custom change in the plugin push the code to git as we done for Atom.</p><p><strong>Run test cases</strong></p><p>We need to run the test cases for the plugin before we publish it.</p><ol><li>Install<strong> </strong>the<strong> </strong><a href="https://packagecontrol.io/packages/ChannelRepositoryTools">ChannelRepositoryTools</a><strong> </strong>package via Package Control.</li><li>Run the<strong> </strong><em>ChannelRepositoryTools: Test Default Channel</em> command from the command palette and ensure the tests pass.</li></ol><p><strong>Now we are good to publish our package</strong></p><ul><li>Fork <a href="https://github.com/wbond/package_control_channel">Sublime package repo</a></li><li>Add your package info to the proper JSON file in repository/ folder.</li></ul><p><em>Example of GitHub hosting:</em></p><pre>{<br>  &quot;name&quot;: &quot;Fd rspec snippets&quot;,<br>  &quot;details&quot;: &quot;<a href="https://github.com/aravindaakash/convert-to-it">https://github.com/aravindaakash/convert-to-it</a>&quot;,<br>  &quot;labels&quot;: [&quot;rspec&quot;, &quot;snippets&quot;],<br>  &quot;releases&quot;: [<br>    {<br>      &quot;sublime_text&quot;: &quot;*&quot;,<br>      &quot;tags&quot;: true<br>    }<br>  ]<br>}</pre><p>Since the package name is starting with letter F we need to add this JSON under repository/f.json</p><ul><li>Once u done with your changes click on <em>Pull Requests</em> in the right-hand nav and click <em>New Pull Request</em></li><li>Enter a description in the <em>Title</em> field.</li><li><em>Create pull request</em> against the master branch of <a href="https://github.com/wbond/package_control_channel">Sublime package repo</a>.</li></ul><p>The reviewers of Sublime will review your Pull request and merge it</p><p><strong>Install the published package</strong></p><p>But we can use the plugin before it merged with the master</p><ul><li>In a Web Browser, navigate to your plugin, copy the git url</li><li>In Sublime, Open Package Control</li><li>Select Package Control: Add Repository</li><li>At the bottom of the Sublime window, an input box will appear. Paste the URL <strong>AND REMOVE THE .GIT EXTENSION</strong> hit Enter.</li><li>Now the Repo has been added to Package Control, it’s not installed though</li><li>Select Package Control: Install Packages</li><li>Now you should be able to search and install the package that we published</li></ul><blockquote>We have published the package for both Atom and Sublime editor</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0e558b030f8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>