<?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 Aliza Adnan on Medium]]></title>
        <description><![CDATA[Stories by Aliza Adnan on Medium]]></description>
        <link>https://medium.com/@alizadnan123?source=rss-e432eb235fd8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*rPphjvt4f9vIe6I-</url>
            <title>Stories by Aliza Adnan on Medium</title>
            <link>https://medium.com/@alizadnan123?source=rss-e432eb235fd8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 15:28:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@alizadnan123/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[Mastering AI-Powered Personalization: LangGraph & Agentic RAG in Action]]></title>
            <link>https://medium.com/@alizadnan123/mastering-ai-powered-personalization-langgraph-agentic-rag-in-action-0e4db3a8823f?source=rss-e432eb235fd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/0e4db3a8823f</guid>
            <dc:creator><![CDATA[Aliza Adnan]]></dc:creator>
            <pubDate>Mon, 21 Apr 2025 13:18:27 GMT</pubDate>
            <atom:updated>2025-04-21T13:34:45.285Z</atom:updated>
            <content:encoded><![CDATA[<h3>Building a Personalized Recommendation System with LangGraph &amp; Agentic RAG</h3><p>Recently, we’ve seen RAG take the AI world by storm — but now, <strong>Agentic RAG</strong> has entered the scene, making systems even more intelligent by incorporating decision-making capabilities. <em>If you’re not familiar with RAG, don’t worry — I’ve got you covered!</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/1*-WqAmXf94uYK9TUxrTObVQ.jpeg" /><figcaption><a href="https://quilltez.com/blog/agentic-rag-revolutionizing-information-retrieval-and-ai-powered-decision-making">https://quilltez.com/blog/agentic-rag-revolutionizing-information-retrieval-and-ai-powered-decision-making</a></figcaption></figure><p>In this article, you’ll learn about RAG, Agentic RAG, knowledge graphs, and how to build a personalized content recommendation system. The following topics will be covered:Introduction to RAG and Agentic RAG</p><ul><li>Introduction to Knowledge Graphs</li><li>Step by step tutorial of building personalized content recommendation system</li><li>Conclusion</li></ul><h4>Introduction to RAG and Agentic RAG</h4><p><a href="https://aws.amazon.com/what-is/retrieval-augmented-generation/">Retrieval-Augmented Generation (RAG)</a> is the process of optimizing the output of a large language model, so it references an authoritative knowledge base outside of its training data sources before generating a response. Large Language Models (LLMs) are trained on vast volumes of data and use billions of parameters to generate original output for tasks like answering questions, translating languages, and completing sentences. RAG extends the already powerful capabilities of LLMs to specific domains or an organization’s internal knowledge base, all without the need to retrain the model. It is a cost-effective approach to improving LLM output so it remains relevant, accurate, and useful in various contexts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*tWSOAklmo6z7NuFbTFBzvA.png" /><figcaption><a href="https://www.bentoml.com/blog/building-rag-with-open-source-and-custom-ai-models">https://www.bentoml.com/blog/building-rag-with-open-source-and-custom-ai-models</a></figcaption></figure><p>A traditional RAG consists of the following workflow:</p><ol><li>All of your data is combined and divided into chunks.</li><li>These data chunks are then converted into vector embeddings, which provide semantic meaning to the data.</li><li>Similarly, the user’s query is converted into an embedding.</li><li>The query embedding is used to search the vector database to find the most relevant documents.</li><li>The relevant documents are then combined and sent to the LLM for context.</li><li>The model generates a response from the received context, providing the user with a coherent answer.</li></ol><p>Though traditional RAG provides coherent and relevant responses, it is still not efficient enough because:</p><ul><li>It doesn’t check whether the response is truly valid or relevant. Instead, it tries to generate an answer without considering irrelevancy or reasoning.</li></ul><p><strong><em>To save the day, Agentic RAG is here!</em></strong></p><p>To understand what <strong>Agentic RAG</strong> is, we first need to understand what <strong>agents</strong> are and what they do. Agents are intelligent components that carry out tasks or parts of tasks within a system. They can work in parallel and independently.</p><p><strong>Agentic RAG</strong> refines and enhances responses by dynamically adapting and reasoning through the query. It is a multi-step, iterative process that refines the query until a confident score is achieved, all while using agents to guide the process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0e_veq5jLMrZqOoPImCR9w.png" /></figure><p>Agentic RAG’s main pipeline is the same as original but with some modifications. Following is the workflow of Agentic RAG:</p><ol><li>The user’s query is received and analyzed. If necessary, it is refined, rephrased, or expanded to improve retrieval quality.</li><li>The system decides whether to perform a <strong>single-step retrieval</strong> (like traditional RAG) or use <strong>multi-step retrieval</strong> for progressive refinement.</li><li>The query is used to search the knowledge base for relevant documents. The system checks if the retrieved documents are relevant and contain sufficient information. If key information is missing, the query is refined, and retrieval is repeated.</li><li>The system evaluates whether the retrieved information is enough to generate a high-confidence answer. If not, additional retrieval steps are triggered.</li><li>The verified and relevant documents are sent to the LLM to generate a response.</li><li>The system validates the response and checks if more relevant information should be retrieved from the vector database.</li><li>The validated response with the highest confidence score is then presented.</li></ol><h4>Introduction to Knowledge Graphs</h4><p>A <strong>Knowledge Graph</strong> is a structured representation of information that connects entities (such as people, places, or concepts) through defined relationships, forming a network of interconnected data. It allows machines to understand context, infer new insights, and retrieve relevant information more efficiently.</p><p>Knowledge graphs differ from traditional databases by emphasizing relationships between entities, which provides a deeper understanding of context. In RAG systems, they are used to supply context-rich data, helping reduce hallucinations by grounding responses in structured and meaningful connections.</p><h4>Step by step tutorial of building personlized content recommendation system</h4><p><em>Now, let’s dive into the tutorial of building personalized content recommendation system! </em><strong><em>Note that the used environment is of Colab’s.</em></strong></p><p>First off, start with setting up the environment and installing the important libraries necessary for this tutorial,</p><pre><br>!pip install -q ctransformers langgraph langchain faiss-cpu sentence-transformers<br>!pip install -U langchain-community</pre><p>The above code installs the necessary libraries such as <strong>LangChain</strong> for building the agentic pipeline, <strong>FAISS</strong> for the vector database, <strong>Sentence Transformers</strong> for generating embeddings, and <strong>ctransformers</strong> for running the LLM efficiently.</p><p>We then introduce our LLM — <strong>Mistral 7B</strong>, which supports a context length of 2048 tokens and runs inference on the CPU.</p><pre>from ctransformers import AutoModelForCausalLM<br>from langchain.vectorstores import FAISS<br>from langchain.embeddings import HuggingFaceEmbeddings<br>from langchain.text_splitter import CharacterTextSplitter<br>from langgraph.graph import StateGraph, END<br>from typing import TypedDict, Literal, List<br><br>llm = AutoModelForCausalLM.from_pretrained(<br>    &quot;TheBloke/Mistral-7B-Instruct-v0.2-GGUF&quot;,<br>    model_file=&quot;mistral-7b-instruct-v0.2.Q4_K_M.gguf&quot;,<br>    model_type=&quot;mistral&quot;,<br>    context_length=2048,<br>    gpu_layers=0  # CPU only<br>)</pre><p>In the above code, we imported the necessary libraries and initialized the LLM.</p><p>Now it’s time to create a <strong>vector store</strong>! We used a sample dataset containing books and genres based on user preferences. Then, we introduced an <strong>embedding generator</strong> along with a <strong>text splitter</strong> to chunk the data. Using both, we transformed the data into an ideal format for the vector database.<br> We chose <strong>FAISS</strong> as our vector store, and once it was set up, we added a <strong>retriever</strong> to fetch the most relevant chunks of data for the LLM to use during response generation.</p><pre>docs = [<br>    &quot;User A enjoys science fiction and prefers short books.&quot;,<br>    &quot;Book: Dune – A classic sci-fi epic.&quot;,<br>    &quot;Book: Project Hail Mary – A fast-paced science fiction novel.&quot;,<br>    &quot;Book: The Hobbit – A short fantasy story with adventure.&quot;,<br>    &quot;Book: Foundation – A legendary sci-fi series by Isaac Asimov.&quot;,<br>    &quot;User B enjoys romance and character-driven narratives.&quot;,<br>    &quot;Book: Pride and Prejudice – A romantic classic.&quot;,<br>    &quot;Book: The Notebook – A deeply emotional romance.&quot;,<br>]<br><br># Vector store (RAG backend)<br>embedding = HuggingFaceEmbeddings(model_name=&quot;sentence-transformers/all-MiniLM-L6-v2&quot;)<br>splitter = CharacterTextSplitter(chunk_size=200, chunk_overlap=0)<br>faiss_docs = splitter.create_documents(docs)<br>vectorstore = FAISS.from_documents(faiss_docs, embedding)<br>retriever = vectorstore.as_retriever(search_kwargs={&quot;k&quot;: 3})In the above given code, we hvae introduced the functionality of graph such as defining the state of the graph comprising of user’s id, profile, teh retrieved items and recommendations, whereas the functions help in defining the nodes.</pre><p><em>Coming to the next crucial part of our tutorial → Agents!</em></p><p>The given code implements the workflow of the agent consisting of following steps:</p><ul><li>AgentState holds the query, retrieved docs, response, and the next step.</li><li>planner_node decides whether to retrieve info, reason with the LLM, or end.</li><li>retrieval_node fetches relevant documents based on the query.</li><li>reasoning_node uses the LLM to generate a response using the retrieved context.</li></ul><pre># LangGraph Agent State<br>class AgentState(TypedDict):<br>    user_query: str<br>    retrieved_docs: List[str]<br>    final_response: str<br>    next_action: Literal[&quot;retrieve&quot;, &quot;reason&quot;, &quot;end&quot;]<br><br># Planner Node (decides what to do)<br>def planner_node(state: AgentState) -&gt; AgentState:<br>    if not state.get(&quot;retrieved_docs&quot;):<br>        next_action = &quot;retrieve&quot;<br>    elif state.get(&quot;final_response&quot;):  # Already has a response<br>        next_action = &quot;end&quot;<br>    else:<br>        next_action = &quot;reason&quot;<br>    return {**state, &quot;next_action&quot;: next_action}<br><br><br># Retrieval Tool<br>def retrieval_node(state: AgentState) -&gt; AgentState:<br>    docs = retriever.get_relevant_documents(state[&quot;user_query&quot;])<br>    return {<br>        **state,<br>        &quot;retrieved_docs&quot;: [doc.page_content for doc in docs],<br>        &quot;next_action&quot;: &quot;reason&quot;<br>    }<br><br># Reasoning Tool (LLM)<br>def reasoning_node(state: AgentState) -&gt; AgentState:<br>    context = &quot;\n&quot;.join(state[&quot;retrieved_docs&quot;])<br>    prompt = f&quot;&quot;&quot;You are a recommendation system.<br><br>Only use the information from the context below to answer the user. Do not use any external knowledge.<br><br>User Query:<br>{state[&#39;user_query&#39;]}<br><br>Context:<br>{context}<br><br>Answer with a personalized recommendation using only the above context.<br>&quot;&quot;&quot;<br>    response = llm(prompt)<br>    return {<br>        **state,<br>        &quot;final_response&quot;: response.strip(),<br>        &quot;next_action&quot;: &quot;end&quot;<br>    }</pre><p>In order to use the tools defined above, we need to compile and integrate it together in a form of graph. Following are the steps performed by the given code:</p><p><strong>1- Creates a state machine</strong> with nodes for:</p><ul><li>planner: decides the next step</li><li>retrieve: fetches documents</li><li>reason: generates a response using the LLM</li></ul><p><strong>2- Sets the entry point</strong> at the planner node.</p><p><strong>3- Adds conditional edges</strong> from planner to decide whether to:</p><ul><li>retrieve documents</li><li>generate a response</li><li>or end the flow</li></ul><p><strong>4- Loops back</strong> from retrieve and reason to planner, so it keeps updating state until it&#39;s done.</p><p>Finally, builder.compile() creates the executable graph ready to run.</p><pre><br># LangGraph Agentic Flow<br>builder = StateGraph(AgentState)<br>builder.add_node(&quot;planner&quot;, planner_node)<br>builder.add_node(&quot;retrieve&quot;, retrieval_node)<br>builder.add_node(&quot;reason&quot;, reasoning_node)<br><br>builder.set_entry_point(&quot;planner&quot;)<br><br>builder.add_conditional_edges(&quot;planner&quot;, lambda s: s[&quot;next_action&quot;], {<br>    &quot;retrieve&quot;: &quot;retrieve&quot;,<br>    &quot;reason&quot;: &quot;reason&quot;,<br>    &quot;end&quot;: END<br>})<br><br>builder.add_edge(&quot;retrieve&quot;, &quot;planner&quot;)<br>builder.add_edge(&quot;reason&quot;, &quot;planner&quot;)<br><br>graph = builder.compile()</pre><p>Let’s run some test cases to see how our recommendation system works.</p><pre>query = &quot;Can you suggest a fast sci-fi book for someone who likes short stories?&quot;<br>result = graph.invoke({&quot;user_query&quot;: query})<br><br>print(&quot;🤖 Final Answer:&quot;)<br>print(result[&quot;final_response&quot;])</pre><pre>🤖 Final Answer:<br>Based on your preference for science fiction and short books,<br>I would recommend the Foundation series by Isaac Asimov.<br>This collection of interconnected short stories offers an intriguing exploration<br>into psychohistory, a unique blend of history and mathematics,<br>as it charts the fall and rise of the Galactic Empire. Enjoy your reading!</pre><p><strong>Note</strong>: You can find the code of the above tutorial <a href="https://github.com/Aliza-Adnan/Personalized-Recommendation-System-with-LangGraph-Agentic-RAG">here</a>.</p><h3><strong>Conclusion</strong></h3><p>In this tutorial, we built a lightweight, CPU-friendly Retrieval-Augmented Generation (RAG) system using LangGraph, FAISS, Hugging Face embeddings, and a quantized LLM via ctransformers. By combining structured agentic flows with document retrieval and natural language reasoning, we created a simple but powerful recommendation system that stays grounded in your own data. LangGraph’s intuitive state management makes it easy to orchestrate complex logic, while FAISS ensures fast and efficient search over embeddings. Whether you&#39;re building a chatbot, virtual assistant, or domain-specific Q&amp;A tool, this modular approach gives you a solid foundation for production-ready AI workflows.</p><h4>References</h4><p><a href="https://aws.amazon.com/what-is/retrieval-augmented-generation/">What is RAG? - Retrieval-Augmented Generation AI Explained - AWS</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0e4db3a8823f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Keeping up with SBOM: Python Edition]]></title>
            <link>https://medium.com/@alizadnan123/keeping-up-with-sbom-python-edition-3923dbc3279d?source=rss-e432eb235fd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/3923dbc3279d</guid>
            <dc:creator><![CDATA[Aliza Adnan]]></dc:creator>
            <pubDate>Fri, 07 Jun 2024 09:55:39 GMT</pubDate>
            <atom:updated>2024-06-07T09:55:39.850Z</atom:updated>
            <content:encoded><![CDATA[<p>Over the past several years, the IT industry has witnessed significant advancements, leading to a heightened demand for frequent updates and releases from software products. Embracing this necessity, the software undergoes more frequent updates to stay relevant, often relying on third-party resources and containers to enhance customer experience. However, this increased reliance also amplifies the susceptibility to risks and vulnerabilities. How then do we ensure transparency in the software supply chain to mitigate cybersecurity threats? This query directs our attention to SBOM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WjjEi6IXVtxSXn-kcNtvJw.png" /></figure><p>This blog is all related to generating SBOM files in Python specifically, so I’ll be covering two major technologies i.e., <strong>CycloneDX</strong> and <strong>Jake.</strong></p><p>Following subjects will be addressed in this read:</p><ol><li>Introduction to CycloneDX</li><li>CycloneDX Python Tutorial</li><li>Introduction to Jake</li><li>Jake Tutorial</li><li>References</li></ol><h3>Introduction to CycloneDX</h3><p>OWASP CycloneDX is a full-stack Bill of Materials (BOM) standard that provides advanced supply chain capabilities for cyber risk reduction. It covers several domains such as:</p><ul><li>Software Bill of Materials (SBOM)</li><li>Software-as-a-Service Bill of Materials (SaaSBOM)</li><li>Hardware Bill of Materials (HBOM)</li><li>Machine Learning Bill of Materials (ML-BOM)</li><li>Cryptography Bill of Materials (CBOM)</li><li>Manufacturing Bill of Materials (MBOM)</li><li>Operations Bill of Materials (OBOM)</li><li>Vulnerability Disclosure Reports (VDR)</li><li>Vulnerability Exploitability eXchange (VEX)</li><li>CycloneDX Attestations (CDXA)</li></ul><p>The <strong>main purpose of CycloneDX</strong> is to recognize risks, foster increased transparency, and facilitate swift impact analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nj0hKyj0SvQsGZumqvAMdQ.png" /><figcaption><a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Ffossa.com%2Fblog%2Fwhats-new-cyclonedx-1-5%2F&amp;psig=AOvVaw0dCTlGilrg4-fjstc60NYT&amp;ust=1717833697184000&amp;source=images&amp;cd=vfe&amp;opi=89978449&amp;ved=0CBIQjRxqFwoTCKCimq2DyYYDFQAAAAAdAAAAABAJ">https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Ffossa.com%2Fblog%2Fwhats-new-cyclonedx-1-5%2F&amp;psig=AOvVaw0dCTlGilrg4-fjstc60NYT&amp;ust=1717833697184000&amp;source=images&amp;cd=vfe&amp;opi=89978449&amp;ved=0CBIQjRxqFwoTCKCimq2DyYYDFQAAAAAdAAAAABAJ</a></figcaption></figure><h3>CycloneDX Python Tutorial</h3><p>In this tutorial, we will be using CycloneDX Python SBOM Generation Tool which creates the SBOM files in XML or JSON format in Python.</p><p><em>Though we can generate SBOM supported by different languages such as JavaScript, .NET, Java, Go etc.</em></p><p>So let’s jump right into the tutorial which will be executed in Linux environment!</p><p>Older versions of this tool are available but if you want to use the latest version then the following requirement is necessary:</p><pre>Python&gt;=3.8,&lt;4</pre><p>To install the tool through <em>pip</em>, run the following command.</p><pre>python -m pip install cyclonedx-bom</pre><p>For generating the SBOM file in JSON format, we can type in:</p><pre>cyclonedx-bom -e --format json -o sbom.json</pre><p>where the <em>-e</em> flag commands to create the SBOM file from the environment and <em>-o</em> flag indicates the file to which I want to write to.</p><p>For generating SBOM file, in xml format, from the project’s manifest file(which is requirements.txt here), we can go with the following command:</p><pre>cyclonedx-bom -r -i requirements.txt -o sbom_req.xml</pre><p>where the <em>-i</em> flag indicates the input file.</p><p>Another way to generate CycloneDX SBOM file in Python is by using Jake. So let’s see how we can utilize Jake to help us in checking the vulnerabilities.</p><h3>Introduction to Jake</h3><p>Jake is a tool that looks for such Python environments and apps that are compatible with generating CycloneDX SBOM file and can be aware of the possible threats and vulnerabilities. It is a CLI tool and is powered by <a href="https://www.sonatype.com/products/open-source-security-dependency-management">Sonatype</a> server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*8AN1T5gME3_JD_Rgk7DBVQ.png" /><figcaption><a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Fgithub.com%2Fsonatype-nexus-community%2Fjake&amp;psig=AOvVaw2ltKlCJilvNV8bBK_PGeXw&amp;ust=1717833635595000&amp;source=images&amp;cd=vfe&amp;opi=89978449&amp;ved=0CBIQjRxqFwoTCNCq746DyYYDFQAAAAAdAAAAABAE">https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Fgithub.com%2Fsonatype-nexus-community%2Fjake&amp;psig=AOvVaw2ltKlCJilvNV8bBK_PGeXw&amp;ust=1717833635595000&amp;source=images&amp;cd=vfe&amp;opi=89978449&amp;ved=0CBIQjRxqFwoTCNCq746DyYYDFQAAAAAdAAAAABAE</a></figcaption></figure><h3>Jake Tutorial</h3><p>To start with Jake, we first have to install Jake. Here it is done using pip.</p><pre>pip install jake</pre><p>The point to be noticed here is that it is compatible with all the versions of Python.</p><p>Generating SBOM file from requirements.txt using Jake can be done using this command, where <em>-t</em> represents the input type(where PIP indicates to read from requirements.txt) and <em>-f</em> represents the file path.</p><pre>jake sbom -t PIP -f requirements.txt</pre><p>To generate SBOM file through STDIN, we can type in:</p><pre>conda list --json | jake sbom -t CONDA_JSON</pre><p>where <em>conda list — json </em>lists all the packages managed by Conda in json format and pipes the output to the other command that is <em>jake sbom -t CONDA_JSON </em>which generates the SBOM file, where<em> -t CONDA_JSON = </em>Read output from <em>`conda list — json`.</em></p><p>There are many other ways to recognize issues and vulnerabilities in Python environment and is essential for security. By systematically documenting all dependencies and their versions, SBOM enables developers and security professionals to gain comprehensive insights into the software supply chain.</p><p>You can check out my other blogs on Supply Chain Security too!</p><ul><li><a href="https://medium.com/@alizadnan123/the-world-of-sbom-abf63003a74b">The World of SBOM</a></li><li><a href="https://medium.com/@alizadnan123/gitsign-a-new-way-to-secure-your-commits-ee5ab940ed1d">Gitsign: A new way to secure your commits</a></li><li><a href="https://medium.com/@alizadnan123/keeping-up-with-sbom-spdx-syft-and-grype-dee7b21f4e76">Keeping up with SBOM: SPDX, Syft and Grype</a></li></ul><h3>References</h3><ul><li><a href="https://cyclonedx.org/">CycloneDX Bill of Materials Standard | CycloneDX</a></li><li><a href="https://github.com/CycloneDX/cyclonedx-python">GitHub - CycloneDX/cyclonedx-python: CycloneDX Software Bill of Materials (SBOM) generator for Python projects and environments</a></li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F3WAeSFRJO20%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D3WAeSFRJO20&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F3WAeSFRJO20%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/f734464a888733c24b915ed820f55a15/href">https://medium.com/media/f734464a888733c24b915ed820f55a15/href</a></iframe><p><a href="https://jake.readthedocs.io/en/latest/usage.html">Usage - Jake 3.0.12 documentation</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3923dbc3279d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Step-by-Step: Building an Intelligent Tourist Guide Chatbot]]></title>
            <link>https://medium.com/@alizadnan123/step-by-step-building-an-intelligent-tourist-guide-chatbot-c27dbdd45f70?source=rss-e432eb235fd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/c27dbdd45f70</guid>
            <dc:creator><![CDATA[Aliza Adnan]]></dc:creator>
            <pubDate>Thu, 06 Jun 2024 11:13:05 GMT</pubDate>
            <atom:updated>2024-06-06T11:20:33.351Z</atom:updated>
            <content:encoded><![CDATA[<p>If you are new to LangChain, then this article is perfect for you, as it covers the introduction of LangChain along with the basic implementation of creating a chatbot with it. As it is a current hot topic and its necessity has sky-rocketed with the increasing demand for LLMs, it has been marked essential for every ML Engineer to know about it!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-PlFCd_VBcALKReO3ZaOEg.png" /></figure><p><strong><em>So, let’s begin!</em></strong> Following are the topics that are going to be covered in this article:</p><ul><li>Introduction of LangChain</li><li>Modules of LangChain</li><li>Implementation of Tourism Chatbot with the help of LangChain</li><li>Conclusion</li></ul><h3>Introduction</h3><p>LangChain is an open-source library/framework that has made the development and deployment of LLMs(Large Language Models) apps powerful and is one of the most used frameworks for creating, productionizing, and deploying your apps.</p><h3>Modules of LangChain</h3><p>LangChain consists of many components such as LLM, Embedding models, Vector stores, Document transformers etc., but these models come under the umbrella of three major modules which are as follows:</p><h4>Model I/O</h4><p><a href="https://python.langchain.com/v0.1/docs/modules/model_io/">This module</a> works with the user interaction or input/output of the model which covers <a href="https://python.langchain.com/docs/modules/model_io/prompts/">prompt management</a>, <a href="https://python.langchain.com/docs/modules/model_io/prompts/example_selectors/">prompt optimization</a>, a generic interface for <a href="https://python.langchain.com/docs/modules/model_io/chat/">chat models</a> and <a href="https://python.langchain.com/docs/modules/model_io/llms/">LLMs</a>, and common utilities for working with <a href="https://python.langchain.com/docs/modules/model_io/output_parsers/">model outputs</a>.</p><h4>Retrieval</h4><p><a href="https://python.langchain.com/v0.1/docs/modules/data_connection/">This module</a> includes RAG(Retrieval Augmented Generation) which means that it would load data from various sources, process it, and use it in generating process text through LLM. This has complex sub-modules such as Document Loaders, Text Splitting, Text Embedding Models, Vector Stores, and Retrievers.</p><h4>Agents</h4><p><a href="https://python.langchain.com/v0.1/docs/modules/agents/">Agents</a> typically consider whether to take an action, observe the outcomes, and repeat this cycle until the task is finished. Here the agents consider LLMs as reasoning engines. There are different types of agents associated with LangChain including Intended Model Type, Supports Chat History, Supports Multi-Input Tools, Supports Parallel Function Calling, and Required Model Params.</p><h3>Implementation of Tourism Chatbot with the help of LangChain</h3><p>Now that we have a little overview of LangChain, let’s jump right into the implementation of a Chatbot that guides tourists by providing them with information about the place they want to visit, acting as a local guide!</p><p>First off, start with installing the important libraries necessary for this tutorial,</p><pre>!pip install — upgrade numpy<br>!pip install torch torchvision -U<br>!pip install - upgrade transformers<br>!pip install langchain<br>!pip install chromadb<br>!pip install xformers<br>!pip install sentence_transformers<br>!pip install tokenizers<br>!pip install optimum<br>!pip install auto-gptq<br>!pip install optimum<br>!pip install unstructured<br>!pip install langchain-community</pre><p>Now we would use the Llama-2’s Chat-GPTQ with its tokenizer and set its configurations. You can use any LLM you’d like.</p><pre>import torch<br>import numpy as np<br>from langchain import HuggingFacePipeline<br>from transformers import AutoModelForCausalLM, AutoTokenizer, GenerationConfig, pipeline<br><br>MODEL_NAME = &quot;TheBloke/Llama-2-13b-Chat-GPTQ&quot;<br>tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME, use_fast=True)<br><br>model = AutoModelForCausalLM.from_pretrained(<br>    MODEL_NAME, torch_dtype=torch.float16, trust_remote_code=True, device_map=&quot;auto&quot;<br>)<br><br>generation_config = GenerationConfig.from_pretrained(MODEL_NAME)<br>generation_config.max_new_tokens = 1024<br>generation_config.top_p = 0.95<br>generation_config.do_sample = True<br>generation_config.repetition_penalty = 1.15<br>generation_config.temperature = 0.04<br><br>text_pipeline = pipeline(<br>    &quot;text-generation&quot;,<br>    model=model,<br>    tokenizer=tokenizer,<br>    generation_config=generation_config,<br>)<br><br>llm = HuggingFacePipeline(pipeline=text_pipeline)</pre><p>In the above code, the configurations represent the following:</p><ul><li><strong>generation_config.max_tokens:</strong> This limits the output to be within 1024 tokens.</li><li><strong>generation_config.top_p:</strong> This controls the diversity along with the coherence of the generated output.</li><li><strong>generation_config.do_sample:</strong> This allows random sampling from the probability distribution rather than always choosing the most likely token, allowing creativity.</li><li><strong>generation_config.repetition_penalty:</strong> This penalizes the LLM for repeating tokens by reducing the probability with a penalty factor discouraging repetitive generation.</li><li><strong>generation_config.temperature:</strong> This controls the randomness of the token sampling, managing the deterministic nature of the LLM.</li></ul><p>After configuring the model, we make the pipeline and pass it into HuggingFacePipeline to make it compatible with the langchain framework.</p><pre>import langchain<br>from langchain.prompts import PromptTemplate<br><br>tourist_guide_pakistan_template = “””<br>You are a tourist guide chatbot specialized in providing information about<br>tourist destinations in Pakistan. Your expertise lies in offering details about<br>places to visit, cultural insights, historical landmarks, and travel tips <br>within Pakistan. Please note that your knowledge is limited to Pakistan’s <br>tourist domain,and you won’t entertain queries beyond this scope. If asked <br>about topics unrelated to Pakistani tourism,kindly apologize and redirect the <br>conversation back to tourist-related inquiries.<br>Question: {question}<br>Answer:”””<br><br>tourist_guide_prompt = PromptTemplate(<br>    input_variables=[“question”],<br>    template=tourist_guide_pakistan_template)</pre><p>In the above code, we made a prompt template which would tell the LLM which role to play and how the generation would be in accordance to its role here.</p><p>Now let’s process our customized LLM,</p><pre>text = &quot;Which are the top 3 places to visit in pakistan?&quot;<br>result = llm(tourist_guide_prompt.format(question=text))<br>print(result)</pre><p>Hence the generated output is as follows:</p><pre>You are a tourist guide chatbot specialized in providing information about tourist destinations in Pakistan.<br>Your expertise lies in offering details about places to visit, cultural insights, historical landmarks, and travel tips within Pakistan.<br>Please note that your knowledge is limited to Pakistan&#39;s tourist domain,<br>and you won&#39;t entertain queries beyond this scope. If asked about topics unrelated to Pakistani tourism,<br>kindly apologize and redirect the conversation back to tourist-related inquiries.<br><br>Question: Which are the top 3 places to visit in pakistan?<br>Answer: Greetings! As a tourist guide chatbot for Pakistan, I highly recommend the following three must-visit destinations in our beautiful country:<br><br>1. The Northern Areas (Gilgit-Baltistan): This region boasts breathtaking scenery, including Nanga Parbat - the ninth highest mountain in the world. Visitors can enjoy trekking, hiking, and exploring ancient Silk Route cities like Gilgit and Skardu.<br>2. Lahore: Known as the cultural hub of Pakistan, Lahore offers an array of historical sites such as the iconic Lahore Fort, Badshahi Mosque, and Shalimar Gardens - all testifying to the rich history of the Mughal Empire. Don&#39;t miss the vibrant food scene and bustling markets.<br>3. Hunza Valley: Located in the far north of Pakistan, Hunza Valley is famous for its stunning natural beauty, picturesque villages, and delicious fruit orchards. Visitors can explore the valley by foot or take a leisurely drive through the winding roads surrounded by snow-capped mountains.<br><br>These three destinations offer a diverse taste of Pakistan&#39;s unique blend of culture, history, and natural beauty. Enjoy your trip!</pre><p><em>Impressive right!</em></p><p>Now to ease the process, we need to chain the LLM operations using LLMChain which would encapsulate the entire process of Model I/O process including taking input, formatting it according to the prompt template, passing it to LLM, and spitting out the output.</p><pre>from langchain.chains import LLMChain<br>chain = LLMChain(llm=llm, prompt=tourist_guide_prompt)<br>result = chain.run(text)<br>print(result)</pre><p><em>Voila!</em> We have completed the basic implementation of our chatbot using langchain, But there is still a missing element which is memory. The chatbot right now answers your questions but doesn’t remember any conversation that happened in the past. So to incorporate that we would introduce memory to our chatbot. So let’s bind the memory!</p><pre>from langchain.chains import ConversationChain<br>from langchain.memory.buffer import ConversationBufferMemory</pre><p>In the above code, we have imported the dependency necessary for retaining memory.</p><p>Furthermore, we also have to show the previous conversation with our AI Tourist guide so we incorporated another input variable i.e.,<em> </em><strong><em>“history” </em></strong>and added it to your prompt template input variables.</p><pre><br>tourist_guide_pakistan_template = &quot;&quot;&quot;<br>You are a tourist guide chatbot specialized in providing information about tourist destinations in Pakistan.<br>Your expertise lies in offering details about places to visit, cultural insights, historical landmarks, <br>and travel tips within Pakistan.<br>Please note that your knowledge is limited to Pakistan&#39;s tourist domain,<br>and you won&#39;t entertain queries beyond this scope. If asked about topics unrelated to Pakistani tourism,<br>kindly apologize and redirect the conversation back to tourist-related inquiries.<br><br>Previous Conversation: {history}<br>User: {input}<br>AI Tourist Guide: &quot;&quot;&quot;<br><br>tourist_guide_prompt = PromptTemplate(<br>    input_variables=[&quot;history&quot;, &quot;input&quot;],<br>    template=tourist_guide_pakistan_template<br>)</pre><p>Coming to the main part where the fun begins, The memory variable stores the memory buffer for the chat history where it gives the role of “AI Tourist Guide” to the LLM( or it gives it a prefix) and conversation initializes a conversation chain where it binds together the template, LLM and memory.</p><pre>memory = ConversationBufferMemory(ai_prefix=&quot;AI Tourist Guide&quot;)<br><br>conversation = ConversationChain(<br>    prompt= tourist_guide_prompt,<br>    llm=llm,<br>    verbose=True,<br>    memory=memory<br>)</pre><p>Let’s test our chatbot!</p><pre>user_input = &#39;Give insights about the three top most visited cities in Pakistan.&#39;<br>conversation.run(str(user_input))</pre><p>The output of above is,</p><pre>Previous Conversation:<br>User: Give insights about the three top most visited cities in Pakistan.<br>AI Tourist Guide:  Sure! The three top most visited cities in Pakistan are Karachi, Lahore, and Islamabad.<br>                   Each city has its unique charm and attractions. Karachi, being the largest city of Pakistan,<br>                   offers a vibrant nightlife, beautiful beaches, and a variety of shopping options. Lahore, <br>                   known as the cultural hub of Pakistan, boasts an array of historic sites such as the Lahore Fort and Badshahi Mosque.<br>                   Islamabad, the capital city, features picturesque views of the Margalla Hills and a range of museums and parks.<br>                   Which one would you like to explore further?</pre><p>Let’s throw in another question.</p><pre>user_input = &#39;Name the top two places to visit within the previously mentioned three cities.&#39;<br>conversation.run(str(user_input))</pre><p>The output,</p><pre>Previous Conversation:<br> User: Give insights about the three top most visited cities in Pakistan.<br> AI Tourist Guide:  Sure! The three top most visited cities in Pakistan are Karachi, Lahore, and Islamabad.<br>                    Each city has its unique charm and attractions. Karachi, being the largest city of Pakistan,<br>                    offers a vibrant nightlife, beautiful beaches, and a variety of shopping options. <br>                    Lahore, known as the cultural hub of Pakistan, boasts an array of historic sites such as the Lahore Fort and Badshahi Mosque. <br>                    Islamabad, the capital city, features picturesque views of the Margalla Hills and a range of museums and parks.<br>                    Which one would you like to explore further?<br><br>User: Name the top two places to visit within the previously mentioned three cities.<br>AI Tourist Guide:  Certainly! Here are my recommendations for the top two must-visit places in each of the three cities:<br>                    Karachi:<br>                    1. Mohatta Palace - A stunning example of Indo-Saracenic architecture, now housing the Mohatta Art Gallery.<br>                    2. Clifton Beach - A popular beach with plenty of food stalls and activities like camel rides and horse shows.<br>                    Lahore:<br>                    1. Lahore Fort - A UNESCO World Heritage Site showcasing Mughal and British colonial architectural styles.<br>                    2. Badshahi Mosque - A magnificent mosque built during the reign of Emperor Aurangzeb, featuring intricate tile work and soaring minarets.<br>                    Islamabad:<br>                    1. Faisal Mosque - A beautiful mosque with a capacity for 100,000 worshipers, designed by Turkish architect Vedat Dalokay.<br>                    2. Margalla Hills National Park - A scenic park with hiking trails, waterfalls, and wildlife, offering panoramic views of the city.<br>                    Which destination interests you the most?</pre><p><strong>Note</strong>: You can find the code of the above tutorial <a href="https://github.com/Aliza-Adnan/Tourist-Guide-Chatbot/tree/main">here</a>.</p><h3>Conclusion</h3><p>This comprehensive guide has equipped you with the skills to develop and train your chatbot, opening up new possibilities in AI and customer service. Happy coding, and may your AI guide lead many travelers to unforgettable adventures!</p><h4>References</h4><ul><li><a href="https://github.com/langchain-ai/langchain">GitHub - langchain-ai/langchain: The agent engineering platform.</a></li><li><a href="https://medium.com/@tahreemrasul/how-to-build-your-own-chatbot-with-langchain-and-openai-f092822b6ba6">How to Build Your Own Chatbot with LangChain and OpenAI</a></li><li><a href="https://python.langchain.com/v0.1/docs/modules/memory/conversational_customization/">Customizing Conversational Memory | 🦜️🔗 LangChain</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c27dbdd45f70" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Attention to Expression: Decoding Secrets in Transformer Text Generation]]></title>
            <link>https://medium.com/@alizadnan123/from-attention-to-expression-decoding-secrets-in-transformer-text-generation-4ea1b70d65da?source=rss-e432eb235fd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ea1b70d65da</guid>
            <dc:creator><![CDATA[Aliza Adnan]]></dc:creator>
            <pubDate>Mon, 22 Jan 2024 10:53:30 GMT</pubDate>
            <atom:updated>2024-01-22T12:28:55.571Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*UN24DcQBe3b6xC8DGmQBeQ.png" /></figure><p>Generative AI has been the buzz word for the past two years. From generating text to generating images and videos with just a prompt, here lies a deep science consisting of mathematical equations and mind blowing model architectures. Specifically for text generation, transformers play a major role as they serve as the fundamental and pivotal building block.</p><p>But after passing from the encoding and decoding phases, lies the integral question of <strong>“which decoding technique should be used?”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/455/1*8yA78jYVHbsCREC9obYFVQ.png" /><figcaption>Taken from: <a href="https://www.tensorflow.org/text/tutorials/transformer">https://www.tensorflow.org/text/tutorials/transformer</a></figcaption></figure><p>This question is not that straightforward as we would need to evaluate the use cases of the text generation model but first it is essential to discuss the different types of decoding techniques in transformers.</p><h3>Types of Decoding techniques</h3><p>There are 3 main types of decoding techniques which includes:</p><ul><li>Greedy Search Decoding</li><li>Beam Search Decoding</li><li>Sampling Methods</li></ul><p>Let’s dive in!</p><h3>Greedy Search Decoding</h3><p>Greedy Search Decoding is a techniques, which in simple words, chooses the highest probability token at each timestep.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/250/1*kfEcsM2Ibl8LbhxdzDSUVg.png" /></figure><p>Okay, so how it works? We take an incomplete sentence as the prompt and while predicting at each timestep, we take the last token’s logits, apply the softmax on it so we can have the probability distribution. We then pick out the highest probability token and add it to the sequence and then the cycle repeats.</p><p>Let’s combine beam search decoding with OpenAI to generate a unicorn story. And this is the result!</p><p><strong><em>“In a shocking finding, scientist discovered a herd of unicorns living in a<br>remote, previously unexplored valley, in the Andes Mountains. Even more<br>surprising to the researchers was the fact that the unicorns spoke perfect<br>English.<br>The researchers, from the University of California, Davis, and the University of Colorado, Boulder, were conducting a study on the Andean cloud forest, which is home to the rare species of cloud forest trees.<br>The researchers were surprised to find that the unicorns were able to<br>communicate with each other, and even with humans.<br>The researchers were surprised to find that the unicorns were able”</em></strong></p><p>It is sure easy to implement and also consumes less resources for computation but it has its drawbacks as it gives repetitive words in the sentence and it doesn’t take into consideration the whole context of the sentence <em>(The drawbacks are also visible from the output text above)</em>.</p><h3>Beam Search Decoding</h3><p>Instead of taking the highest probability token, it takes the <strong><em>b</em></strong> number of highest probability next tokens of sequences where <strong><em>b</em></strong> is known as beams. The next set of beams are chosen by selecting the most probable <strong><em>b</em></strong> extensions. The process is repeated until <strong><em>&lt;EOS&gt;</em></strong> tag is reached or length reaches the limit. But the twist is that the log probabilities are taken into consideration here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*bAQvpzv1IE5b93C6C39r3g.png" /><figcaption>Representation of an extension with 2 beams</figcaption></figure><p>We take the log probabilities because the conditional probabilities can become so small that after taking its product, the result can underflow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/344/1*XGvghrHtD0vdnnLN_BdFfA.png" /><figcaption>Formula for taking log probabilities</figcaption></figure><p>Let’s combine this decoding technique with OpenAI and generate a similar text like above:</p><p><strong><em>“In a shocking finding, scientist discovered a herd of unicorns living in a<br>remote, previously unexplored valley, in the Andes Mountains. Even more<br>surprising to the researchers was the fact that the unicorns spoke perfect<br>English.<br>The discovery of the unicorns was made by a team of scientists from the<br>University of California, Santa Cruz, and the National Geographic Society.<br>The scientists were conducting a study of the Andes Mountains when they<br>discovered a herd of unicorns living in a remote, previously unexplored valley,<br>in the Andes Mountains. Even more surprising to the researchers was the fact<br>that the unicorns spoke perfect English”</em></strong></p><p>It performs better than the greedy search algorithm but it can be improved more by increasing the number of beams but it becomes slower.</p><h3>Sampling Methods</h3><p>The normal sampling method follows this formula:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/1*TtzeB6ESg0Q2r1lthZokbg.png" /></figure><p>Where V is the cardinality of the vocabulary(the number of unique terms), and T is the temperature which maintains the uniqueness in the output or it controls the shape of the probability distribution. This method simply takes a random sample from the probability distribution from the model’s output over each timestep.</p><p>Large value of Temperature influences the output to have more unique words and small value of temperature produces output with more common words. But there are ways to keep a balance in the trade-off between coherence(low T) and diversity(high T) and to avoid unlikely tokens, which we can achieve that in two ways:</p><ul><li>Top-k Sampling</li><li>Nucleus Sampling</li></ul><h4>Top-k Sampling and Nucleus Sampling</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/494/1*oKzT2HRBeWSlTsZxzFspYQ.png" /><figcaption>Cumulative distribution of descending token probabilities</figcaption></figure><p>The top-k sampling only sample from <strong><em>k</em></strong> high probability where <strong><em>k</em></strong> is chosen manually. This only samples tokens from the left of the vertical line shown in the lower figure above. Following is the text generated using top-k sampling:</p><p><strong><em>“In a shocking finding, scientist discovered a herd of unicorns living in a<br>remote, previously unexplored valley, in the Andes Mountains. Even more<br>surprising to the researchers was the fact that the unicorns spoke perfect<br>English.<br>The wild unicorns roam the Andes Mountains in the region of Cajamarca, on the border with Argentina (Picture: Alamy/Ecole Nationale Supérieure d’Histoire Naturelle)<br>The researchers came across about 50 of the animals in the valley. They had lived in such a remote and isolated area at that location for nearly a thousand years that”</em></strong></p><p>The other alternative is nucleus threshold or top-p where we don’t need a fixed cut-off and instead we rely on the satisfaction of the condition which is when a certain probability mass in the selection is reached. In this sampling, we sample from the tokens from below the horizontal line of the lower graph as shown in above figure. Following is the text generated using the mentioned technique:</p><p><strong><em>“In a shocking finding, scientist discovered a herd of unicorns living in a<br>remote, previously unexplored valley, in the Andes Mountains. Even more<br>surprising to the researchers was the fact that the unicorns spoke perfect<br>English.<br>The scientists studied the DNA of the animals and came to the conclusion that the herd are descendants of a prehistoric herd that lived in Argentina about 50,000 years ago.<br>According to the scientific analysis, the first humans who migrated to South America migrated into the Andes Mountains from South Africa and Australia, after the last ice age had ended.<br>Since their migration, the animals have been adapting to”</em></strong></p><h3>Which Decoding technique to use?</h3><p>Well, there is no ideal approach to follow but it depends on the task. If you want to generate long sequences of text like a conversation with uniqueness, then increase the Temperature and go for sampling techniques like a mix of both top-k and nucleus sampling whereas for concise and to the point texts, lower the Temperature and go for greedy search decoding with beam search.</p><h3><strong>References</strong></h3><p>A huge shout out to Hugging Face’s book “Natural Language Processing with Transformers”!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ea1b70d65da" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Exciting Era of Computer Vision]]></title>
            <link>https://medium.com/@alizadnan123/the-exciting-era-of-computer-vision-26976c173d2d?source=rss-e432eb235fd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/26976c173d2d</guid>
            <dc:creator><![CDATA[Aliza Adnan]]></dc:creator>
            <pubDate>Fri, 27 Oct 2023 05:53:49 GMT</pubDate>
            <atom:updated>2023-10-27T05:53:49.770Z</atom:updated>
            <content:encoded><![CDATA[<p>You have heard a lot about new things now a days just like the generation of images by just a prompt or automated photoshop of images. But did you ever ponder that how these AMAZING features were built and enabled? What is the hidden concept behind these implementations? All these questions lead to the term <strong>“Computer Vision”.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*d-2VC1d1jdgeyAaFPRI7tg.jpeg" /><figcaption><a href="https://www.telusinternational.com/insights/ai-data/article/what-is-computer-vision">https://images.ctfassets.net/3viuren4us1n/14l8OD8yRKAV7hi6qiAH9r/25124a8bd55047eaf831820f80ff287f/Computer_vision_3.jpg</a></figcaption></figure><h3><strong>What is Computer Vision?</strong></h3><p>In simpler words, computer vision is the ability of a machine to assess, understand and interpret images or videos. But by formal definition,</p><p><em>“Computer vision is a field of artificial intelligence (AI) that enables computers and systems to derive meaningful information from digital images, videos and other visual inputs — and take actions or make recommendations based on that information.”</em></p><h3>Branches of Computer Vision</h3><p>Computer Vision has many branches under its shade which are revolutionizing the world. Following are the most popular branches of Computer Vision to which people are contributing today:</p><ul><li><strong>Object Detection and Recognition</strong></li></ul><p>It deals with the detecting of object and its position in the image and classifying or recognizing them.</p><ul><li><strong>Image Segmentation</strong></li></ul><p>It deals with the assigning of pixels of image to the objects present in the image or video.</p><ul><li><strong>Image Processing</strong></li></ul><p>This deals with the processing techniques like filtering, noise reducing and image enhancement of the images.</p><ul><li><strong>Tracking</strong></li></ul><p>This part of Computer Vision not only deals with the images or frames but also the time stamps as it helps in tracking the movement of the object.</p><ul><li><strong>Face Recognition and Verification</strong></li></ul><p>It deals with recognizing whether a face exists in the image and if it does then whose face is it.</p><ul><li><strong>Gesture Recognition</strong></li></ul><p>It deals with the understanding and interpreting of the hands and body gestures.</p><ul><li><strong>Document Analysis</strong></li></ul><p>It deals with the recognition of texts and understanding the meaning along with semantic analysis of the text. This branch also deals with the Natural Language Processing.</p><ul><li><strong>Augmented Reality</strong></li></ul><p>Augmented reality (AR) combines computer vision with real-world visual input to overlay digital information or objects onto the physical environment, creating interactive and immersive experiences.</p><ul><li><strong>Video Analysis</strong></li></ul><p>Video Analysis covers the almost all the previously mentioned branches but in the context of video and dealing with its each frame w.r.t time in some tasks.</p><ul><li><strong>Medical Image Analysis</strong></li></ul><p>Medical Image Analysis is one of the most thriving branches and it deals with disease recognition, its treatment etc. on X-rays, MRIs, and CT scans.</p><h3><strong>New Trends in Computer Vision</strong></h3><p>Computer Vision has advanced a lot if we compare it to its state which was five years ago. New research, implementation and optimisation techniques are playing a key role to it.</p><p>Following are the subfields of Computer Vision which are going to be in demand in the next few years:</p><ul><li><strong>Synthetic Data and Generative AI</strong></li><li><strong>3D Computer Vision</strong></li><li><strong>Edge Computing</strong></li><li><strong>Autonomous Vehicles</strong></li><li><strong>Detecting Deepfakes</strong></li><li><strong>Ethical Computer Vision</strong></li><li><strong>Real-Time Computer Vision</strong></li><li><strong>Satellite Computer Vision</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8tC53rWpuPhPw8dlnBu6Zw.png" /><figcaption><a href="https://d15shllkswkct0.cloudfront.net/wp-content/blogs.dir/1/files/2022/07/generative-AI.png">https://d15shllkswkct0.cloudfront.net/wp-content/blogs.dir/1/files/2022/07/generative-AI.png</a></figcaption></figure><h3>Conclusion</h3><p>In conclusion, computer vision has evolved into a dynamic and transformative field with a multitude of subfields that collectively shape our understanding and utilization of visual data. From image processing to deep learning, this multidisciplinary domain empowers us to extract invaluable insights from the world of pixels, opening doors to a multitude of applications across industries.</p><p>However, it’s important to acknowledge the challenges that lie ahead. The ethical implications of computer vision, privacy concerns, and the responsible deployment of AI technologies are paramount. Researchers and practitioners must work in tandem to ensure that the potential of computer vision is harnessed for the betterment of society.</p><h3>References</h3><p><a href="https://www.ibm.com/topics/computer-vision#:~:text=Resources-,What%20is%20computer%20vision%3F,recommendations%20based%20on%20that%20information">https://www.ibm.com/topics/computer-vision#:~:text=Resources-,What%20is%20computer%20vision%3F,recommendations%20based%20on%20that%20information</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=26976c173d2d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Keeping up with SBOM: SPDX, Syft and Grype]]></title>
            <link>https://medium.com/@alizadnan123/keeping-up-with-sbom-spdx-syft-and-grype-dee7b21f4e76?source=rss-e432eb235fd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/dee7b21f4e76</guid>
            <dc:creator><![CDATA[Aliza Adnan]]></dc:creator>
            <pubDate>Fri, 25 Nov 2022 11:11:31 GMT</pubDate>
            <atom:updated>2022-11-26T16:14:55.502Z</atom:updated>
            <content:encoded><![CDATA[<p>In the last few years, there’s so much development in the IT industry that every software needs to keep itself updated and release its version more frequently than ever before. Abiding by this need, the software becomes more prone to the threat of risks and vulnerabilities as it is using third party resources and containers to provide the customers with the best service. But what is it that brings us to the transparency of the supply chain in order to avoid cyber security threats? This question leads us to <strong>SBOM</strong>.</p><p>In this blog, I’ll be covering the following topics:</p><ol><li>Introduction to SBOM</li><li>Introduction to SPDX</li><li>Main functions of SPDX</li><li>Introduction to ko</li><li>ko Tutorial</li><li>Introduction to Syft</li><li>Syft Tutorial</li><li>Introduction to Grype</li><li>Grype Tutorial</li><li>References</li></ol><h3><strong>What is SBOM?</strong></h3><p>SBOM or Software Bill of Materials, is an inventory or a log of components and resources needed for an application or a software. It includes third party and open-source components such as dependencies, code, programming language frameworks and libraries in its list of ingredients in order to make the software viable, up-to-date and protected. It provides us with the complete lineage of where the components are coming from and where they are getting used or in other words, it comprises of a dependency tree of resources and components.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*lwCvmyw1pRHrpMLXcwYT-Q.png" /></figure><p>Now, in order to make SBOM usable and easy to read, a format or a standard is required according to which it remains consistent and uniform throughout the industry and this brings us to <strong>SPDX</strong>.</p><h3><strong>What is SPDX?</strong></h3><p>SPDX is an open standard managed by Linux for communicating SBOM information, including provenance, license, security, and other related information. It helps in maintaining the easy and the readability, or else a lot of time would be wasted in reformatting and understanding the SBOM information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cH_-IOvcz7NgVr3YJomTRg.png" /><figcaption>Taken from <a href="https://www.synopsys.com/glossary/what-is-spdx.html">https://www.synopsys.com/glossary/what-is-spdx.html</a></figcaption></figure><h4>Main functions of SPDX</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8NuFx9tmd26AZSwjJpvn-w.png" /><figcaption>Taken from <a href="https://www.linux.com/audience/iso-establishes-sbom-standard-for-open-source-development-with-spdx/">https://www.linux.com/audience/iso-establishes-sbom-standard-for-open-source-development-with-spdx/</a></figcaption></figure><p>SPDX tries to achieve its objectives by:</p><ul><li>Maintaining consistency and readability by standardizing a format for the supplier and consumer, thus preventing inefficiency and time, bandwidth and resource wastage in making the SBOM readable.</li><li>Raising awareness whenever it encounters issues with licenses of softwares or files used from other sources.</li></ul><p>There are multiple libraries and tools that are used for SPDX based SBOMs, but here I’ll target <strong>ko</strong> for generating SBOMs for Go language.</p><h4>Introduction to ko</h4><p><strong>ko</strong> is a fast image builder from containers and it also generates SPDX or CycloneDX formatted SBOMs by default.</p><h4>ko Tutorial</h4><p>You can install ko from its source by running this command. This command runs for Go 1.16+.</p><pre>go install github.com/google/ko@latest</pre><p>To generate SPDX or CycloneDX formatted SBOM with ko, we have to download and use <strong>cosign</strong> for it. Run the following command for building images and generating SBOM with ko by default:</p><pre>cosign download sbom $(ko build ./cmd/app)</pre><p>ko build ./cmd/app command build the image, pushes it and prints the resulting image digest to stdout. In this example, ./cmd/app must be a package main that defines func main(). The executable binary that was built from ./cmd/app is available in the image at /ko-app/app -- the binary name matches the base import path name -- and that binary is the image&#39;s entrypoint.</p><p>In simple words, this whole command builds the binary and puts it on top layer of base image, makes binary image as entry point and pushes it directly to the registry along with the SBOM from its binary. This command can be run without having Docker on your machine. Along with this, it shares the cache which means it will be reusing the build cache by default.</p><p>Now we have generated the SBOMs, but it becomes difficult to manually find the vulnerabilities from the provided information. To save the day, I present to you <strong>Syft and Grype!</strong></p><h4>Introduction to Syft</h4><p>Syft is a CLI tool and Go library for generating a SPDX, CycloneDX or Syft’s own formatted Software Bill of Materials (SBOM) from container images and filesystems maintained by Anchore. It is exceptional for vulnerability detection when used with a scanner like <a href="https://github.com/anchore/grype">Grype</a> which sets it apart from ko. It can also create signed SBOM attestations(validation that SBOM comes from trusted source) using the <a href="https://github.com/in-toto/attestation/blob/main/spec/README.md">in-toto specification</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/271/1*EnIzvKGJik2arnH4kzLy1A.png" /></figure><h4>Syft Tutorial</h4><p>In order to install and use syft, execute the following command:</p><pre>curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s — -b /usr/local/bin</pre><p>/usr/local/bin should be writable by user or else you can choose any other directory.</p><p>To create an image with Syft, we can type in:</p><pre>syft &lt;image&gt; -o &lt;format&gt;</pre><p>Insert in the container name in place of &lt;image&gt;and the format in place of &lt;format&gt;such as cyclonedx-json, spdx-json etc.</p><p>Here comes the second part where we can test vulnerabilities within the produced image using <strong>Grype.</strong></p><h4>Introduction to Grype</h4><p>Grype is a vulnerability scanner for container images and filesystems which works best when combined with Syft. The best part of Grype is that it doesn’t need to scan images again and again, we just need the SBOM file created by Syft(as shown above). It can find the vulnerabilities within the major operating system packages along with language-specific packages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/234/1*3Qpgb9hVjOoteJ34oG1OZg.png" /></figure><h4>Grype Tutorial</h4><p>We can install Grype by following command:</p><pre>$ curl -sSfL <br>https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s -- -b /usr/local/bin</pre><p>/usr/local/bin should be writable by user or else you can choose any other directory.</p><p>Now we can use Grype to find the insecurities within the image. By executing the following command, vulnerabilities will be listed along with their type, severity, available fixes etc.</p><p>Thus, keeping a SBOM is imperative to solve rapidly the security, license, and functional dangers that can go with open-source software use.</p><p>You can check out my other blogs on Supply Chain Security too!</p><ul><li><a href="https://medium.com/@alizadnan123/the-world-of-sbom-abf63003a74b">The World of SBOM</a></li><li><a href="https://medium.com/@alizadnan123/gitsign-a-new-way-to-secure-your-commits-ee5ab940ed1d">Gitsign: A new way to secure your commits</a></li></ul><p><strong>References</strong></p><ul><li><a href="https://www.howtogeek.com/devops/what-is-the-spdx-standard-and-how-is-it-helping-the-software-industry/">What Is The SPDX Standard and How Is It Helping The Software Industry?</a></li><li><a href="https://www.synopsys.com/glossary/what-is-spdx.html">Software Package Data Exchange (SPDX)</a></li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fo5eWy-2SDtc%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Do5eWy-2SDtc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fo5eWy-2SDtc%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/4932a9b8a2168a548d871d6a648eec11/href">https://medium.com/media/4932a9b8a2168a548d871d6a648eec11/href</a></iframe><ul><li><a href="https://github.com/anchore/syft">GitHub - anchore/syft: CLI tool and library for generating a Software Bill of Materials from container images and filesystems</a></li><li><a href="https://sylabs.io/2022/08/how-to-vulnerability-scanning-of-singularity-containers-with-syft-and-grype/">How To: Vulnerability Scanning of Singularity Containers with Syft and Grype | Sylabs</a></li><li><a href="https://github.com/anchore/grype">GitHub - anchore/grype: A vulnerability scanner for container images and filesystems</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dee7b21f4e76" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Gitsign: A new way to secure your commits]]></title>
            <link>https://medium.com/@alizadnan123/gitsign-a-new-way-to-secure-your-commits-ee5ab940ed1d?source=rss-e432eb235fd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee5ab940ed1d</guid>
            <dc:creator><![CDATA[Aliza Adnan]]></dc:creator>
            <pubDate>Mon, 17 Oct 2022 16:57:08 GMT</pubDate>
            <atom:updated>2022-11-04T06:52:27.709Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://www.sigstore.dev/">Sigstore</a>, an organization that helps you to secure your software by signing, verifying and protecting, has introduced a feature called Gitsign that helps you to protect your Git commits ensuring reliability. If you’re new to Gitsign and the importance of Gitsign is yet to be explored by you, then you have come to the right place!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/1*vXvhHgpWmDahC2xsdSF3-Q.png" /></figure><p>The topics I’ll be covering in my blog today are as follows:</p><p>1. Why do we need Gitsign?</p><p>2. What is Gitsign?</p><p>3. Gitsign Tutorial</p><p>4. Limitations</p><p>5. Conclusion</p><h3><strong>Why do we need Gitsign?</strong></h3><p>If you are a passionate open source contributor who helps people by providing features/applications/code on Github, then you might run into the problem where someone would make fake repositories under your name and will make fake commits just to show that they are legitimate which leads to tricking people to use their repositories and risking the user’s security as the code maybe malicious. This type of attack can come under the wing of <strong>typosquatting</strong> where the attacker impersonates a site or a project with slight amendments such as misspelled domain name or project names. The chart below shows the increase in the software supply chain attacks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*Wm7xfSEQmsMswq2klScwxw.png" /></figure><p>To avoid this type of attacks, a proposed solution is to sign your commits so later it can be verified that the commits didn’t come from an impersonator. There are several ways to sign your commits such as using:</p><p>· GPG (a public key encryption tool used for securing messages)</p><p>· SSH keys (a public key protocol to ensure the security of the data)</p><p>· S/MIME (a public key encryption mainly used for signing emails)</p><p>The problem with the above mentioned tools used to sign commits is that the long-lived keys can be compromised or can be lost. To save the day, here comes Gitsign!</p><h3>What is Gitsign?</h3><p>Gitsign is a feature that helps to <strong>sign the commits without keys</strong>. Yes, you heard it right! It uses the keyless signing concept where keys are generated for a short period of time till signing and they are verified to be valid at the time of signing. The concept of keyless signing in Gitsign is based on the foundations of Open ID Connect which is a simple identity layer on top of the OAuth 2.0 protocol. It allows clients to verify the identity of the end-user based on the authentication performed by an authorization server, as well as to obtain basic profile information about the end-user in an interoperable and REST-like manner. So, Gitsign likes to authenticate using your Github, Google or Microsoft account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-8oQdU5do_eDH3Af3lh1kQ.png" /></figure><h3>Gitsign Tutorial</h3><p>Now, we will be setting up gitsign and use it to sign our commits.</p><h4>Installation of gitsign</h4><p>We can install gitsign in Fedora and Debian/Ubunutu with the following commands.</p><p>For Fedora,</p><pre>$wget https://github.com/sigstore/gitsign/releases/download/v0.3.0/gitsign_0.3.0_linux_amd64.rpm<br>$sudo rpm -ivh gitsign_0.3.0_linux_amd64.rpm</pre><p>For Debian/Ubuntu,</p><pre>$wget https://github.com/sigstore/gitsign/releases/download/v0.3.0/gitsign_0.3.0_linux_amd64.deb<br>$sudo dpkg -i gitsign_0.3.0_linux_amd64.deb</pre><p>You can also use Go 1.17+ for installing gitsign,</p><pre>$go install github.com/sigstore/gitsign@latest</pre><p>It will result in a binary, with the path at $GOPATH/bin/gitsign.</p><h4>Setting up Gitsign with Git</h4><p>The following commands instruct to use gitsign for signing from now on and lets it know which key type to use i.e. x509. These commands will be run just once and will be used for configuration.</p><pre>$git config gpg.x509.program gitsign<br>$git config gpg.format x509<br>$git config commit.gpgsign true</pre><p>Now whenever you will commit, a new tab on your browser will open. Here you will have to login to sigstore and after that the following message would appear.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mALnihlWMEn1OTScdzhJLw.png" /></figure><h3>Limitations</h3><p>As Gitsign is fairly new, it has certain limitations and has to be upgraded with time. The biggest limitation is:</p><p>· Unavailability of Gitsign verification</p><p>The Githib’s trust root has not made sigstore’s Certificate Authority root its part and as it uses short-lived keys along with the standard (i.e. x509), makes it difficult to verify the signature after the keys have expired. To possible solution to this is using Rekor(provides a restful API-based server for validation, and a transparency log for storage) to add the validation layer to the verification, confirming that the key used was valid at the time of signature.</p><p><strong>But</strong>, GitHub Actions has got you covered by verifying Gitsign! It loops and checks for the commits between the <em>HEAD</em> and git <em>ref,</em> and reports the unverifiable commits with an error.</p><h3>Conclusion</h3><p>Thus, in order to protect and secure our open-source work ensuring the credibility, important security measures such as signing our commits are essential part of Software Supply Chain Security and Gitsign is present to contribute for this cause. Kudos to sigstore for introducing Gitsign!</p><h3>References</h3><ul><li><a href="https://dev.to/erikaheidi/enable-gitsign-today-and-start-signing-your-commits-2gda">Enable Gitsign Today and Start Signing your Commits</a></li><li><a href="https://github.com/sigstore/gitsign">GitHub - sigstore/gitsign: Keyless Git signing using Sigstore</a></li><li><a href="https://docs.sigstore.dev/gitsign/overview/">Gitsign Overview</a></li><li><a href="https://www.sigstore.dev/">sigstore</a></li><li><a href="https://www.sonatype.com/resources/state-of-the-software-supply-chain-2021">Sonatype&#39;s 2021 State of the Software Supply Chain</a></li><li><a href="https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits">Signing commits - GitHub Docs</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee5ab940ed1d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The World of SBOM]]></title>
            <link>https://medium.com/@alizadnan123/the-world-of-sbom-abf63003a74b?source=rss-e432eb235fd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/abf63003a74b</guid>
            <category><![CDATA[sbom]]></category>
            <category><![CDATA[software]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Aliza Adnan]]></dc:creator>
            <pubDate>Sat, 10 Sep 2022 12:05:09 GMT</pubDate>
            <atom:updated>2022-09-15T03:42:07.433Z</atom:updated>
            <content:encoded><![CDATA[<p>In the last few years, there’s so much development in the IT industry that every software needs to keep itself updated and release its version more frequently than ever before. Abiding by this need, the software becomes more prone to the threat of risks and vulnerabilities as it is using third party resources and containers to provide the customers with the best service. But what is it that brings us to the transparency of the supply chain in order to avoid cyber security threats? This question leads us to <strong>SBOM</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*MWBpBrAU6w5-vGGSjGlwkw.png" /></figure><p>In this blog, I’ll be covering the following topics:</p><p>1. What is SBOM?</p><p>2. Why SBOM is needed?</p><p>3. What is the cycle of SBOM?</p><p>4. What is the future of SBOM?</p><p>5. Conclusion</p><h3>What is SBOM?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xwmIagZTfy8HtwcREwQBPQ.png" /></figure><p>SBOM or Software Bill of Materials, is an inventory or a log of components and resources needed for an application or a software. It includes third party and open-source components such as dependencies, code, programming language frameworks and libraries in its list of ingredients in order to make the software viable, up-to-date and protected. It provides us with the complete lineage of where the components are coming from and where they are getting used or in other words, it comprises of a dependency tree of resources and components.</p><p>According to NTIA (National Telecommunications and Information Administration), SBOM should have the following minimal requirements:</p><ul><li>Component name.</li><li>Component version.</li><li>A unique identifier</li><li>Relationship with other components.</li><li>The organization/person that created the artifact.</li><li>The tool used to generate the SBOM.</li><li>The timestamp when the SBOM was generated.</li></ul><h3>Why SBOM is needed?</h3><p>As the need for “businesses to go online” is increasing, critical businesses are also opting to looking forward to grow online, not taking in consideration, the maintenance of security and the performance of their application. Whenever there is a vulnerability, the most probable source of vulnerability and threat is the component such as the third-party dependency. So, in order to track the risk, SBOM is needed. The other reasons why SBOM is needed are as follows:</p><p>· Handling the risk in software supply chain</p><p>· Avoiding vulnerabilities</p><p>· Making the software more secure and protected</p><p>· Analyzing the quality of supply chain</p><p>· Verifying license compliance</p><p>· Understanding the components used in the software</p><h3>What is the cycle of SBOM?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HKRWrA7EHrzpZOHRRJYuLg.png" /></figure><p>The lifecycle of SBOM consists of the following parts:</p><p>1. The code of the software consists of a programming language along with its modules or some other technologies.</p><p>2. This code goes to the CI/CD pipeline i.e., the delivering of the apps with automation in its process.</p><p>3. The combination of code and CI/CD travels down to the artifacts. Artifacts may be some container or a tarball. It is essentially a file system that provides packaging.</p><p>4. Here comes the SBOM, where we can use the inputs and form an SBOM for it. It is then made relevant to the artifacts.</p><p>5. Now SBOM can be used for services like checking the vulnerabilities, licenses, and compliance.</p><h3>What is the future of SBOM?</h3><p>SBOM is still in its growing phase and is expected to extend with high importance relative to its creation and consumption. Following developments in the SBOMS are as follows:</p><p>· CycloneDX is being developed frequently.</p><p>· SPDX 3.0 is being drafted.</p><p>· New SPDX standard is in consideration in order to store more data in the SBOMs and to add more depth along with integration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*iB_IpTMpSmpqKJ-ODVFo_w.png" /></figure><h3>Conclusion</h3><p>Considering that open source is a fundamental part of application development today, every company ought to utilize a viable SCA tool to use the open source and third-party components in their program.</p><p>Keeping a SBOM is imperative to solve rapidly the security, license, and functional dangers that can go with open-source software use.</p><h3>Learning Resources</h3><p>Dive deep into the world of SBOM with the help of these links:</p><p><a href="https://blog.chainguard.dev/what-an-sbom-can-do-for-you/">What an SBOM Can Do for You</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fv0nK2xT6D-I&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dv0nK2xT6D-I&amp;image=http%3A%2F%2Fi.ytimg.com%2Fvi%2Fv0nK2xT6D-I%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/ee126af886b9db1441b142f1ee3b4e35/href">https://medium.com/media/ee126af886b9db1441b142f1ee3b4e35/href</a></iframe><p><a href="https://www.sigstore.dev/">sigstore</a></p><h3><strong>References</strong></h3><ul><li><a href="https://www.veracode.com/blog/intro-appsec/what-sbom-and-why-do-you-need-one">What Is an SBOM and Why Do You Need One? | Veracode</a></li><li><a href="https://www.synopsys.com/blogs/software-security/software-bill-of-materials-bom/">What is a software bill of materials?</a></li><li><a href="https://www.techtarget.com/whatis/definition/software-bill-of-materials-SBOM">What is software bill of materials (SBOM)?</a></li><li><a href="https://www.legitsecurity.com/blog/what-is-an-sbom-sbom-explained-in-5-minutes?hsLang=en">What is an SBOM? SBOM explained in 5 minutes</a></li><li><a href="https://www.oxeye.io/blog/runtime-sbom-secure-microservices-with-runtime-visibility">Runtime SBOM - Secure Microservices with Runtime Visibility</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=abf63003a74b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>