<?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 Sarmad Afzal on Medium]]></title>
        <description><![CDATA[Stories by Sarmad Afzal on Medium]]></description>
        <link>https://medium.com/@sarmadafzalj?source=rss-a6099fd6c5f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*NCQQua7xgExaC091AN5vOA@2x.jpeg</url>
            <title>Stories by Sarmad Afzal on Medium</title>
            <link>https://medium.com/@sarmadafzalj?source=rss-a6099fd6c5f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 10:40:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sarmadafzalj/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[RAG with RBAC]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@sarmadafzalj/rag-with-rbac-faf85549cbde?source=rss-a6099fd6c5f------2"><img src="https://cdn-images-1.medium.com/max/1024/1*2d59jBb4GOXxymBBDn9iPA.png" width="1024"></a></p><p class="medium-feed-snippet">A Scalable Approach to Securing Enterprise Knowledge</p><p class="medium-feed-link"><a href="https://medium.com/@sarmadafzalj/rag-with-rbac-faf85549cbde?source=rss-a6099fd6c5f------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@sarmadafzalj/rag-with-rbac-faf85549cbde?source=rss-a6099fd6c5f------2</link>
            <guid isPermaLink="false">https://medium.com/p/faf85549cbde</guid>
            <category><![CDATA[rbac]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[generative-ai-use-cases]]></category>
            <dc:creator><![CDATA[Sarmad Afzal]]></dc:creator>
            <pubDate>Mon, 09 Jun 2025 02:00:35 GMT</pubDate>
            <atom:updated>2025-06-09T02:00:35.821Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[A2A in Conjunction with MCP]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@sarmadafzalj/a2a-in-conjunction-with-mcp-7fb089281805?source=rss-a6099fd6c5f------2"><img src="https://cdn-images-1.medium.com/max/1024/0*E29-8I1Httw9eHX2" width="1024"></a></p><p class="medium-feed-snippet">How to use Google&#x2019;s Agent to Agent (A2A) protocol with Anthropic&#x2019;s Model Context Protocol (MCP)</p><p class="medium-feed-link"><a href="https://medium.com/@sarmadafzalj/a2a-in-conjunction-with-mcp-7fb089281805?source=rss-a6099fd6c5f------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@sarmadafzalj/a2a-in-conjunction-with-mcp-7fb089281805?source=rss-a6099fd6c5f------2</link>
            <guid isPermaLink="false">https://medium.com/p/7fb089281805</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[a2a]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Sarmad Afzal]]></dc:creator>
            <pubDate>Mon, 21 Apr 2025 02:57:19 GMT</pubDate>
            <atom:updated>2025-04-21T02:57:34.265Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Microsoft AI Foundry — Everything you need to know]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@sarmadafzalj/microsoft-ai-foundry-everything-you-need-to-know-17bc6d2a3afe?source=rss-a6099fd6c5f------2"><img src="https://cdn-images-1.medium.com/max/1196/0*S06XajS89tOxiZv8.jpg" width="1196"></a></p><p class="medium-feed-snippet">Microsoft Unveils Azure AI Foundry: A Unified Platform to Revolutionize Enterprise AI</p><p class="medium-feed-link"><a href="https://medium.com/@sarmadafzalj/microsoft-ai-foundry-everything-you-need-to-know-17bc6d2a3afe?source=rss-a6099fd6c5f------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@sarmadafzalj/microsoft-ai-foundry-everything-you-need-to-know-17bc6d2a3afe?source=rss-a6099fd6c5f------2</link>
            <guid isPermaLink="false">https://medium.com/p/17bc6d2a3afe</guid>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[co-pilot]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Sarmad Afzal]]></dc:creator>
            <pubDate>Tue, 19 Nov 2024 22:43:53 GMT</pubDate>
            <atom:updated>2024-11-19T22:43:53.762Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Predicting Well Borehole Sonic Log]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@sarmadafzalj/predicting-well-borehole-sonic-log-63a6f3f8077f?source=rss-a6099fd6c5f------2"><img src="https://cdn-images-1.medium.com/max/1100/0*s8rIrk4s0sUhcF66.jpg" width="1100"></a></p><p class="medium-feed-snippet">Using ML to predict Sonic DT borehole data in Oil and Gas wells</p><p class="medium-feed-link"><a href="https://medium.com/@sarmadafzalj/predicting-well-borehole-sonic-log-63a6f3f8077f?source=rss-a6099fd6c5f------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@sarmadafzalj/predicting-well-borehole-sonic-log-63a6f3f8077f?source=rss-a6099fd6c5f------2</link>
            <guid isPermaLink="false">https://medium.com/p/63a6f3f8077f</guid>
            <category><![CDATA[oil-and-gas]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[energy]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Sarmad Afzal]]></dc:creator>
            <pubDate>Mon, 12 Aug 2024 02:22:05 GMT</pubDate>
            <atom:updated>2024-08-12T02:22:05.846Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Python: Plot Composite Oil and Gas Petrophysical logs using Matplotlib]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@sarmadafzalj/python-plot-composite-oil-and-gas-petrophysical-logs-using-matplotlib-4ee28fc61ff8?source=rss-a6099fd6c5f------2"><img src="https://cdn-images-1.medium.com/max/1308/1*FXpH34s-w1-HfgDZIfpPPg.png" width="1308"></a></p><p class="medium-feed-snippet">How to plot composite wireline petrophysical log in python&#x200A;&#x2014;&#x200A;Resistivity, Caliper, Neutron Density logs.</p><p class="medium-feed-link"><a href="https://medium.com/@sarmadafzalj/python-plot-composite-oil-and-gas-petrophysical-logs-using-matplotlib-4ee28fc61ff8?source=rss-a6099fd6c5f------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@sarmadafzalj/python-plot-composite-oil-and-gas-petrophysical-logs-using-matplotlib-4ee28fc61ff8?source=rss-a6099fd6c5f------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ee28fc61ff8</guid>
            <category><![CDATA[oil-and-gas]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-visualization]]></category>
            <dc:creator><![CDATA[Sarmad Afzal]]></dc:creator>
            <pubDate>Thu, 07 Mar 2024 04:18:09 GMT</pubDate>
            <atom:updated>2024-03-07T04:30:41.385Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Python: Plotting Washouts and Under gauge from Caliper Well Wireline Log (Matplotlib)]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@sarmadafzalj/python-plotting-washouts-and-under-gauge-from-caliper-well-wireline-log-matplotlib-5798639d6db9?source=rss-a6099fd6c5f------2"><img src="https://cdn-images-1.medium.com/max/687/1*xs2eoug1k8Lo0nByMRdr8g.png" width="687"></a></p><p class="medium-feed-snippet">How to plot and shade wirleine caliper log for borehole washouts and undergauge well profile</p><p class="medium-feed-link"><a href="https://medium.com/@sarmadafzalj/python-plotting-washouts-and-under-gauge-from-caliper-well-wireline-log-matplotlib-5798639d6db9?source=rss-a6099fd6c5f------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@sarmadafzalj/python-plotting-washouts-and-under-gauge-from-caliper-well-wireline-log-matplotlib-5798639d6db9?source=rss-a6099fd6c5f------2</link>
            <guid isPermaLink="false">https://medium.com/p/5798639d6db9</guid>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[oil-and-gas]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[matplotlib]]></category>
            <dc:creator><![CDATA[Sarmad Afzal]]></dc:creator>
            <pubDate>Sun, 03 Mar 2024 02:01:07 GMT</pubDate>
            <atom:updated>2024-03-03T02:01:07.169Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Python: Plotting wireline oil & gas well logs]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@sarmadafzalj/python-plotting-wireline-oil-gas-well-logs-8fb3fcdc4c0c?source=rss-a6099fd6c5f------2"><img src="https://cdn-images-1.medium.com/max/1540/1*QzceCnQFBzn6pIqSPjq-TA.png" width="1540"></a></p><p class="medium-feed-snippet">Plot drilling and wireline petrophysical oil and gas well logs using Matplotlib and Plotly in Python</p><p class="medium-feed-link"><a href="https://medium.com/@sarmadafzalj/python-plotting-wireline-oil-gas-well-logs-8fb3fcdc4c0c?source=rss-a6099fd6c5f------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@sarmadafzalj/python-plotting-wireline-oil-gas-well-logs-8fb3fcdc4c0c?source=rss-a6099fd6c5f------2</link>
            <guid isPermaLink="false">https://medium.com/p/8fb3fcdc4c0c</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[oil]]></category>
            <category><![CDATA[oil-and-gas]]></category>
            <category><![CDATA[data-visualization]]></category>
            <dc:creator><![CDATA[Sarmad Afzal]]></dc:creator>
            <pubDate>Sat, 24 Feb 2024 08:54:03 GMT</pubDate>
            <atom:updated>2024-02-24T08:54:03.904Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Plotting Oil and Gas Well Borehole in 3D — Python]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@sarmadafzalj/plotting-oil-and-gas-well-borehole-in-3d-python-28644fe7c9fd?source=rss-a6099fd6c5f------2"><img src="https://cdn-images-1.medium.com/max/600/1*K-kAwHvXekZrPLPmsBzH3g.gif" width="600"></a></p><p class="medium-feed-snippet">Learn how to plot oil and gas well borehole profiles in 3D using python</p><p class="medium-feed-link"><a href="https://medium.com/@sarmadafzalj/plotting-oil-and-gas-well-borehole-in-3d-python-28644fe7c9fd?source=rss-a6099fd6c5f------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@sarmadafzalj/plotting-oil-and-gas-well-borehole-in-3d-python-28644fe7c9fd?source=rss-a6099fd6c5f------2</link>
            <guid isPermaLink="false">https://medium.com/p/28644fe7c9fd</guid>
            <category><![CDATA[data-science-projects]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[oil-and-gas]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[plotly]]></category>
            <dc:creator><![CDATA[Sarmad Afzal]]></dc:creator>
            <pubDate>Thu, 22 Feb 2024 05:06:03 GMT</pubDate>
            <atom:updated>2024-03-07T04:19:34.571Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Visualize Vector Embeddings in a RAG System]]></title>
            <link>https://medium.com/@sarmadafzalj/visualize-vector-embeddings-in-a-rag-system-89d0c44a3be4?source=rss-a6099fd6c5f------2</link>
            <guid isPermaLink="false">https://medium.com/p/89d0c44a3be4</guid>
            <category><![CDATA[visualization]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[retrieval-augmented]]></category>
            <category><![CDATA[vector]]></category>
            <category><![CDATA[vector-database]]></category>
            <dc:creator><![CDATA[Sarmad Afzal]]></dc:creator>
            <pubDate>Sun, 18 Feb 2024 06:00:41 GMT</pubDate>
            <atom:updated>2024-02-18T06:00:41.134Z</atom:updated>
            <content:encoded><![CDATA[<p><em>These are not molecules but vector embeddings in vector store of your RAG.</em></p><p>In this article you will learn how to parse a pdf using Llama Index, create embeddings with models like OpenAI Ada then upload them into vector database which is Pinecone in our case and finally visualizing all vectors along with question vector in a 3D space.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*coDRYm3BvuZqBPdKNzOcrw.png" /><figcaption>Question and Top 3 Relevant Vectors in RAG Embeddings Vector Space</figcaption></figure><p><a href="https://youtube.com/shorts/IVmbKi4vfcM">Visualize Vector Embeddings #chatgpt #generativeai #llm #vectorembeddings #vectordatabase #plotly</a></p><blockquote>What are embeddings?</blockquote><p>ML models or LLMs does not understand text data so the data needs to be encoded into numbers. In simple terms, embeddings means converting your textual data into numbers which are then understandable by models. There are several method to encode text data into numbers like TFiDF, BOW, Word2Vec etc. However, these deep neural networks like OpenAI ada or Cohere Embeddings not just encode but ensure that while encoding the semantically similar text is kept together in a high dimensional vector space.</p><p>Each model has its own dimensions, for example Ada v2 has 1536 which means that a piece of text is converted into 1535 meaningful real numbers.</p><blockquote>Lets get the hands dirty</blockquote><h4>Create a Pinecone account</h4><p>You will have to create an account on Pinecone which will be your vector database. It provides free tier which allows you to create a single index and that should be enough to perform this task.</p><p>Here is the link: <a href="https://login.pinecone.io/">https://login.pinecone.io</a></p><p>Once you have signed up, you need to create or use an existing API that will be used in the code below.</p><pre>#setting pinecone client<br>from pinecone import Pinecone, PodSpec<br>pc = Pinecone(api_key=&#39;&lt;Your PINECONE API KEY&gt;&#39;)<br><br>#create a pinecone index<br>#we will use openai ada 02 embeddings model which has 1536 dimensions<br>pc.create_index(<br>name=&#39;visualizeindex&#39;, <br>dimension=1536, <br>metric=&quot;cosine&quot;, <br>spec=PodSpec(environment=&quot;gcp-starter&quot;)<br>)<br><br>pc.describe_index(&#39;visualizeindex&#39;)</pre><p>So far we have created a Pinecone index with name <em>visualizeindex </em>and have mentioned 1536 as dimension which belong to OpenAI Ada-02 embeddings model. There are several method which finds similarity between our question and documents in the vector database, some of them are:</p><p><strong>Cosine Similarity</strong>: It calculates the cosine of the angle between two vectors. We will use this method in our example.</p><p><strong>Euclidean Distance: </strong>It measures the straight-line distance between two vectors in the multidimensional space</p><p><strong>Manhattan Distance (L1 Distance): </strong>This calculates the sum of the absolute differences between corresponding elements of two vectors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*xogO6KoQGJCisX4TWOkhvA.png" /><figcaption>based on <a href="https://towardsdatascience.com/9-distance-measures-in-data-science-918109d069fa">M. Grootendorst</a></figcaption></figure><h4>Parse, Chunk, Embed, Load a PDF into Pinecone</h4><p>Now using Llama-Index we will load pdf files and then chunk them into pages, this content will then be converted into embedding vectors with each vector holding semantic embeddings of each page text.</p><p>Here we will be using Llama-Index wrapper from Pinecone Vectorstore and with OpenAI embeddings model and for that you need to get an api key and can be generated here: <a href="https://platform.openai.com/">https://platform.openai.com/</a></p><pre>from llama_index.core import VectorStoreIndex, SimpleDirectoryReader<br>from llama_index.vector_stores.pinecone import PineconeVectorStore<br>from llama_index.core import StorageContext<br>from llama_index.core import ServiceContext<br>from llama_index.llms.openai import OpenAI<br>from llama_index.embeddings.openai import OpenAIEmbedding<br>from openai import OpenAI<br><br>openai = OpenAI(api_key=&quot;&lt;Your OpenAI API Key&gt;&quot;)<br><br>#loading documents<br>documents = SimpleDirectoryReader(&quot;Data/&quot;).load_data()<br>documents[0:5]<br><br>#defining embeddings models from OpenAI<br>embed_model = OpenAIEmbedding( model = &quot;text-embedding-ada-002&quot;, api_key = &quot;&lt;Your OpenAI API Key&gt;&quot;)<br><br>#now creating embeddings and loading into Pinecone Index<br>vector_store = PineconeVectorStore(pinecone_index=pinecone_index)<br>storage_context = StorageContext.from_defaults(vector_store=vector_store)<br>service_context = ServiceContext.from_defaults(llm=None, embed_model = embed_model)<br>index = VectorStoreIndex.from_documents(<br>    documents, storage_context=storage_context, service_context=service_context<br>)</pre><p>Now we are all set to ask question from our vector store which has our PDF well parsed and embedded inside Pinecone.</p><h4>Ask a Question and perform Semantic Search</h4><p>Let’s say we want to ask a question: “<em>Tell me the difference between Mlops and Data engineering</em>” which in this case is relevant to the PDF I used. First thing we need is to convert this question into the embeddings and mind you, this must be the same embeddings model.</p><pre>#embed the question for semantic search<br>response = openai.embeddings.create(<br>    input=&quot;What is difference between data engineering and Mlops?&quot;,<br>    model=&quot;text-embedding-ada-002&quot;<br>)<br><br>query_emb = response.data[0].embedding<br>print(&quot;Showing only first 5 dimensions of the query embedding:&quot;)<br>print(query_emb[0:5])</pre><p>We have embeddings of our question now, we will fetch all the documents and their similarity scores as well. To visualize we are fetching all vectors (1068) but in a RAG pipeline you would always want to have 3–10 most similar vectors which is defined by top_k parameter.</p><pre>#now we will find the similar documents<br>search = pinecone_index.query(<br>  vector=query_emb,<br>  top_k=1068,<br>  include_values=True<br>  )<br><br>#get embeddings from response<br>embs = []<br>for i in range(0,1068):<br>    embs.append(search.matches[i].values)</pre><h4>Dimensionality Reduction and Visualization</h4><p>We have all our vectors ranked in order of similarity score, we will stack our question vector as well at index 0 for plotting.</p><pre>#adding the question vector<br>embs.insert(0,query_emb)</pre><p>Now we will using t-SNE which is a dimensionality reduction and visualization technique for highly dimensional data. We will first reduce dimensions from 1536 to 3.</p><pre>import numpy as np<br>from sklearn.manifold import TSNE<br><br>n_components = 3 #3D<br>embs = np.array(embs) #converting to numpy array<br><br>tsne = TSNE(n_components=n_components, random_state=42, perplexity=5)<br>reduced_vectors = tsne.fit_transform(embs)<br>reduced_vectors[0:10]</pre><p>Here we have the reduced vectors in 3D and can now be visualized using Plotly.</p><pre>import plotly.graph_objs as go<br>from plotly.subplots import make_subplots<br>import plotly.io as pio<br><br># Create a 3D scatter plot<br>scatter_plot = go.Scatter3d(<br>    x=reduced_vectors[:, 0],<br>    y=reduced_vectors[:, 1],<br>    z=reduced_vectors[:, 2],<br>    mode=&#39;markers&#39;,<br>    marker=dict(size=5, color=&#39;grey&#39;, opacity=0.5, line=dict(color=&#39;lightgray&#39;, width=1)),<br>    text=[f&quot;Point {i}&quot; for i in range(len(reduced_vectors))]<br>)<br><br># Highlight the first point with a different color<br>highlighted_point = go.Scatter3d(<br>    x=[reduced_vectors[0, 0]],<br>    y=[reduced_vectors[0, 1]],<br>    z=[reduced_vectors[0, 2]],<br>    mode=&#39;markers&#39;,<br>    marker=dict(size=8, color=&#39;red&#39;, opacity=0.8, line=dict(color=&#39;lightgray&#39;, width=1)),<br>    text=[&quot;Question&quot;]<br>    <br>)<br><br>blue_points = go.Scatter3d(<br>    x=reduced_vectors[1:4, 0],<br>    y=reduced_vectors[1:4, 1],<br>    z=reduced_vectors[1:4, 2],<br>    mode=&#39;markers&#39;,<br>    marker=dict(size=8, color=&#39;blue&#39;, opacity=0.8,  line=dict(color=&#39;black&#39;, width=1)),<br>    text=[&quot;Top 1 Document&quot;,&quot;Top 2 Document&quot;,&quot;Top 3 Document&quot;]<br>)<br><br># Create the layout for the plot<br>layout = go.Layout(<br>    scene=dict(<br>        xaxis=dict(title=&#39;X&#39;),<br>        yaxis=dict(title=&#39;Y&#39;),<br>        zaxis=dict(title=&#39;Z&#39;),<br>    ),<br>    title=f&#39;3D Representation after t-SNE (Perplexity=5)&#39;<br>)<br><br><br>fig = make_subplots(rows=1, cols=1, specs=[[{&#39;type&#39;: &#39;scatter3d&#39;}]])<br><br># Add the scatter plots to the Figure<br>fig.add_trace(scatter_plot)<br>fig.add_trace(highlighted_point)<br>fig.add_trace(blue_points)<br><br>fig.update_layout(layout)<br><br>pio.write_html(fig, &#39;interactive_plot.html&#39;)<br>fig.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*pf2FiHd4a1LhyekNUli8oA.png" /><figcaption>Visualizing Vector Embeddings</figcaption></figure><p>and that’s that! 🥂</p><p>For those interested, here is Github repo link: <a href="https://github.com/sarmadafzalj/Vector-Embeddings-Visualization">https://github.com/sarmadafzalj/Vector-Embeddings-Visualization</a></p><p>Connect with me: <a href="https://linkedin.com/in/sarmadafzal">https://linkedin.com/in/sarmadafzal</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=89d0c44a3be4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[RAG v Fine-tuning: Why not harness the power of both!]]></title>
            <link>https://medium.com/@sarmadafzalj/rag-v-fine-tuning-why-not-harness-the-power-of-both-91c49a4744da?source=rss-a6099fd6c5f------2</link>
            <guid isPermaLink="false">https://medium.com/p/91c49a4744da</guid>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[retrieval-augmented]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[fine-tuning]]></category>
            <category><![CDATA[rags]]></category>
            <dc:creator><![CDATA[Sarmad Afzal]]></dc:creator>
            <pubDate>Sun, 11 Feb 2024 06:58:41 GMT</pubDate>
            <atom:updated>2024-02-11T07:10:36.041Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Feature | Infer | Finetune — 3Pipeline Architecture for LLM Based RAG Application on Tech News Architecture</strong></p><p>In this article we will walk through a project which will employ smaller model like llama2 7B for RAG and an expert like GPT-4 for curating Q/A dataset which will be used for finetuning and when our compact model is good enough in understanding the tech jargon, we will phase GPT4 out (let’s say 6 months or 6 fine-tuning cycles).</p><p>So everyday at 9AM we will run the ETL to extract latest articles, transform them and load into a vector database. Query this data on a chatbot interface and periodically train the LLM using Q/A dataset.</p><blockquote><strong>Let the Big Boss teach the newbies ;)</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*vYSUv-7ewBU1PXSf5FVJ7g.jpeg" /></figure><blockquote><strong>What is RAG? (Retrieval Augmented Generation)</strong></blockquote><p>LLMs have limited knowledge because they can only speak of what they have seen during the pre-training. RAG is a concept of using an instruct-tune LLM to answer questions from data which is not from model memory (technically model weights) but from some context which is given in the prompt. Since there are token limitations in for one prompt, we give it limited and most relevant text to give answer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/995/1*DyHk34yj267S7BQKKN1Nng.png" /><figcaption>The LLM does not know when it is not trained on!</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/926/1*6NskA54ZFZ1_vLQ18fSGWw.png" /><figcaption>This is RAG — You gave it a context to give you a rephrased answer</figcaption></figure><blockquote><strong>What is Fine-tuning?</strong></blockquote><p>Fine-tuning is process of further training and adjust a pre-trained LLM on a specific task (<strong>technology </strong>in our case). It involved running over the neural network again and again but only with specific training dataset to update its weights.</p><p>Finetuning is not something that will be done every other day as it has high computation cost and take hours before reaching an optimal performance level. While RAG is very useful when you have frequent new data points but it is limited to the relevance of given context due to prompt tokens cap.</p><p>Therefore, we will leverage finetuning to make our LLM an expert of technology domain while keeping RAG for answering from latest articles.</p><blockquote><strong>Tech-Stack: Tools you need to run is project</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d7mREFRS_DNF1Rqst0loGA.png" /><figcaption>Tech Stack for the project</figcaption></figure><blockquote><strong>Lets now buckle-up for technical details and show things in action!</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v6vaXvyoD4O43ucuk4tGzw.png" /><figcaption>3 Pipeline Architecture for LLM-based Apps</figcaption></figure><p>The project involves three pipelines</p><ul><li><strong>Feature Pipeline</strong>: It will run as scheduler everyday 9AM. It contains ETL to grab news articles from Quantexa API then using Vectara it chunks, embeds, and loads in the vector-store. Second part of this is to use a GPT-4 to generate 5 questions and answer pair from each article and save it onto Beam storage volume as a csv file.</li><li><strong>Inference Pipeline</strong>: On a Streamlit chat UI, user can ask questions which goes as an input input for Vectara to embed and search relevant chunks from all the news articles by cosine similarity. Llama2 7B is hosted for inference on Beam as a restful API which is then called to synthesize the final response.</li><li><strong>Fine-tuning Pipeline</strong>: This is again deployed as a scheduler on Beam to be ran monthly. It uses PEFT LoRA and huggingface transformer library for finetuning the LLM. Parameters and prompter is same as used for Alpaca.</li></ul><h3><strong>Feature Pipeline App</strong></h3><p><strong>Step 1</strong>: Create a file called load.py — You need to have credentials from <strong>Quantex</strong>, you can signup here: <a href="https://aylien.com/news-api-signup">https://aylien.com/news-api-signup</a> and get free 14 days trial</p><pre>import requests, os, time, datetime<br>from dotenv import load_dotenv<br>load_dotenv()<br><br>#credentials for the Aylien News API<br>username = os.environ[&quot;AYLIEN_USERNAME&quot;]<br>password = os.environ[&quot;AYLIEN_PASSWORD&quot;]<br>AppID = os.environ[&quot;AYLIEN_APPID&quot;]<br><br>def extract():<br> token = requests.post(&quot;https://api.aylien.com/v1/oauth/token&quot;, auth=(username, password), data={&quot;grant_type&quot;: &quot;password&quot;}).json()[&quot;access_token&quot;]<br> print(token)<br> headers = {&quot;Authorization&quot;: &quot;Bearer {}&quot;.format(token), &quot;AppId&quot;:&quot;d1ae1185&quot;}<br> <br> url = &#39;https://api.aylien.com/v6/news/stories?aql=industries:({{id:in.tech}}) AND language:(en) AND text: (tech, google, openai, microsoft, meta, apple, amazon) AND categories:({{taxonomy:aylien AND id:ay.appsci}}) AND sentiment.title.polarity:(negative neutral positive)&amp;cursor=*&amp;published_at.end=NOW&amp;published_at.start=NOW-1DAYS/DAY&#39;<br> <br> response = requests.get(url, headers=headers)<br> data = response.json()<br> print(data)<br> stories = data[&#39;stories&#39;]<br> combined_text_list = []<br> for story in stories:<br>  body = story[&#39;body&#39;]<br>  combined_text_list.append(body)<br>            <br> return combined_text_list</pre><p><strong>Step 2</strong>: Create a file called transform.py — You need Vectara and Beam and OpenAI accounts. We will load the embeddings into Vectara and save QA dataset on Beam storage.</p><p><strong>Vectara </strong>has a free version: <a href="https://console.vectara.com/signup">https://console.vectara.com/signup</a><br><strong>Beam </strong>gives free first 10 hours — Should be enough unless you try finetuning: <a href="https://www.beam.cloud/login">https://www.beam.cloud/logi</a>n<br><strong>OpenAI</strong>: Everyone Knows ;)</p><pre>import requests, os, time, datetime<br>from dotenv import load_dotenv<br>load_dotenv()<br><br>import pandas as pd<br>import numpy as np<br>import ast<br><br>from llama_index import Document<br><br>import openai<br>from openai import OpenAI<br>openai.api_key = os.environ[&quot;OPENAI_API&quot;]<br><br>def transform(articles):<br>    current_datetime = datetime.datetime.now()<br>    formatted_datetime = current_datetime.strftime(&quot;%Y-%b-%d&quot;)<br><br>    documents = [Document(text=t, metadata={&quot;Article_Date&quot;: formatted_datetime}) for t in articles]<br><br>    #Transform Step2: extracting questions from articles<br>    system_prompt = &quot;&quot;&quot;<br>    You are an AI Based Question Generator. Given the following Article, please generate 5 questions.<br>    Questions should be specific to the article and should be answerable from the article.<br>                                                                            <br>    Give response in the form of list. See the example below for formatting response:<br>                                        <br>    example: [&quot;What is the name of the company?&quot;, &quot;What is the name of the CEO?&quot;]<br><br>    Make sure that it is &quot;&quot; and NOT &#39;&#39;.<br>    Do not write anything other than the questions wapped in [] and seperated by ,.                                     <br>    &quot;&quot;&quot;<br><br>    questions_df = pd.DataFrame(columns = [&#39;Questions&#39;, &#39;Answers&#39;, &#39;Finetuned&#39;])<br>    for article in articles:<br>        client = OpenAI(api_key=os.environ[&quot;OPENAI_API&quot;])<br><br>        completion = client.chat.completions.create(<br>            model=&quot;gpt-3.5-turbo-0125&quot;,<br>            messages=[<br>            {&quot;role&quot;: &quot;system&quot;, &quot;content&quot;: system_prompt},<br>            {&quot;role&quot;: &quot;user&quot;, &quot;content&quot;: article}<br>            ]<br>        )<br><br>        qns = completion.choices[0].message.content<br>        qns = ast.literal_eval(qns)<br>        for q in qns:<br>            questions_df.loc[len(questions_df)] = [q, 0, 0]<br><br>    return questions_df, documents</pre><p><strong>Step 3</strong>: Create a file called load.py</p><pre>import requests, os, time, datetime<br>from dotenv import load_dotenv<br>import pandas as pd<br>import numpy as np<br>load_dotenv()<br><br>from llama_index.indices import VectaraIndex<br>from llama_index import Document<br><br>VECTARA_CUSTOMER_ID=os.environ[&quot;VECTARA_CUSTOMER_ID&quot;] <br>VECTARA_CORPUS_ID=os.environ[&quot;VECTARA_CORPUS_ID&quot;] <br>VECTARA_API_KEY=os.environ[&quot;VECTARA_API_KEY&quot;] <br>os.environ[&#39;OPENAI_API_KEY&#39;] = os.environ[&quot;OPENAI_API&quot;]<br><br>index = VectaraIndex(vectara_api_key=VECTARA_API_KEY, vectara_customer_id=VECTARA_CUSTOMER_ID, vectara_corpus_id=VECTARA_CORPUS_ID)<br>query_engine = index.as_query_engine()<br><br>def get_gpt_ans(question):<br>    response = query_engine.query(question)<br>    return response<br><br>def load(documents, df):<br>    index.add_documents(documents)<br>    df[&#39;Answers&#39;] = df[&#39;Questions&#39;].apply(lambda question: get_gpt_ans(question))<br>    return df</pre><p><strong>Step 4:</strong> Finally create a Scheduler with app.py to wrap the 3 functions and then deploy and run on Beam</p><p>Before you make an deployment, make sure you have installed Beam successfully: <a href="https://docs.beam.cloud/getting-started/installation">https://docs.beam.cloud/getting-started/installation</a></p><pre>from beam import App, Volume, Runtime, Image<br>from load import load<br>import logging, datetime<br>from transform import transform<br>from extract import extract<br>import pandas as pd<br>import numpy as np<br>import os, time<br>volume_path = &quot;./finetuning_data&quot;<br><br>app = App(<br>    name=&quot;FeaturePipeline&quot;,<br>     runtime=Runtime(<br>        cpu=2,<br>        memory=&quot;4Gi&quot;,<br>        image=Image(<br>            python_version=&quot;python3.10&quot;,<br>            python_packages=&quot;requirements.txt&quot;,<br>        ),<br>    ),<br>    volumes=[<br>        Volume(<br>            name=&quot;finetuning_data&quot;,<br>            path=volume_path,<br>        )<br>    ],<br>)<br><br><br>@app.schedule(when=&quot;0 9 * * *&quot;)<br>def FeaturePipeline():<br>    try:<br>        articles = extract()<br>        questions_df, documents = transform(articles)<br>        df = load(documents, questions_df)<br>        current_datetime = datetime.datetime.now()<br>        csv_data = df.to_csv(index=False)<br>        formatted_datetime = current_datetime.strftime(&quot;%Y-%b-%d %H:%M:%S&quot;)<br>        with open(f&quot;{volume_path}/finetune_data_{formatted_datetime}.csv&quot;, &quot;w&quot;) as f:<br>            f.write(csv_data)<br>    except Exception as e:<br>        logging.error(&quot;Error: %s&quot;, e)<br>        print(&quot;Error: &quot;, e)</pre><p>Try running this app: <strong><em>beam run app.py:FeaturePipeline<br></em></strong>For deployment:<strong><em> beam deploy app.py:FeaturePipeline</em></strong></p><p>So far we are able to extract our features or data by extracting new articles, transforming them into embeddings and Q/A dataset with GPT-4 and loading them into Vectara vector-store and Beam storage respectively and once deployed it will be triggered everyday at 9AM.</p><h3>Inference Pipeline App</h3><p><strong>Step 1</strong>: Deploy Llama2 as rest api for inference. Create app.py in a separate folder called llama2 and make it your current directory. Use the following code. You will need Hugging Face API key and can be found here: <a href="https://huggingface.co/pricing">https://huggingface.co/pricing</a></p><pre>from beam import App, Runtime, Image, Output, Volume, VolumeType<br><br>import os<br>import torch<br>from transformers import (<br>    GenerationConfig,<br>    LlamaForCausalLM,<br>    LlamaTokenizer,<br>)<br><br>base_model = &quot;meta-llama/Llama-2-13b-chat-hf&quot;<br><br>app = App(<br>    name=&quot;llama2&quot;,<br>    runtime=Runtime(<br>        cpu=1,<br>        memory=&quot;32Gi&quot;,<br>        gpu=&quot;A10G&quot;,<br>        image=Image(<br>            python_packages=[<br>                &quot;accelerate&quot;,<br>                &quot;transformers&quot;,<br>                &quot;torch&quot;,<br>                &quot;sentencepiece&quot;,<br>                &quot;protobuf&quot;,<br>                &quot;bitsandbytes&quot;,<br>                &quot;peft&quot;<br>            ],<br>        ),<br>    ),<br>    volumes=[<br>        Volume(<br>            name=&quot;model_weights&quot;,<br>            path=&quot;./model_weights&quot;,<br>            volume_type=VolumeType.Persistent,<br>        )<br>    ],<br>)<br><br><br>@app.rest_api()<br>def generate(**inputs):<br>    prompt = inputs[&quot;prompt&quot;]<br><br>    tokenizer = LlamaTokenizer.from_pretrained(<br>        base_model,<br>        cache_dir=&quot;./model_weights&quot;,<br>        use_auth_token=os.environ[&quot;HUGGINGFACE_API_KEY&quot;],<br>    )<br>    model = LlamaForCausalLM.from_pretrained(<br>        base_model,<br>        torch_dtype=torch.float16,<br>        device_map=&quot;auto&quot;,<br>        cache_dir=&quot;./model_weights&quot;,<br>        load_in_4bit=True,<br>        use_auth_token=os.environ[&quot;HUGGINGFACE_API_KEY&quot;],<br>    )<br><br>    tokenizer.bos_token_id = 1<br>    inputs = tokenizer(prompt, return_tensors=&quot;pt&quot;)<br>    input_ids = inputs[&quot;input_ids&quot;].to(&quot;cuda&quot;)<br><br>    generation_config = GenerationConfig(<br>        temperature=0.1,<br>        top_p=0.75,<br>        top_k=40,<br>        num_beams=4,<br>        max_length=512,<br>    )<br><br>    with torch.no_grad():<br>        generation_output = model.generate(<br>            input_ids=input_ids,<br>            generation_config=generation_config,<br>            return_dict_in_generate=True,<br>            output_scores=True,<br>            max_new_tokens=128,<br>            early_stopping=True,<br>        )<br><br>    s = generation_output.sequences[0]<br>    decoded_output = tokenizer.decode(s, skip_special_tokens=True).strip()<br><br>    print(decoded_output)<br><br>    return {&quot;answer&quot;: decoded_output}</pre><p>Deploy this on Beam: <strong><em>beam deploy app.py:generate</em></strong></p><p><strong>Step 2</strong>: Create a new file inference.py This will use llama-index for RAG on stored articles in Vecatara and give a user interface on streamlit.<br>Here I am calling the deployed llama2 model from Beam, once you have your deployment ready you can find the API code by click on blue “call API” button inside beam console</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SftvdSG88MxO10jInMVCeA.png" /><figcaption>Beam Console for Calling the API</figcaption></figure><pre>from llama_index.indices import VectaraIndex<br>import os, time, json, requests<br>from dotenv import load_dotenv<br>from model import call_model<br><br>load_dotenv()<br><br>VECTARA_CUSTOMER_ID=os.environ[&quot;VECTARA_CUSTOMER_ID&quot;] <br>VECTARA_CORPUS_ID=os.environ[&quot;VECTARA_CORPUS_ID&quot;] <br>VECTARA_API_KEY=os.environ[&quot;VECTARA_API_KEY&quot;] <br>os.environ[&#39;OPENAI_API_KEY&#39;] = os.environ[&quot;OPENAI_API&quot;]<br>Beam_key = os.environ[&quot;Beam_key&quot;]<br><br>index = VectaraIndex(vectara_api_key=VECTARA_API_KEY, vectara_customer_id=VECTARA_CUSTOMER_ID, vectara_corpus_id=VECTARA_CORPUS_ID)<br><br>url = &quot;https://dys3w.apps.beam.cloud&quot;<br>def call_model(prompt):<br>  payload = {&quot;prompt&quot;: prompt}<br>  headers = {<br>    &quot;Accept&quot;: &quot;*/*&quot;,<br>    &quot;Accept-Encoding&quot;: &quot;gzip, deflate&quot;,<br>    &quot;Authorization&quot;: f&quot;Basic {Beam_key}&quot;,<br>    &quot;Connection&quot;: &quot;keep-alive&quot;,<br>    &quot;Content-Type&quot;: &quot;application/json&quot;<br>  }<br><br>  response = requests.request(&quot;POST&quot;, url, <br>    headers=headers,<br>    data=json.dumps(payload)<br>  )<br>  pattern = r&#39;answer:(.+)&#39;<br><br>  res = response.json()<br>  res = res[&#39;answer&#39;]<br>  match = re.search(pattern, res, re.DOTALL)  <br>    answer_content = match.group(1).strip()<br>    return answer_content, res<br>  else:<br>    return &quot;No results found.&quot;, res<br><br><br>def final_response(prompt):<br>    #first we get similar docs from the index<br>    print(&quot;doing doc search&quot;)<br>    docs = index.as_retriever(summary_enabled=True, similarity_top_k=3)<br>    sim_docs = docs.retrieve(prompt)<br>    sim_docs_text = [doc.text for doc in sim_docs]  <br>    print(&quot;got similar docs&quot;)<br>    #now we pass our prompt + similar docs to the llm<br>    prompt_2 = f&quot;&quot;&quot;<br>    You are given the the context below. Please use that context only to answer the asked question.<br><br>    context: {sim_docs_text}<br>    question: {prompt}<br><br>    answer:<br><br>    &quot;&quot;&quot;<br><br>    #now invoking the llm<br>    output, out2 = call_model(prompt_2)<br>    return output<br><br><br>#using chainlit UI<br>import streamlit as st<br>st.title(&#39;Ask me anything about Technology&#39;)<br><br>prompt = st.text_area(&quot;Enter your question here&quot;, &quot;What is software sentiment&quot;)<br>if st.button(&#39;Submit&#39;):<br>    with st.spinner(&#39;Wait for it...&#39;):<br>        st.success(final_response(prompt))</pre><p>Save this file and run it using: <strong><em>streamlit run inference.py</em></strong></p><p>Now we have a UI with chatbot to talk to all our news data stored in the vector database!</p><h3>Fine-tuning Pipeline App</h3><p>To fine-tuning, you may have to buy a paid version from Beam.cloud. We will use the following Github repo: <a href="https://github.com/slai-labs/get-beam/tree/main/examples/finetune-llama">https://github.com/slai-labs/get-beam/tree/main/examples/finetune-llama</a>? here they have created generic funtions for training but it uses data from hugging face dataset package. Below you can find the updated code for your app.py file from repository which would rather take the Q/A dataset that we stored in Beam.</p><pre>from math import ceil<br><br>from beam import App, Runtime, Image, Volume<br>from helpers import get_newest_checkpoint, base_model<br>from training import train, load_models<br>from datasets import load_dataset, DatasetDict, Dataset<br>#from inference import call_model<br>import pandas as pd<br>import numpy as np<br>import os<br>beam_ft_data_volume = &quot;./finetuning_data&quot;<br><br># The environment your code runs on <br>app = App(<br>    &quot;llama-lora&quot;,<br>    runtime=Runtime(<br>        cpu=4,<br>        memory=&quot;32Gi&quot;,<br>        gpu=&quot;A100-80&quot;,<br>        image=Image(<br>            python_version=&quot;python3.10&quot;,<br>            python_packages=&quot;requirements.txt&quot;,<br>        ),<br>    ),<br>    # Mount Volumes for fine-tuned models and cached model weights<br>    volumes=[<br>        Volume(name=&quot;checkpoints&quot;, path=&quot;./checkpoints&quot;),<br>        Volume(name=&quot;pretrained-models&quot;, path=&quot;./pretrained-models&quot;),<br>        Volume(name=&quot;finetuning_data&quot;, path=beam_ft_data_volume)<br>    ],<br>)<br><br><br># Fine-tuning<br>@app.schedule(when=&quot;0 9 1 * *&quot;)<br>def train_model():<br>    # Trained models will be saved to this path<br>    beam_volume_path = &quot;./checkpoints&quot;<br>    <br>    csv_files = [file for file in os.listdir(beam_ft_data_volume) if file.endswith(&quot;.csv&quot;)]<br>    combined_df = pd.DataFrame()<br>    dfs = []<br><br>    for csv_file in csv_files:<br>        file_path = os.path.join(beam_ft_data_volume, csv_file)<br>        df = pd.read_csv(file_path)<br>        dfs.append(df)<br>    combined_df = pd.concat(dfs, ignore_index=True)<br>    combined_df.reset_index(drop=True, inplace=True)<br><br>    combined_df = combined_df.drop(&#39;Finetuned&#39;, axis =1)<br>    combined_df.rename(columns={&quot;Questions&quot;: &quot;instruction&quot;, &quot;Answers&quot;: &quot;output&quot;}, inplace=True)<br>    combined_df[&#39;input&#39;] = np.nan<br><br>    # Load dataset -- for this example, we&#39;ll use the vicgalle/alpaca-gpt4 dataset hosted on Huggingface:<br>    # https://huggingface.co/datasets/vicgalle/alpaca-gpt4<br>    dataset = DatasetDict({<br>        &quot;train&quot;: Dataset.from_pandas(combined_df),<br>    })<br>    <br>    # Adjust the training loop based on the size of the dataset<br>    samples = len(dataset[&quot;train&quot;])<br>    val_set_size = ceil(0.1 * samples)<br><br>    train(<br>        base_model=base_model,<br>        val_set_size=val_set_size,<br>        data=dataset,<br>        output_dir=beam_volume_path,<br>    )</pre><p>To deploy: <strong><em>beam deploy app.py:train_model</em></strong></p><p>This will now finetune the LLM on your articles Q/A dataset and will be triggered on 1st of every month at 9AM.</p><p><strong>In conclusion</strong>, we have a whole model ready to answer the questions from context as well as has in depth understanding of what technical terms are there and can help inference from its weights as well. We finally made our little guy (Llama2) and expert using state of the art OpenAI’s GPT-4!</p><p>For those interested, here is Github repo link: <a href="https://github.com/sarmadafzalj/LLMOps-3pipelines-Batch_Ingestion-Finetuning-And-RAG_Inference">https://github.com/sarmadafzalj/LLMOps-3pipelines-Batch_Ingestion-Finetuning-And-RAG_Inference</a></p><p>I hope you enjoyed understanding the project and reading my first article on Medium — Cheers 🥂</p><h3>Happy to connect with you all :)</h3><p><a href="https://www.linkedin.com/in/sarmadafzal/">https://www.linkedin.com/in/sarmadafzal/</a><br><a href="https://github.com/sarmadafzalj">https://github.com/sarmadafzalj</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91c49a4744da" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>