<?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 Amit Jaiswar on Medium]]></title>
        <description><![CDATA[Stories by Amit Jaiswar on Medium]]></description>
        <link>https://medium.com/@amit-jsr?source=rss-38770e7c0413------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*0PXaW5CB1uEgqAwX</url>
            <title>Stories by Amit Jaiswar on Medium</title>
            <link>https://medium.com/@amit-jsr?source=rss-38770e7c0413------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 03:56:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@amit-jsr/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[Contextual Embeddings in NLP: Turning Understanding into Meaning]]></title>
            <link>https://medium.com/@amit-jsr/contextual-embeddings-in-nlp-turning-understanding-into-meaning-039816f8ed6e?source=rss-38770e7c0413------2</link>
            <guid isPermaLink="false">https://medium.com/p/039816f8ed6e</guid>
            <category><![CDATA[bert]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[contextual-embedding]]></category>
            <category><![CDATA[word-embeddings]]></category>
            <category><![CDATA[gpt]]></category>
            <dc:creator><![CDATA[Amit Jaiswar]]></dc:creator>
            <pubDate>Sat, 26 Jul 2025 09:32:25 GMT</pubDate>
            <atom:updated>2025-07-26T09:37:38.488Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qwYR7WROGaJMQd518_H43A.png" /></figure><p>Earlier, we saw how words can be translated into numbers that machines understand, using techniques like vectorization and embeddings.<br>However, traditional embeddings have a major limitation — they treat every word the same, regardless of its context.</p><p>Take the word <strong>bank</strong>, for example:</p><blockquote><em>He withdrew money from the bank → </em>financial institution<em><br> She sat on the bank and watched the water flow → </em>side of a river</blockquote><p>Models like Word2Vec or GloVe assign a static<strong> </strong>vector to the word <strong><em>bank</em></strong>, ignoring how its meaning changes. This lack of context affects performance in tasks like translation, sentiment analysis, and question answering.<br>That’s where contextual embeddings come in — they adjust a word’s meaning based on its context.</p><h4>What Are Contextual Embeddings?</h4><p>Contextual embeddings are smarter — unlike traditional embeddings, they generate different vectors for the same word depending on the surrounding words, just like humans interpret meaning from context.</p><p>Think of it this way:<br>The meaning of a word depends on the sentence it appears in. Contextual embeddings capture that variation, giving each word a representation that fits its role in the sentence.</p><h4>From Words to Meaning</h4><p>Word2Vec and GloVe were clever — but limited. They learned word meanings by noticing which words appear together. For example, if “<em>king”</em> often shows up near “<em>queen”</em> or “<em>royal”</em>, their vectors end up close in the embedding space.<br>But there’s a catch: these models don’t understand sentence structure.<br>They’re like someone memorizing words from flashcards — they know the words, but not how they fit into a sentence.</p><p>To move beyond that, researchers built models that do more than just memorize nearby words. These models understand <em>word order and sentence flow</em> using neural networks designed for sequences — think of them as smarter readers who comprehend the whole paragraph, not just individual words.</p><h4>How Do Contextual Embeddings Work?</h4><p>Contextual embeddings are built using <em>advanced neural network architectures</em> trained on large amounts of text. These models don’t just memorize words — they learn how words behave in different contexts.</p><p>At the core of any contextual model are LSTMs and Transformers.</p><p><strong>1. LSTMs (Long Short-Term Memory Networks)<br></strong>These models process text word by word. As they read each word, they remember what came before to help interpret what comes next.</p><p>Imagine listening to someone speak — each word builds on the previous one, gradually shaping the full meaning. LSTMs work the same way, adjusting their understanding as they move through the sentence.</p><p><strong>2. Transformers<br></strong>Transformers take a more powerful approach. Instead of reading one word at a time, they look at <em>the entire sentence at once</em>. This allows them to understand how all the words relate to each other instantly.</p><p>They use something called <strong>attention</strong>, which helps the model focus on the most important words when interpreting meaning.</p><p>Example: “The animal didn’t cross the road because it was too tired.”<br>The word <em>“it”</em> could be ambiguous — but attention helps the model understand that <em>“it”</em> refers to <em>“animal”</em>, not <em>“road”</em>.</p><h4>Contextual Embedding Models</h4><p>Now that we understand how contextual embeddings work, let’s look at the real-world models that brought them to life.</p><p>Among the most important breakthroughs in this evolution are ELMo, BERT, and GPT — each marking a leap in how machines understand language</p><p><strong>1. ELMo (Embeddings from Language Models)<br></strong>One of the earliest contextual embeddings, ELMo<strong>,</strong> uses a deep, <em>bidirectional LSTM </em>to process text. It reads each sentence both forward and backward, allowing it to understand how context shapes meaning.</p><p>Example: She can book a table vs He read a book.<br>The word <em>“book”</em> is a verb in the first sentence and a noun in the second.<br>ELMo captures this difference by giving <em>“book”</em> a different meaning in each context. <br>This was a major step — showing that context plays a key role in improving natural language understanding.</p><p><strong>2. BERT (Bidirectional Encoder Representations from Transformers)<br></strong>BERT introduced a new level of language understanding by reading text in both directions at once: <em>left to right and right to left </em>— using an attention-based architecture.<br>It’s trained using a clever technique called <em>masked language modeling:</em><br>During training, some words are hidden (or “masked”), and BERT learns to guess them based on the context around them.</p><p>Example: The [MASK] barked loudly.<br>BERT can infer that the missing word is likely <em>“dog” </em>by looking at the full sentence.<br>This bidirectional view allows it to create highly context-aware word embeddings — making it ideal for tasks like classification, summarization, and question answering.</p><p><strong>3. GPT (Generative Pretrained Transformer)<br></strong>Unlike BERT, GPT reads text left to right — one word at a time — and learns by predicting the next word in a sentence. It’s also built on an attention-based architecture, but with a focus on generation rather than understanding.<br>This training approach makes GPT especially good at producing fluent, coherent language — from essays and code to stories and conversations.</p><p>Example:<em> </em>Once upon a time, in a quiet village…<em><br></em>GPT might continue:<em> </em>“<em>there lived a wise old man who told stories to children.</em>”<br>This ability to generate complete, meaningful text makes GPT incredibly versatile.</p><p>It powers tools like ChatGPT — but it’s important to note the difference:<br><strong><em>GPT</em></strong> refers to the core model (like GPT-2, GPT-3, or GPT-4), while <strong><em>ChatGPT</em></strong> is built on top of these models, fine-tuned specifically for conversation and interaction.</p><p><strong>Contextual Embeddings in Action: </strong>A Simple Example</p><blockquote><em>She ordered a new Apple computer.<br>He ate an apple after lunch.</em></blockquote><p>Traditional embeddings treat both instances of <em>“apple”</em> the same.<br>But contextual embeddings are smarter. They understand that the first ‘apple’ refers to a tech brand, and the second is something you’d find in your kitchen<br><em>This simple example shows just how powerful context can be — and why context is essential to modern NLP systems.</em></p><h4>Conclusion</h4><p>Contextual embeddings represent a significant advancement in NLP. By incorporating context into word vectors, they help machines understand language more like humans do.<br>From early models like ELMo to powerful systems like BERT and GPT, these techniques have transformed tasks such as translation, summarization, and conversation.</p><p>As NLP continues to evolve, contextual embeddings will remain a core building block — enabling smarter, more intuitive, and human-like AI systems.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=039816f8ed6e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Embeddings in NLP: Turning Numbers into Understanding]]></title>
            <link>https://medium.com/@amit-jsr/embeddings-in-nlp-turning-vectors-into-understanding-328ebbd4032e?source=rss-38770e7c0413------2</link>
            <guid isPermaLink="false">https://medium.com/p/328ebbd4032e</guid>
            <category><![CDATA[ai-language-model]]></category>
            <category><![CDATA[word-to-vector]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[ai-language-understanding]]></category>
            <category><![CDATA[word-embeddings]]></category>
            <dc:creator><![CDATA[Amit Jaiswar]]></dc:creator>
            <pubDate>Sun, 20 Jul 2025 10:38:57 GMT</pubDate>
            <atom:updated>2025-07-30T08:08:46.606Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L8-rM5P1WUUfbWcROA000w.png" /></figure><p>Have you ever wondered how AI can tell that ‘king’ and ‘queen’ are related? Or why it can suggest similar words, complete your sentences, or even detect the emotion in a tweet?</p><p>The secret lies in a powerful technique called <strong>word embeddings</strong>.</p><p>Previously, we saw how basic vectorization turns words into numbers. But those techniques had limitations: they didn’t truly understand the <strong><em>meaning</em></strong> of words, how words <strong><em>relate</em></strong> to one another, or how they change based on context. <br>That’s where word embeddings come in. They help computers move beyond counting words and start learning what words <em>mean</em>.</p><h4><strong>What Are Word Embeddings?</strong></h4><p>A word embedding is a list of numbers (called a vector) that captures what a word means, based on how it is used in real text. These vectors are not just arbitrary numbers — they reflect actual relationships between words. Words that appear in <strong>similar situations</strong> will have <strong>similar vectors</strong>.</p><p>These vectors are dense, meaning they are compact and contain real-valued numbers, unlike long, sparse vectors with mostly 0s.</p><p>For example:</p><pre>king   → [0.23, 0.11, 0.87, ...]<br>queen  → [0.22, 0.09, 0.88, ...]<br>banana → [0.01, 0.44, 0.13, ...]</pre><p>Here, ‘<strong>king</strong> and ‘<strong>queen’</strong> are <strong>closer</strong> in vector space (meaning they’re semantically related), while ‘<strong>banana’</strong> is far away — it’s unrelated in meaning. This shows that the model understands something about the <strong>meaning</strong> and <strong>relationships</strong> between these words.</p><h4><strong>How Do Embeddings Work?</strong></h4><p>The idea behind word embeddings comes from a simple rule:</p><p><strong><em>“Words that occur in similar situations tend to have similar meanings.”</em></strong></p><p>For example, the word ‘<strong>bank’</strong> might frequently appear near words like ‘<strong>money,’ ‘loan,’</strong> and ‘<strong>account.’</strong> Another word like ‘<strong>hospital’</strong> might appear near ‘<strong>doctor, ‘nurse,’</strong> or ‘<strong>patient.’</strong></p><p>By scanning millions of sentences, the model <strong>learns</strong> which words tend to appear together and builds vector representations based on that.</p><p>There are two common ways that AI learns these word meanings:</p><ul><li><strong>CBOW (Continuous Bag of Words):</strong> The model tries to guess a word based on the words around it.</li><li><strong>Skip-Gram:</strong> It tries to guess nearby words based on one central word.</li></ul><p>These approaches help the model gradually learn which words tend to appear together, and what kinds of meanings they share.</p><h4>Popular Word Embedding Models</h4><p>Here are some well-known tools that generate word embeddings:</p><p><strong>1. Word2Vec (by Google)</strong></p><ul><li>Learns from large text corpora</li><li>Uses CBOW or Skip-Gram architecture</li><li>Captures both semantic and syntactic relationships</li></ul><p><strong>2. GloVe (by Stanford)</strong></p><ul><li>Based on global word co-occurrence statistics</li><li>Builds a matrix of how frequently words appear together</li><li>Creates vectors that reflect these patterns</li></ul><p><strong>3. FastText (by Facebook)</strong></p><ul><li>Breaks words into character n-grams (subwords)</li><li>Allows the model to understand misspellings and rare/new words</li><li>Especially useful for morphologically rich languages</li></ul><h4>Visualizing Word Embeddings</h4><p>Embeddings can be visualized in a way that highlights how words relate not just in meaning but in <strong>direction and distance</strong>.</p><pre>       king       queen<br>         ● -------- ●<br>                  <br>         <br>          ● -------- ●  <br>      man           woman<br><br>                                           ● banana (away)</pre><p>This shows:</p><ul><li><strong>“Man” → “King”</strong> and <strong>“Woman” → “Queen”</strong> have similar vector directions</li><li><strong>Equal distance</strong> reflects similar relationships (e.g., like gendered pairs).</li><li><strong>“Banana”</strong> is distant — it’s not semantically connected</li></ul><p>This kind of structure even allows simple vector math, like:</p><p><em>king - man + woman ≈ queen</em></p><h4>Real-World Use Case</h4><p>Let’s say you type ‘<strong>cute dog videos’</strong> into the search bar.<br>Even though you didn’t use the word ‘puppy,’ the app still shows puppy videos. <em>Why?</em><br> Because embeddings help it understand that:</p><ul><li><strong>‘cute’</strong> is often near ‘<strong>puppy’</strong></li><li><strong>‘dog’</strong> and ‘<strong>puppy’</strong> are semantically related</li></ul><p>Word embeddings were a game-changer. They helped AI move from memorizing words to <em>understanding meaning</em>, capturing relationships, analogies, and even basic logic through math.</p><p>But language is rich, messy, and full of nuance. A single word can mean different things in different situations, and these traditional embeddings may fail to capture them.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=328ebbd4032e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Vectorization in NLP: Turning Words into Numbers]]></title>
            <link>https://medium.com/@amit-jsr/vectorization-in-nlp-turning-words-into-numbers-72b134284756?source=rss-38770e7c0413------2</link>
            <guid isPermaLink="false">https://medium.com/p/72b134284756</guid>
            <category><![CDATA[vectorization-in-nlp]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[bag-of-words]]></category>
            <category><![CDATA[one-hot-encoding]]></category>
            <category><![CDATA[text-vectorization]]></category>
            <dc:creator><![CDATA[Amit Jaiswar]]></dc:creator>
            <pubDate>Sun, 13 Jul 2025 19:58:20 GMT</pubDate>
            <atom:updated>2025-08-03T14:23:11.546Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L-GbysVLkFPut8v-6afr8A.png" /></figure><p>Have you ever asked your phone a question or typed a message into ChatGPT and wondered: <em>How does it know what I mean?</em></p><p>The reality is, machines don’t understand language the way humans do. <br>They don’t feel emotions, catch sarcasm, or truly grasp what you’re saying.<br>Instead, they understand <em>numbers —</em> because that’s the only language computers can speak.</p><p>So, before a computer can even begin to make sense of a sentence, it first needs to <em>convert those words into numbers.<br></em>That step is called vectorization, and it’s the very first thing that happens in Natural Language Processing that teaches machines to understand and work with human language.</p><p><strong>Why Vectorization Matters in NLP</strong></p><p>Vectorization is what makes human language usable by machines — it’s where understanding begins.<br>Humans understand the meaning, emotion, and context behind words.<br>But to a computer, the words are just a sequence of letters and symbols — <em>meaningless</em> unless we assign them a numerical value.</p><p>Take this sentence: “I love pizza.”</p><p>To us, it means something delicious.<br>To a machine, it’s just &quot;I&quot;, &quot;love&quot;, and &quot;pizza&quot; — and it must vectorize these words to do anything useful with them.</p><p>So, if we want a machine to analyze, learn from, or respond to text, we first need to translate that language into something it can understand: <em>Numbers</em>.</p><p><strong>What Is Vectorization?</strong></p><p>Vectorization is the process of converting each word or sentence into a vector — a list of numbers that captures something meaningful about the text. Without vectorization, machines wouldn’t be able to process or learn anything from human language.</p><p>Think of it like this:<br>You say, <em>“I love </em>pizza<em>.”</em><br> The computer sees: [0.12, 0.43, 0.91] ← (just an example)</p><p>Let’s now look at how we can turn words into vectors using some common NLP techniques.</p><p><strong>1. One-Hot Encoding</strong></p><p>This is the most straightforward method to vectorize text.<br>In One-Hot Encoding, each word from the vocabulary is represented by a vector where:</p><ul><li>One position is marked as 1 (to indicate the word)</li><li>All others are 0</li></ul><p>It’s like giving every word a unique switch.<br>Let’s say your vocabulary is: [&quot;cat&quot;, &quot;dog&quot;, &quot;fish&quot;]<br>Then:</p><ul><li>&quot;cat&quot; → [1, 0, 0]</li><li>&quot;dog&quot; → [0, 1, 0]</li><li>&quot;fish&quot; → [0, 0, 1]</li></ul><p>Each word gets its position in the vector.</p><p><strong><em>Limitation:</em></strong></p><ul><li>One-hot encoding doesn’t capture meaning or relationships.</li><li>To a computer &quot;cat&quot; and &quot;dog&quot; are completely unrelated, even though they’re both animals.</li><li>It also creates huge and sparse vectors for bigger vocabularies.</li></ul><p><strong>2. Bag of Words (BoW)</strong></p><p>Bag of Words builds a vector by counting how often each word appears in a sentence or document.<br>It doesn’t care about grammar or word order — it just counts.<br>Text: <em>“I love NLP and I love Python”</em><br>Vocabulary: [&quot;I&quot;, &quot;love&quot;, &quot;NLP&quot;, &quot;Python&quot;, &quot;and&quot;]<br>Then the vector is: → [2, 2, 1, 1, 1]<br>This means:</p><ul><li>&quot;I&quot; and &quot;love&quot; appear twice</li><li>&quot;NLP&quot;, &quot;Python&quot;, and &quot;and&quot; appear once</li></ul><p>Similarly, “I love Python” can be represented as [1, 1, 0, 1, 0].</p><p><strong><em>Limitation:</em></strong></p><ul><li>Ignores word order (so <em>“Python loves I”</em> looks the same).</li><li>Doesn’t understand meaning — it treats all words as equally unrelated</li><li>It can become very large with a big vocabulary.</li></ul><p><strong>3. TF-IDF (Smarter Bag of Words)</strong></p><p>TF-IDF stands for:</p><ul><li>TF — Term Frequency: how often a word appears in a document</li><li>IDF — Inverse Document Frequency: how rare that word is across many documents</li></ul><p>Together, TF-IDF gives higher importance to meaningful words and less weight to very common ones (like “the” or “is”).<br>In a set of emails, the word “unsubscribe” might only appear in marketing messages. TF-IDF gives this word more weight because it’s rare and important, unlike “hello” or “you”.</p><p><strong>Use Cases: </strong>Spam filters, Search engines, News/Article tagging systems</p><p><strong><em>Limitation:</em></strong></p><ul><li>Still doesn’t capture meaning or word order, though smarter than BoW.</li></ul><p><strong>From Words to Sentences</strong></p><p>Here, we mostly focused on how individual words are turned into numbers using basic vectorization techniques. <br>But what about full sentences or entire documents?<br>Once each word is represented as a vector, we can combine those word vectors through averaging, weighting, or more advanced techniques to create a <em>sentence vector</em>.</p><p>This helps machines move beyond words to understand full sentences, documents, and even conversations.</p><p><strong>Why These Methods Aren’t Enough</strong></p><p>Let’s say you have these three sentences:</p><ul><li><em>“I love dogs.”</em></li><li><em>“I like dogs.”</em></li><li><em>“I hate dogs.”</em></li></ul><p>Humans know the first two are similar, and the third is quite different.<br>But to these methods, all three are just bags of words — they miss the emotional difference.<br>That’s because: <em>These techniques treat words as isolated tokens, with no sense of context or meaning.</em></p><p>To truly capture relationships between words, we need smarter techniques like word embeddings, which capture meaning and similarity.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=72b134284756" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Natural Language Processing: Human to Machine]]></title>
            <link>https://medium.com/@amit-jsr/natural-language-processing-human-to-machine-0c543aea9d0f?source=rss-38770e7c0413------2</link>
            <guid isPermaLink="false">https://medium.com/p/0c543aea9d0f</guid>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[natural-language]]></category>
            <category><![CDATA[natural-language-process]]></category>
            <dc:creator><![CDATA[Amit Jaiswar]]></dc:creator>
            <pubDate>Mon, 10 Feb 2025 13:33:33 GMT</pubDate>
            <atom:updated>2025-02-10T13:33:33.087Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*B8z95UFKPVpgD4qv" /></figure><p>In a world full of words, have you ever typed a message and your phone magically suggested the next word? Or maybe you’ve searched for “best **thing** near me” on Google, and without missing a beat, it showed you exactly what you needed. How does this magic happen? That’s not magic — it’s Natural Language Processing (NLP) in action for you.</p><p>NLP is the invisible technology that helps machines understand what we say, what we type, and even what we mean. It acts as an interface between human language and computer understanding.</p><p><strong>What Does NLP Stand For?</strong></p><ul><li><strong>Natural Language:</strong> The way humans naturally communicate — through languages like English, Hindi, Spanish, etc.</li><li><strong>Processing:</strong> How computers analyze, understand, and respond to language.</li></ul><p>In simple words: <em>NLP is about teaching computers to read, listen, understand, and even talk back to us. </em>Imagine talking to your friend — you use words, emotions, and gestures to communicate. In the same way, NLP helps computers do similar things with their understanding of language.</p><p><strong>Real-Life Examples:</strong></p><p>NLP is everywhere, working behind the scenes in the apps and tools we use every day without us even realizing it:</p><ol><li><strong>Virtual Assistants:</strong> When you ask, <em>“What’s the weather today?” </em>NLP helps your assistant understand and respond accurately.</li><li><strong>Google Search:</strong> Typing <em>“best pizza near me”?</em> NLP interprets your intent and fetches the right local recommendations.</li><li><strong>Spam Detection:</strong> Gmail filters spam by analyzing email content using NLP algorithms.</li><li><strong>Chatbots:</strong> Asking, <em>“Where’s my order?”</em> NLP enables chatbots to provide meaningful, accurate responses.</li></ol><p><strong>How Does NLP Work?</strong></p><p>Think of NLP as teaching a child to understand language:</p><ul><li><strong>Learning Words:</strong> Recognizing individual words and their meanings.</li><li><strong>Understanding Sentences:</strong> Connecting words to form coherent, meaningful sentences.</li><li><strong>Grasping Meaning:</strong> Understanding the context, implied meanings, and even emotions behind the words.</li></ul><p>For example, the phrase <em>“I’m feeling blue”</em> doesn’t mean someone’s turning into the color blue. NLP helps machines figure out that it refers to feeling sad — because context matters.</p><p><strong>Evolution of NLP</strong></p><p>From Rule-Based Systems to Large Language Models (LLMs):</p><ul><li><strong>Early NLP (1950s–1980s):</strong> Rule-based systems with manually crafted linguistic rules and logic.</li><li><strong>Statistical NLP (1990s–2000s):</strong> Shift to probabilistic models, where machines learn patterns from large datasets.</li><li><strong>Neural Networks &amp; Word Embeddings (2010s):</strong> Introduction of dense word representations like <strong>Word2Vec </strong>along with <strong>Recurrent Neural Networks (RNNs)</strong> and <strong>Attention Mechanism</strong>, enabling deeper language understanding.</li><li><strong>Transformers &amp; LLMs (2020s–Present):</strong> The rise of transformer architectures (e.g., BERT, GPT) revolutionized NLP with large-scale pretraining and fine-tuning.</li></ul><p><strong>Why Is NLP Challenging?</strong></p><p>Language understanding is complex, dynamic, and full of ambiguities — requiring adaptable, learning-based systems rather than rigid, rule-based logic.</p><ul><li><strong>Ambiguity:</strong> <em>“Can you book a table?”</em> — Are you asking to make a reservation or physically move a table?</li><li><strong>Polysemy:</strong> <em>“Bat”</em> — Is it an animal or a piece of sports equipment?</li><li><strong>Slang:</strong> <em>“That’s lit!”</em> — It means “cool,” not literally “on fire.”</li><li><strong>Cultural Nuances:</strong> Sarcasm, idioms, and cultural expressions vary widely and can be hard for machines to interpret.</li></ul><p><strong>Fun Facts-</strong></p><ul><li><strong>ELIZA:</strong> The first chatbot, which simulated a conversation with a therapist, was <strong>created in 1966.</strong></li><li><strong>Google Translate:</strong> Processes over <strong>100 billion words</strong> daily.</li><li><strong>Modern NLP Models:</strong> GPT-4 is trained on over <strong>500 billion words</strong>.</li></ul><p><strong>Conclusion</strong></p><p>NLP is all around us — from voice assistants and search engines to spam filters and chatbots. It helps machines understand humans, not just through words, but by capturing meaning, intent, and context. The next time you get a spot-on suggestion from Google, remember there’s a world of NLP working behind the scenes, making your digital life smarter.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0c543aea9d0f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Buzzwords: Exploring the Data Warehouse Keywords]]></title>
            <link>https://medium.com/@amit-jsr/data-buzzwords-exploring-the-data-warehouse-keywords-dff24d7f3470?source=rss-38770e7c0413------2</link>
            <guid isPermaLink="false">https://medium.com/p/dff24d7f3470</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-warehouse]]></category>
            <category><![CDATA[data-world]]></category>
            <category><![CDATA[data-technology]]></category>
            <category><![CDATA[data-management]]></category>
            <dc:creator><![CDATA[Amit Jaiswar]]></dc:creator>
            <pubDate>Tue, 15 Aug 2023 16:26:19 GMT</pubDate>
            <atom:updated>2024-05-03T16:33:50.218Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Qk14mI4WY-B6rZhm" /></figure><p><strong>Introduction:</strong></p><p>In the world of data management and analytics, numerous buzzwords and keywords have emerged. These words show the newest ideas and trends in storing and managing data. In this article, we’ll look at some important data words like a data lake, delta lake, data mart, data warehouse, lake house, and data mesh.</p><p><strong>1. Data Lake:</strong></p><p>A data lake is a centralized repository that stores vast amounts of structured, semi-structured, and unstructured data at any scale. Data lakes accommodate raw and unprocessed data, making it more flexible and accessible for data exploration and analytics. The data lake architecture allows organizations to capture diverse data types from various sources, providing a foundation for advanced analytics and data-driven insights.</p><p><strong>2. Delta Lake:</strong></p><p>Delta Lake is an open-source storage layer that sits on top of a data lake, bringing ACID (Atomicity, Consistency, Isolation, Durability) transactions to big data workloads. It enhances the reliability and performance of data processing in data lakes, enabling real-time analytics and streamlining data pipelines. Delta Lake ensures data consistency and data quality, making it an essential keyword in modern data engineering and data warehousing.</p><p><strong>3. Data Mart:</strong></p><p>A data mart is a subset of a data warehouse, focusing on a specific business function, department, or user group. It is designed to serve the needs of a particular set of users, providing them with tailored data models and access to relevant information for their analytical requirements. Data marts simplify data accessibility and analysis for end-users, allowing them to make informed decisions based on their specific domain.</p><p><strong>4. Data Warehouse:</strong></p><p>A data warehouse is a centralized and integrated repository that stores structured data from various sources, enabling business intelligence and data analytics. It serves as a single source of truth, where historical and current data is stored, transformed, and organized for querying and reporting. Data warehouses play a crucial role in business decision-making, offering valuable insights to stakeholders across the organization.</p><p><strong>5. Data Lakehouse:</strong></p><p>A data lakehouse is a modern data architecture that combines the features of a data lake and a data warehouse. It typically uses a unified platform for storing both structured and unstructured data in its raw format, similar to a data lake. However, it also integrates elements of a data warehouse by organizing and structuring the data to facilitate easier querying and analysis. Additionally, it offers near real-time analytics and simplified data management.</p><p><strong>6. Data Mesh:</strong></p><p>Data Mesh is a paradigm shift in data architecture that decentralizes data ownership and delivery. It advocates for domain-oriented decentralized data teams, where data producers and data consumers collaborate through self-serve data infrastructure. This approach reduces bottlenecks, improves data quality, and enhances the overall data ecosystem within an organization.</p><p><strong>7. Data Governance:</strong></p><p>Data Governance is the framework that ensures data is managed, used, and protected optimally across the organization. It encompasses policies, processes, and practices that maintain data quality, security, compliance and usability. Effective data governance brings data trustworthiness, accountability, and strategic decision-making. It empowers organizations to harness the full potential of their data while ensuring ethical use, regulatory compliance, and the realization of data-driven goals.</p><p><strong>Conclusion:</strong></p><p>The world of data warehousing is filled with buzzwords and innovative concepts that continually reshape how organizations handle and utilize their data. So, understanding these terms is essential for staying relevant in the data landscape and harnessing the full potential of data analytics for organizational growth and success.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dff24d7f3470" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implementing (SCD2) : Slowly Changing Dimension Type 2]]></title>
            <link>https://medium.com/@amit-jsr/implementing-scd2-in-snowflake-slowly-changing-dimension-type-2-7ff793647150?source=rss-38770e7c0413------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ff793647150</guid>
            <category><![CDATA[scd]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[etl]]></category>
            <category><![CDATA[etl-pipeline]]></category>
            <category><![CDATA[scd-type-2]]></category>
            <dc:creator><![CDATA[Amit Jaiswar]]></dc:creator>
            <pubDate>Tue, 25 Jul 2023 19:55:33 GMT</pubDate>
            <atom:updated>2026-04-05T15:27:12.400Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction:</strong></p><p>In the world of data warehousing, Slowly Changing Dimensions Type 2 (SDC2) is one of the most commonly used techniques, which allows us to maintain a complete history of changes in a dimensional table.</p><p>As we already know that the MERGE statement in Snowflake enables us to update and insert new records based on specific conditions, we will apply the same methodology in this situation.</p><p>In this article, we will explore how to implement SCD Type 2 in Snowflake with the necessary code examples.</p><p><strong>What is SCD2?</strong></p><p>SCD Type 2 is used to capture and manage both current and historical data changes effectively. Instead of updating existing records, it creates new rows for each change in dimension attributes, maintaining multiple versions of records in the table where each version can be identified by a unique key and an effective date range.</p><p>It also enables accurate reporting and analysis of historical data while ensuring data warehouse integrity.</p><p><strong>Design the Base Table:</strong></p><p>It’s essential to design your dimension table appropriately.</p><p>The dimension tables must have -</p><ol><li>Primary Key: A unique identifier for each record.</li><li>Dimension Attributes: Columns representing various attributes of the dimension.</li><li>ValidFrom: The start date of the record’s validity.</li><li>ValidTo: The end date of the record’s validity.</li><li>ActiveFlag: A Boolean flag indicating if the record is the latest.</li></ol><p><strong>Implementing SCD2 in Snowflake:</strong></p><p>The core idea here is to insert all records from the staging table into the final table, as they represent the latest state for any records (identified by the primary key).</p><p>For this purpose, we maintain the <strong>ValidFrom = Current_Timestamp()</strong> and <strong>ValidTo = NULL</strong> along with an <strong>ActiveFlag </strong>set to <strong>1</strong>, meaning an active record representing the latest state.</p><p>Conversely, we need to update the existing record in the final table that has been recently updated (present in the stage, identified by the primary key).</p><p>Similarly, here we maintain <strong>ValidTo = Current_Timestamp()</strong> along with an <strong>ActiveFlag</strong> set to <strong>0</strong>, meaning an inactive record representing the previous state.</p><p>To implement the solution, follow these steps:</p><p><strong>Step-1: Prepare Unified Stage Data</strong></p><ol><li>Initially, we identify the records that require updating in the final table. These are the records that are still marked as active in the final table and are also present in the stage table. To accomplish this, we introduce a new column called merge key, which will hold the primary key value.</li><li>Next, we include all the records from the staging table and add the merge key column with null values for these records.</li><li>Subsequently, we perform a union of both data sets, resulting in a unified staging dataset.</li></ol><p><strong>Step-2: Perform MERGE Operation</strong></p><p>Using the above stage data, execute the merge command with the appropriate action.</p><ol><li>It performs the update if an update is present (where the merge key matches the primary key).</li><li>If performs the insert if it’s a new record (latest version) where the merge key has null values.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DewAITyXyrv1tiRJJqIK_A.png" /></figure><p>Note: While matching the primary key and the active flag in the join condition, we also check if the row has been updated by comparing the entire row data to the latest version of the data. This comparison can be done using a concatenation operation, hashing the entire row data, or any other suitable method.</p><p><strong>Conclusion:</strong></p><p>Slowly Changing Dimension Type 2 (SCD2) is an essential technique for managing historical data changes in a data warehouse. When combined with Snowflake’s advanced capabilities, implementing SCD2 becomes a straightforward and efficient process.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ff793647150" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implementing (SCD1) : Slowly Changing Dimension Type 1]]></title>
            <link>https://medium.com/@amit-jsr/implementing-slowly-changing-dimension-type-1-scd1-in-snowflake-d2206ec3cc01?source=rss-38770e7c0413------2</link>
            <guid isPermaLink="false">https://medium.com/p/d2206ec3cc01</guid>
            <category><![CDATA[etl]]></category>
            <category><![CDATA[scd]]></category>
            <category><![CDATA[etl-pipeline]]></category>
            <category><![CDATA[scd-type-1]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Amit Jaiswar]]></dc:creator>
            <pubDate>Sat, 15 Jul 2023 11:31:57 GMT</pubDate>
            <atom:updated>2026-04-05T15:27:40.543Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction:</strong></p><p>In this article, we will explore how to implement Slowly Changing Dimension Type 1 (SCD1) in Snowflake, with a practical solution for maintaining up-to-date data.</p><p><strong>Prerequisites:</strong></p><p>To follow along with this article, you should have a basic understanding of data warehousing concepts and Snowflake SQL.</p><p><strong>What is SCD1?</strong></p><p>SCD1 is the simplest type of Slowly Changing Dimension, where existing values are overwritten with new ones without preserving historical data.</p><p><strong>Understanding Snowflake and Its Capabilities:</strong></p><p>Snowflake is a powerful data warehousing platform that supports the MERGE statement, which simplifies updating dimension records based on specific conditions. The MERGE statement combines INSERT, UPDATE, and DELETE operations into a single SQL statement, providing a streamlined approach to SCD1 updates.</p><p>Additionally, we can automate SCD1 updates for up-to-date data using Snowflake Tasks or external schedulers.</p><p><strong>Design the Base Table:</strong></p><p>Before implementing SCD1 in Snowflake, it’s essential to design your dimension table appropriately.</p><p>The dimension tables must have -</p><ol><li>Primary Key: A unique identifier for each record.</li><li>Dimension Attributes: Columns representing various attributes of the dimension, such as name, description, or category.</li><li>Timestamp Attributes: To track the validity period of each record.</li></ol><p><strong>Implementing SCD1 in Snowflake:</strong></p><p>Now let’s dive into the implementation of SCD1 in Snowflake using the MERGE statement. The MERGE statement allows us to update existing records and insert new records if they don’t already exist.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P8k2EUlHGvQaFfxAgkluVw.png" /></figure><p><strong>Conclusion:</strong></p><p>Implementing SCD1 in Snowflake is a straightforward process that leverages Snowflake’s powerful capabilities like MERGE command. Following the steps outlined in this post, you can efficiently manage changing dimension attributes in your Snowflake data warehouse.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2206ec3cc01" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Change Data Capture (CDC): How It Works]]></title>
            <link>https://medium.com/@amit-jsr/change-data-capture-cdc-how-it-works-850172346672?source=rss-38770e7c0413------2</link>
            <guid isPermaLink="false">https://medium.com/p/850172346672</guid>
            <category><![CDATA[data-warehouse]]></category>
            <category><![CDATA[data-migration]]></category>
            <category><![CDATA[change-data-capture]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Amit Jaiswar]]></dc:creator>
            <pubDate>Thu, 29 Jun 2023 13:03:28 GMT</pubDate>
            <atom:updated>2024-02-14T11:15:00.384Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VLdWyDk3VAzpF3hTA95AQQ.png" /></figure><p><strong>Introduction:</strong></p><p>In today’s data-driven world, businesses are generating huge amounts of data every day. To make informed decisions and gain valuable insights, it is crucial to keep track of data changes in real time. This is where Change Data Capture becomes needful. CDC is a technique that enables organizations to capture and propagate data changes across various systems and applications. In this article, we will explore how CDC works and discuss different methods of the CDC.</p><p><strong>What is Change Data Capture (CDC)?</strong></p><p>Change Data Capture is a utility that is used to identify and capture the changes made to data in a database. It captures the modifications, additions, and deletions made to specific tables or rows, and then propagates those changes to other systems or downstream applications. By capturing and delivering real-time data changes, CDC helps maintain consistency and synchronicity among different databases or data stores.</p><p><strong>How Does CDC Work?</strong></p><p>Change Data Capture (CDC) involves the following steps:</p><ol><li>Identify Changes: Identify the data changes from the database (transaction) logs.</li><li>Extract Changes: Extract relevant data changes identified from the database logs.</li><li>Transform Changes: Extracted changes are transformed and formatted to match target systems or applications.</li><li>Propagate Changes: Transformed data changes are transmitted to target systems or applications using various methods.</li><li>Apply Changes: Target systems or applications receive and apply the propagated changes, ensuring data synchronization.</li></ol><p><strong>Change Data Capture Methods</strong></p><p><strong>1. Audit Column-Based CDC</strong></p><p>By using the ‘Last_Update’ or ‘Last_Modified’ columns, one can create their own change data capture solutions. This approach only captures the rows that have been changed since the data was last extracted.</p><p>This method offers the benefits of being built with native application logic and not relying on external tools, but it has drawbacks including increased database overhead and additional scripts to <strong>track deletes.</strong></p><p><strong>2. Delta Table-Based CDC</strong></p><p>This method involves comparing the data in two tables to identify any differences. Then, additional scripts can be used to apply the changes from the source table to the target table, providing an alternative way to capture and track data changes.</p><p>This approach offers the advantage of accurately tracking changed data using native SQL scripts, but it has the disadvantage of significantly increasing storage demand due to the need for copies of the data sources, lacks scalability for heavy transactional workloads, requires significant CPU resources for identifying differences, introduces latency, and cannot be performed in real-time.</p><p><strong>3. Trigger-Based CDC</strong></p><p>By utilizing database triggers and creating a custom change log in shadow tables, where triggers are activated before or after INSERT, UPDATE, or DELETE commands to track changes. While this method operates at the SQL level and is preferred by some users, it has the drawback of requiring triggers for each table in the source database, resulting in increased overhead and performance impact during ongoing operations. Furthermore, managing and maintaining these triggers as the application evolves can become a management burden.</p><p>However, a major drawback is that it significantly reduces database performance due to the requirement of multiple writes for every row insertion, update, or deletion.</p><p><strong>4. Log-Based CDC</strong></p><p>Log-based change data capture involves reading new database transactions, such as inserts, updates, and deletes, directly from the native transaction logs of source databases.</p><p>This approach allows for capturing changes without impacting the application or scanning operational tables, thereby reducing workload and preserving the performance of source systems.</p><p>This approach offers advantages such as the minimal impact on the production database, no need for additional queries per transaction, maintaining ACID reliability across multiple systems, and avoiding schema changes or extra tables in the production database.</p><p>Challenges in this approach include understanding the complex and undocumented logging format, adapting to changes in releases, managing metadata for change events, and a slight impact on performance due to log levels.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=850172346672" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Change Data Capture (CDC): Exploring SCD Techniques]]></title>
            <link>https://medium.com/@amit-jsr/change-data-capture-cdc-in-data-warehouses-exploring-scd-techniques-d9ca9df543c6?source=rss-38770e7c0413------2</link>
            <guid isPermaLink="false">https://medium.com/p/d9ca9df543c6</guid>
            <category><![CDATA[data-warehouse]]></category>
            <category><![CDATA[slowly-changing-dimension]]></category>
            <category><![CDATA[scd-type-1]]></category>
            <category><![CDATA[scd-type-2]]></category>
            <category><![CDATA[change-data-capture]]></category>
            <dc:creator><![CDATA[Amit Jaiswar]]></dc:creator>
            <pubDate>Sat, 24 Jun 2023 09:24:58 GMT</pubDate>
            <atom:updated>2024-02-14T11:15:38.832Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MIhn-hq_8VJrYVRHklyueQ.png" /></figure><p><strong>Introduction:</strong></p><p>In the era of big data, organizations are faced with the challenge of managing the ever-changing landscape of data in their data warehouses. Change Data Capture (CDC) has emerged as a game-changing technique for capturing and processing incremental changes in data warehouses.</p><p>In this article, we will learn about the significance of the CDC and explore various Slowly Changing Dimension (SCD) techniques to handle CDC effectively.</p><p><strong>Understanding CDC in Data Warehouses:</strong></p><p>Change Data Capture (CDC) is a method used to identify and capture changes made to source data systems. It enables organizations to track and replicate these changes efficiently, ensuring that the data in data warehouses remains up to date. CDC plays a vital role in real-time or near-real-time data integration, minimizing data transfer and processing time.</p><p><strong>Handling CDC using SCD Techniques:</strong></p><p>SCD techniques provide effective ways to handle CDC in data warehouses. <br>Let’s explore the common SCD types and their applicability:</p><p><strong>SCD Type 1:</strong> Overwriting Existing Data<br>In SCD Type 1, the existing data is updated with new values. This approach overwrites the previous data and retains only the most recent values. SCD Type 1 is suitable when historical tracking is not required, and the focus is solely on the current state of the data. It is simple to implement, has low storage overhead, and is ideal for scenarios where maintaining historical information is not crucial.</p><p><strong>SCD Type 2: </strong>Preserving Historical Versions<br>SCD Type 2 involves creating new records to preserve the history of changes. Each change results in a new version of the dimension record, distinguished by a unique identifier or timestamp. This technique allows organizations to track historical changes and perform historical analysis and reporting. Although it requires increased storage and complex queries, SCD Type 2 is valuable when comprehensive historical tracking is needed.</p><p><strong>SCD Type 3: </strong>Limited Historical Tracking<br>SCD Type 3 captures changes by adding additional columns to the dimension table to store previous attribute values. Rather than creating new records, this technique retains limited historical information by maintaining both current and previous attribute values. SCD Type 3 strikes a balance between storage efficiency and historical tracking. It provides some historical context without incurring the storage requirements of SCD Type 2.</p><p><strong>Choosing the Right SCD Technique:</strong></p><p>The choice of SCD technique depends on the specific requirements of the organization, data analysis needs, and storage considerations. While SCD Type 1 offers simplicity and low storage overhead, SCD Type 2 is suitable for comprehensive historical tracking, and SCD Type 3 balances storage efficiency and historical context.</p><p><strong>Implementing CDC with SCD Techniques:</strong></p><p>To effectively handle CDC using SCD techniques, organizations can leverage change tracking mechanisms such as log-based CDC, trigger-based CDC, or timestamp-based CDC. These mechanisms capture changes in the source systems and facilitate the extraction and integration of changed data into the data warehouse, adhering to the chosen SCD approach.</p><p><strong>Conclusion:</strong></p><p>Change Data Capture (CDC) empowers organizations to capture and process incremental changes in their data warehouses efficiently. By employing appropriate Slowly Changing Dimension (SCD) techniques, organizations can handle CDC effectively. SCD Type 1, Type 2, and Type 3 offer distinct benefits and considerations. The choice of SCD technique depends on the organization’s requirements for historical tracking, storage, and data analysis needs. Leveraging CDC with suitable SCD techniques enables organizations to maintain data integrity, track changes accurately, and make informed decisions in the ever-evolving data landscape.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9ca9df543c6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>