<?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 Sidharthmittal on Medium]]></title>
        <description><![CDATA[Stories by Sidharthmittal on Medium]]></description>
        <link>https://medium.com/@sidharthmittal25?source=rss-1d368922570f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*3bKXO4RGqw4nRt-3</url>
            <title>Stories by Sidharthmittal on Medium</title>
            <link>https://medium.com/@sidharthmittal25?source=rss-1d368922570f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 08:14:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sidharthmittal25/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[Implementing Context Relevancy Metric from Ragas]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@sidharthmittal25/implementing-context-relevancy-metric-from-ragas-382144098414?source=rss-1d368922570f------2"><img src="https://cdn-images-1.medium.com/max/936/1*ceUvTf2-g3ayuJyfkZcgUQ.png" width="936"></a></p><p class="medium-feed-snippet">So, imagine you&#x2019;re working on a RAG use case for a client. You want to make sure the generations are are spot-on, avoiding any irrelevant&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@sidharthmittal25/implementing-context-relevancy-metric-from-ragas-382144098414?source=rss-1d368922570f------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@sidharthmittal25/implementing-context-relevancy-metric-from-ragas-382144098414?source=rss-1d368922570f------2</link>
            <guid isPermaLink="false">https://medium.com/p/382144098414</guid>
            <category><![CDATA[llm-evaluation]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <dc:creator><![CDATA[Sidharthmittal]]></dc:creator>
            <pubDate>Fri, 05 Apr 2024 01:34:23 GMT</pubDate>
            <atom:updated>2024-04-05T01:34:23.974Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Deploying your apps on OpenShift in few simple steps]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@sidharthmittal25/deploying-your-apps-on-openshift-in-few-simple-steps-a686497e2e0a?source=rss-1d368922570f------2"><img src="https://cdn-images-1.medium.com/max/600/0*JQEuwtmm2DgLftHU" width="600"></a></p><p class="medium-feed-snippet">Joining the IBM client engineering team has been a rewarding experience for me, allowing me to engage in end-to-end ML lifecycle&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@sidharthmittal25/deploying-your-apps-on-openshift-in-few-simple-steps-a686497e2e0a?source=rss-1d368922570f------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@sidharthmittal25/deploying-your-apps-on-openshift-in-few-simple-steps-a686497e2e0a?source=rss-1d368922570f------2</link>
            <guid isPermaLink="false">https://medium.com/p/a686497e2e0a</guid>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[openshift]]></category>
            <category><![CDATA[deployment]]></category>
            <dc:creator><![CDATA[Sidharthmittal]]></dc:creator>
            <pubDate>Tue, 13 Feb 2024 08:46:05 GMT</pubDate>
            <atom:updated>2024-02-14T04:07:10.235Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Guide to using IBM Cloudant]]></title>
            <link>https://medium.com/@sidharthmittal25/guide-to-using-ibm-cloudant-6d43011602d1?source=rss-1d368922570f------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d43011602d1</guid>
            <category><![CDATA[cloudant]]></category>
            <category><![CDATA[ibm]]></category>
            <category><![CDATA[nosql-database]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Sidharthmittal]]></dc:creator>
            <pubDate>Wed, 24 Jan 2024 03:05:53 GMT</pubDate>
            <atom:updated>2024-01-24T03:29:03.974Z</atom:updated>
            <content:encoded><![CDATA[<p>In the course of a recent client project, I encountered the challenge of efficiently storing backend JSON files. Operating within the IBM Cloud environment, my preferred solution was IBM Cloudant. However, as it marked my inaugural use of the platform, I found it necessary to peruse the documentation for proper setup.</p><p>This tutorial is designed to elucidate the various steps involved in establishing your NoSQL database swiftly, accomplishing the task within a mere 5 minutes. For this tutorial, I will be using Pythong SDK for Cloudant interaction. However, please note that Cloudant supports multiple programming languages — for further details, please consult the official documentation. (link at the end of the article)</p><h3>Set-up a IBM Cloudant Instance.</h3><ol><li>Navigate to cloud.ibm.com</li><li>Register for a new cloud account if you do not have an existing one. This process is free and includes credits that can be utilized to access various IBM services.</li><li>Upon successful registration, locate the Cloudant service and opt for the Lite Plan. This plan is complimentary and offers 20 Reads/sec, 10 Writes/sec, 5 Global Queries/sec, and 1 GB Storage. Choose a region, specify an instance name, and proceed to click on the “create” button.</li><li>Access the interactive dashboard by navigating to the “manage” section and selecting “launch dashboard.”</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SeNwUAPBB8EcsXssaM4vog.png" /></figure><h3>Authentication</h3><p>To implement IAM authentication utilizing an API key, it is imperative to create a service credential containing the API key and URL for authentication purposes. This can be accomplished through the IBM Cloud portal under the “Service Credentials” section. Follow the steps below:</p><ol><li>Navigate to the IBM Cloud portal.</li><li>Under the relevant service, access the “Service Credentials” section.</li><li>Create a new service credential, which will generate an API key and URL.</li><li>Utilize the generated API key and URL for authentication in your application.</li></ol><p>This procedure ensures secure and streamlined IAM authentication for your IBM Cloud services.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_PrxlJmVb0SJayXse5ribA.png" /></figure><p>Once service credentials are created, you connect to the DB using following python code:</p><ol><li>Import libraries:</li></ol><pre>from ibmcloudant.cloudant_v1 import CloudantV1, Document, IndexDefinition, IndexField<br>from ibm_cloud_sdk_core.authenticators import IAMAuthenticator<br>import time<br>import requests<br>from requests.auth import HTTPBasicAuth</pre><p>2. Connect to DB:</p><pre>apikey = &quot;your api key&quot;<br>url = &quot;db url&quot;<br><br>#authenticate and connect<br>authenticator = IAMAuthenticator(apikey)<br>service = CloudantV1(authenticator=authenticator)<br>service.set_service_https://medium.com/url(url)</pre><h3>Set-up a new DB</h3><pre>response = service.put_database(db=dbname, partitioned=True).get_result()</pre><h3>Insert Documents</h3><p>Most of the time, we have multiple json documents, and since we have limited write requests with lite version (10 writes/second), you can use the following logic to write more than 10 documents.</p><pre>docNo = 1<br>for docJson in dataJson:<br>    if docNo%10 == 0:<br>        time.sleep(1)<br>    cloudDoc = Document.from_dict(docJson)<br>    cloudId = str(docJson[&#39;id&#39;])<br>    response = service.put_document(doc_id = cloudId , db=dbname, document=cloudDoc).get_result()<br>    # print(response)<br>    docNo = docNo + 1</pre><h3>Delete DB</h3><pre>response = service.delete_database(db=dbname).get_result()</pre><h3>Find and Update Documents in DB</h3><p>To retrieve a document using its unique document ID, the post_find method can be employed. Enhancing the efficiency of the search process can be achieved by specifying a pre-existing index.</p><pre>response = service.post_find(<br>        db=&#39;dbname&#39;,<br>        selector={&#39;_id&#39;: id},<br>        limit=3<br>        ).get_result()<br><br>searchedDoc = response[&#39;docs&#39;]</pre><p>Once you retrieve the document, you can update the required fields, and send it as a post request to update in the backend. For this, you would require document id and rev id.</p><pre>updatedDocument = Document.from_dict(searchedDoc[0])<br>docId = searchedDoc[0][&#39;_id&#39;]<br>revId = searchedDoc[0][&#39;_rev&#39;]<br>response = service.put_document(doc_id = docId , rev = revId, <br>db=&#39;dbname&#39;, document=updatedDocument).get_result()</pre><p>Hope this post helps with your next Cloudant Project. For more details on the SDK, you can refer this <a href="https://cloud.ibm.com/apidocs/cloudant">link</a>.</p><p>Should you encounter any errors or issues at any step, kindly notify me. I am more than willing to incorporate your feedback to enhance the quality of this guide! 🙂</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d43011602d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>