<?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 Shaurya Goyal on Medium]]></title>
        <description><![CDATA[Stories by Shaurya Goyal on Medium]]></description>
        <link>https://medium.com/@gylshaurya?source=rss-6314e6d86a8f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*kIg_-Ta6SNU87rvtYzO8uQ.jpeg</url>
            <title>Stories by Shaurya Goyal on Medium</title>
            <link>https://medium.com/@gylshaurya?source=rss-6314e6d86a8f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 22:34:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gylshaurya/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[Agentic AI and RAGs]]></title>
            <link>https://medium.com/mobile-development-group/agentic-systems-and-rags-a1c8af882999?source=rss-6314e6d86a8f------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1c8af882999</guid>
            <category><![CDATA[vector-embeddings]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[chunking]]></category>
            <category><![CDATA[agentic-rag]]></category>
            <dc:creator><![CDATA[Shaurya Goyal]]></dc:creator>
            <pubDate>Tue, 18 Aug 2026 12:33:15 GMT</pubDate>
            <atom:updated>2026-08-25T09:01:40.707Z</atom:updated>
            <content:encoded><![CDATA[<p>I recently gave a lecture on Agentic AI and I want to make them into something more readable here, the way I explained it in the room, minus the whiteboard.</p><h3>What is Agentic AI?</h3><p>At its core, an agentic system is just two things working together. There is the LLM, which is the model that thinks and generates text. And there is everything else around it, which is called the harness.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IrIrupimRoqae5zB.png" /></figure><blockquote>Agentic System = LLM calls + harness.</blockquote><p>The LLM itself cannot browse the internet, cannot remember your last conversation, cannot call an API, cannot loop and retry if something fails. All of that is handled outside the model. That outside layer, the code that decides when to call the model, what to send it, what to do with its response, and when to stop, is the harness.</p><p>If you remember one thing from this section, remember this: everything that is not an LLM call is the harness.</p><h3>Breaking Down the Harness</h3><p>The harness has a few jobs, and it helps to think of them separately. In short, it needs to:</p><ul><li>Let the model call tools and act in the real world</li><li>Control how many times the agent loops before stopping</li><li>Manage memory so old context does not pile up forever</li><li>Catch and handle errors instead of crashing</li><li>Make the whole process observable, so you can see what happened</li></ul><p>Let us go through each one.</p><p><strong>Tool harnes</strong>s - This is the part that lets the model actually do something in the real world. The model does not call a web search API directly. Instead, it outputs something structured, like a JSON object that says tool is web_search and query is whatever it wants to search for. The harness reads this, actually makes the API call, gets the result back, and hands that result back to the model as context. So the harness is basically the hands of the agent. The model decides what to do, the harness does it.</p><p><strong>Loop harness - </strong>Agents rarely do their task in one shot. They think, act, observe the result, and think again. The loop harness controls how long this cycle runs. It usually has some limits built in, like a maximum number of loops, a maximum amount of time, or a condition for convergence, meaning the loop stops once the model reaches a stable or final answer. Without these limits, an agent could keep looping forever without ever finishing the task.</p><p><strong>Memory and state management -</strong> As the agent keeps looping, the conversation history grows. At some point you cannot just keep feeding the entire history back into the model every single time, it gets too long and too expensive. So the harness has to decide what to keep, what to drop, what to summarize, and how to restore state if needed later. This is basically memory management for the agent.</p><p><strong>Error handling -</strong> Things fail. APIs time out, tools return bad data, the model might generate something invalid. A good harness catches these failures and decides what to do next instead of just crashing.</p><p><strong>Observability -</strong> This is about being able to see what the agent actually did. Which tools it called, what it got back, how many loops it took, where it went wrong. Without observability, debugging an agent is like debugging in the dark.</p><p>Once you see it this way, an agentic system stops feeling mysterious. It is just an LLM wrapped in a loop with tools, memory, and safety nets around it.</p><p>Now let us move to the second big topic from the lecture, which is RAG.</p><h3>Why RAG Exists</h3><p>RAG stands for Retrieval Augmented Generation. Before understanding how it works, it helps to understand why it is needed in the first place.</p><p>Plain LLMs, without any retrieval, run into two big problems:</p><ul><li>Frozen knowledge. A model is trained on data up to a certain point, and after that it simply does not know about anything new.</li><li>Hallucination. When a model does not have enough information to answer properly, it rarely just says I do not know. It often generates something that sounds correct but is not, because it is trying to complete the pattern of an answer.</li></ul><p>RAG tries to fix both of these problems by giving the model relevant context pulled from an external source, right before it answers. Instead of relying only on what it learned during training, the model gets fresh, specific information handed to it at the time of the question.</p><h3>How Retrieval Actually Works</h3><p>The whole idea of RAG is to retrieve context related to the user query. But to do that fast, at scale, over thousands or millions of documents, you cannot just search through raw text. This is where vector embeddings come in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*ooQEhR04I5MxkgtY.png" /></figure><p>An embedding is a way of representing a piece of text as a list of numbers, basically a point in space. Similar meanings end up close to each other in this space. It is easy to imagine three dimensions in your head, but in practice these embeddings live in much higher dimensional space, sometimes hundreds or thousands of dimensions. The idea stays the same though, closeness in this space represents closeness in meaning.</p><h3>Chunking</h3><p>Before you can embed a document, you need to break it into pieces, or chunks. This step matters a lot more than it sounds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*I5wvyucPzKiQiSkb.gif" /></figure><p>If your chunks are too large, they contain too many ideas mixed together, and the embedding becomes a blurry average of everything in it. If they are too small, you lose context and the meaning gets fragmented.</p><p>There are a few common ways to chunk text:</p><ul><li>Fixed size chunking simply cuts text every n tokens, regardless of where sentences end</li><li>Sentence based chunking splits along sentence boundaries, which keeps ideas more intact</li><li>Recursive character based chunking tries a list of separators in priority order, like paragraph breaks first, then sentence breaks, then word breaks, until chunks fall under the desired size</li><li>Semantic chunking goes further and splits text based on where the meaning actually shifts, rather than just structural rules</li></ul><p>As a rough guide:</p><ul><li>128 to 256 tokens works well for short factual content like FAQs</li><li>512 tokens is a common default, used by tools like LangChain</li><li>1024 to 2048 tokens suits long form documents, since it preserves more context</li></ul><h3>Making Chunks Better</h3><p>Two chunks can be worded completely differently but still mean almost the same thing. So chunk quality is not just about size, it is also about making sure related information does not get cut apart awkwardly.</p><p>This is where chunk overlapping helps. Instead of cutting chunks with hard boundaries, you let consecutive chunks share a bit of overlapping text. This way, if an important idea falls right at the edge of a chunk, it still appears fully in at least one of the two overlapping chunks.</p><h3>Comparing Chunks to the Query</h3><p>Once everything is embedded, you need a way to measure how close a query is to each chunk. The most common method is cosine similarity, which gives a score between minus one and one, where a higher score means the two pieces of text are closer in meaning.</p><p>You then select the top K chunks with the highest similarity scores.</p><p>Now, if you have a huge number of chunks, comparing the query to every single one, called exact nearest neighbour search, becomes slow, since its cost grows directly with the number of chunks. This is why in practice most systems use approximate nearest neighbour search instead. It sacrifices a small amount of accuracy for a large gain in speed.</p><p>Two popular approaches for this are:</p><ul><li>HNSW, or Hierarchical Navigable Small World, which organises vectors into layered graphs so the search can jump quickly toward the right neighbourhood before narrowing down</li><li>IVF, or Inverted File Index, which clusters vectors together and represents each cluster with a central vector, so a query only needs to be compared against the relevant clusters instead of everything</li></ul><h3>Where All of This Gets Stored</h3><p>To actually run this kind of search at scale, you need a vector database.</p><ul><li>Chroma integrates easily with common embedding model providers like OpenAI, Hugging Face, and Google, and it also supports hybrid search</li><li>Qdrant is built more with scale and concurrency in mind, useful for heavier production workloads</li></ul><p>One practical tip is to keep your backend logic separate from your vector database logic. That way, if you ever need to switch from one vector database to another, you are just swapping out one component instead of rewriting the whole application.</p><p>It is also worth remembering that what gets stored is not raw content floating around as a lone vector. The system maintains a mapping from chunks to embeddings, so each vector is really just a reference back to the original chunk of text it represents.</p><h3>The Standard RAG Pipeline</h3><p>Putting it all together, the basic RAG flow looks like this.</p><p>You index your documents ahead of time by chunking them and turning each chunk into an embedding. Then, when a user sends a query, you embed that query the same way. You compare the query embedding against the stored chunk embeddings, retrieve the closest matches, and add those chunks as context to the prompt before sending it to the model.</p><p>This is the standard version, and it works well for a lot of use cases. But there are more advanced variations that solve specific weaknesses.</p><h3>Beyond Standard RAG</h3><p><strong>HyDE, or Hypothetical Document Embeddings</strong> Instead of embedding the raw user query, you first ask the model to generate a hypothetical answer to the question, and then you embed that hypothetical answer and use it to search. The reasoning is that an answer often resembles the kind of document you are trying to retrieve more closely than the original question does.</p><p><strong>Query expansion</strong> Here you generate multiple different phrasings of the same query, retrieve results for each phrasing, and then merge everything together. This helps when the exact wording of the original query does not match how the information is phrased in your documents.</p><p><strong>Query decomposition</strong> Complex questions often contain multiple smaller questions hidden inside them. This approach breaks a complex query into simpler sub queries, retrieves for each one separately, and then combines the results.</p><p><strong>Self RAG</strong> In this setup, the model itself decides whether retrieval is even needed for a given query, and it also critiques whether the retrieved content is actually good enough to use. This adds a layer of self awareness to the process instead of blindly retrieving every time.</p><p><strong>Graph RAG</strong> This approach precomputes relationships between entities ahead of time, including relationships that cross different communities or clusters of information. The core idea is that the relationship between two entities can matter more than the entities themselves. Knowing that two people are connected, and how, can be more useful than just knowing facts about each person individually.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lJbp0H5eVc2-IC5Z.jpg" /></figure><p><strong>Tool RAG</strong> This one is not about documents, it is about tools. When an agent has access to a large number of tools, giving the model every single tool description at once creates choice overload and confuses it. So instead, the system retrieves only the top K most relevant tools for the current task, along with a few fixed core tools that are always available, and only shows those to the model.</p><h3>Combining Search Methods - RRF</h3><p>Vector search is great at understanding meaning, but it is not always great at exact matches. If someone searches for a specific product code or an exact phrase, plain embedding search might miss it. This is where BM25 comes in.</p><p>BM25 is a classic keyword based search method. It looks at exact word matches and term frequency, meaning how often a word appears. It also uses something called IDF, or inverse document frequency, which gives higher weight to rare words, since a rare word matching is a much stronger signal than a common word matching.</p><p>Now, if you want to combine embedding based search with BM25 based search, you cannot just add their raw scores together, because they come from completely different scoring systems and are not on the same scale.</p><p>This is solved using RRF, or Reciprocal Rank Fusion. Instead of combining raw scores, it combines the rank position of each result in each list. The formula looks like this.</p><blockquote>Score = ∑ 1 / (k + rank in list)</blockquote><p>You calculate this for each result across both lists and add them up, and that gives you a fused ranking that fairly reflects both methods. This combined approach, embeddings plus BM25 fused with RRF, is often called hybrid search/hybrid RAG.</p><h3>Consolidation</h3><p>After you retrieve chunks from possibly multiple sources and multiple methods, you are not done yet. You need to consolidate everything, meaning combining it, filtering out what is not useful, and organizing it properly. This step also involves fixing conflicting information between chunks and cutting out noise, so that what finally reaches the model is a single clean context instead of a messy pile of overlapping and sometimes contradictory chunks.</p><h3>World Model</h3><p>A related idea is building a world model, where instead of just retrieving loose chunks, the system tries to parse out exact data points and understand relationships, timelines, and structure between them, almost like building a small internal map of the facts rather than just a bag of text snippets.</p><h3>Finetuning vs RAG</h3><p>A natural question at this point is, why not just finetune the model on your own data instead of doing all this retrieval work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6bg4TGnA2jDG_A9U.png" /></figure><p>Finetuning makes sense when you have a large, fairly stable dataset that does not change often. RAG makes more sense when your data is smaller in scale or constantly evolving, since you can just update your document store instead of retraining the entire model every time something changes. Retraining is expensive and slow, updating a vector database is comparatively cheap and fast.</p><h3>Wrapping Up</h3><p>Looking back at all of this, the throughline for both agentic systems and RAG is the same. Language models are powerful, but they are limited on their own. They cannot act in the real world by themselves, and they cannot know things beyond their training data by themselves. Agentic systems solve the first limitation by wrapping the model in a harness that gives it tools, memory, and control flow. RAG solves the second limitation by giving the model relevant, up to date information exactly when it needs it.</p><p>Once you see both of these as ways of extending what a language model can do, rather than as separate complicated systems, they become a lot easier to reason about.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1c8af882999" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mobile-development-group/agentic-systems-and-rags-a1c8af882999">Agentic AI and RAGs</a> was originally published in <a href="https://medium.com/mobile-development-group">MDG Space</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Was Never the Hard Part]]></title>
            <link>https://medium.com/mobile-development-group/building-was-never-the-hard-part-50bbaf86dd48?source=rss-6314e6d86a8f------2</link>
            <guid isPermaLink="false">https://medium.com/p/50bbaf86dd48</guid>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[ycombinator]]></category>
            <category><![CDATA[entrepreneurship]]></category>
            <dc:creator><![CDATA[Shaurya Goyal]]></dc:creator>
            <pubDate>Thu, 23 Jul 2026 20:27:19 GMT</pubDate>
            <atom:updated>2026-08-20T11:26:46.229Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*WCDBAKdJfYhzHo8dgsfwiw.jpeg" /></figure><h3>What a hackathon taught me about validating ideas instead of just shipping them</h3><p>Most hackathons run on a simple incentive, build something, demo it, win or lose in a weekend. But recently we had a hackathon at MDG Space, IITR and this one had a different brief. We weren’t told to build fast. We were told to think properly. Ideation, it turns out, is the easy part. Anyone can come up with three or four ideas in an afternoon. The real work starts when you sit with each one and force yourself to be honest about what’s actually wrong with it.</p><p>“To Make Something People Actually Want”</p><p>We spent the hackathon on three main directions. None of them were bad ideas. All three had real pain points behind them. But going deep on each one, and actually talking to the people who’d have to use or buy these products, taught me more than any amount of building would have.</p><p>Here’s what we found, and what I think is actually useful for anyone else sitting on an idea right now.</p><h3>Idea 1: Putting AI Eyes on Schools and Workplaces</h3><p>The first direction was ambitious. Take the camera infrastructure that already exists in schools and offices, and put an AI layer on top of it that builds personalized behavioral profiles for the people in that space. Attendance patterns, engagement signals, maybe even early flags for safety issues.</p><p>We started with schools and coachings in mind, the idea being to monitor student engagement and behavior to help with personalized learning and guidance. It was only later in the process that we realized the same logic could extend to offices and workplaces.</p><p>Instead of just theorizing about this, we reached out to schools directly and spoke with senior people who’d actually be the ones making a call like this. The response was genuinely open. Most of them saw it as a safety feature first, something that could reassure parents and become a real point of institutional trust.</p><p>But here’s what surprised us. The pushback wasn’t mainly about privacy, even though that was the objection we walked in expecting. Consent and data storage came up, sure, but the two doubts that made people pause the longest were far more grounded, how accurate and computationally reliable would a model like this actually be at scale, and what would it cost to run continuous video analysis across an entire building.</p><p><strong>The lesson here:</strong> people are often more prepared to have the ethical conversation than we expect. What actually stops them is the practical one. Can this thing work reliably, and can we afford to run it. If you’re building anything that leans on continuous inference over video or sensor data, the unit economics of compute will get questioned before the ethics do, at least by the people who have to sign the check.</p><h3>Idea 2: Turning Trends Into Marketing Strategy, Automatically</h3><p>Every marketer has said some version of the same complaint, trends move fast, and by the time you turn “this is going viral” into an actual campaign, the moment has passed. So the second idea was a tool that watched trends in real time and produced a ready made marketing and advertising strategy for a brand.</p><p>On paper this looked great. The pain point is universal, every brand wants to move faster on trends, and a tool that shortens that gap has obvious appeal.</p><p>But the more we looked at it, the more we realized the space is already crowded with tools that summarize trends or generate ad copy. That’s not the hard part anymore. The hard part, the part nobody has actually solved, is judgment. Spotting that something is trending is easy now. Deciding what a specific brand should actually do about it, in a way that fits their voice and doesn’t feel forced, is a much bigger ask.</p><p>And that’s a trust problem, not a technology problem. Most brands aren’t ready to hand that kind of judgment call to an algorithm, especially not early on, especially not without a human somewhere in the loop.</p><p><strong>The lesson here:</strong> crowded markets aren’t disqualifying on their own, but you need to be honest about which part of the problem is actually still open. If the interesting, defensible part of the problem is judgment and trust rather than detection or generation, that changes what you’re actually building, and it probably changes who you’re building it for.</p><h3>Idea 3: The Boring Idea That Turned Out to Be the Strongest</h3><p>The third idea felt almost boring sitting next to the other two. A B2B platform where early stage D2C brands design their packaging by talking to an AI agent, and we act as the bridge to the manufacturers who actually print and produce it. Instead of wrestling with design software or briefing a freelancer, a brand would just describe what they want and go back and forth with the agent until the design was ready to hand off to production.</p><p>No AI camera network, no real time trend engine. Just a conversational design layer sitting on top of a logistics bridge. But the more we sat with it, the more it felt like the one the market actually needed.</p><p>Small D2C brands don’t have in house design teams. Package manufacturers don’t want to deal with amateur files and endless rounds of revisions. Sitting in the middle of that gap is a straightforward value proposition.</p><p>Talking to brands confirmed this pretty clearly. Being able to talk to an agent instead of hiring a designer or learning design software themselves would cut their need to hire an initial designer, bring more uniformity to their packaging, and reduce the usual back and forth confusion on the manufacturer’s side. It gives them a simpler, cleaner start, and it lowers the barrier for a brand that has zero design experience to still walk away with something production ready.</p><p>But it’s a two sided marketplace, which means we need both design hungry brands and reliable manufacturing partners active at the same time, or neither side has a reason to stick around. When we reached out to packaging companies to gauge interest in us acting as a mediator, the response echoed the same value we’d heard from brands. But they had their own concern, a very reasonable one, how our share in the transaction might eat into their already thin margins.</p><p>On top of that, design and manufacturing are both slow, detail heavy processes. There’s no shortcut around that. If we build this, the operational side has to be tight from day one, because there’s no room for the usual early stage sloppiness when physical goods and production timelines are involved.</p><p><strong>The lesson here:</strong> the idea that sounds the least exciting in the room is sometimes the one with the cleanest value proposition. Nobody has to trust a black box for this to work, they just have to trust that the process is faster and cleaner than what they’re doing now. That’s a much easier sell than trust in an algorithm’s judgment. The tradeoff is that two sided marketplaces are operationally unforgiving, and margin conversations happen a lot earlier than you’d expect.</p><h3>The Miscellaneous Pile</h3><p>Not every idea makes it to the top three, but they’re still worth mentioning because they’re often what keeps the thinking sharp. Our grab bag included an AI scribe for law and medical professionals to help with record keeping and simple analysis, an AI study companion for students that could help with homework and also check it, and a handful of other ideas that never fully matured but kept pushing us to search more, talk more, and think harder about what we were actually trying to solve.</p><h3>What This Actually Taught Me</h3><p>Here’s the thing I keep coming back to. This hackathon was never really about building a product. And honestly, with the tools available today, building a product isn’t the hard part anymore. Anyone with a weekend and an internet connection can put together something that technically works.</p><p>What separates people who actually build real businesses isn’t technical skill. It’s the opportunities they notice, and how fast they move to validate them once they see one. Entrepreneurs and leaders aren’t thriving because they can write better code or design better systems. They’re thriving because they see an opening and act on it before anyone else does.</p><p>What this month reinforced for me is that there’s still room. There are still common, everyday problems out there that genuinely need fixing. But you cannot just fall in love with an idea and start building blindly. You have to search for it, talk to real people in the real world, and understand the actual on ground issue before you commit months to it.</p><p>That process of validation doesn’t slow you down, even though it feels like it does in the moment. It refines your perspective on the problem and helps you build something targeted instead of just taking random actions and hoping one of them lands.</p><p>If there’s one takeaway I’d want someone else to walk away with, it’s this. Go talk to the people who’d actually have to say yes to your idea, before you build a single line of it. The answers you get will either save you months, or point you exactly where you need to go next.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=50bbaf86dd48" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mobile-development-group/building-was-never-the-hard-part-50bbaf86dd48">Building Was Never the Hard Part</a> was originally published in <a href="https://medium.com/mobile-development-group">MDG Space</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[But What really is Retrieval-Augmented Generation !?]]></title>
            <link>https://medium.com/@gylshaurya/but-what-really-is-retrieval-augmented-generation-3989c1a3b8ab?source=rss-6314e6d86a8f------2</link>
            <guid isPermaLink="false">https://medium.com/p/3989c1a3b8ab</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[rags]]></category>
            <category><![CDATA[vector-embeddings]]></category>
            <dc:creator><![CDATA[Shaurya Goyal]]></dc:creator>
            <pubDate>Sun, 12 Apr 2026 18:19:57 GMT</pubDate>
            <atom:updated>2026-04-12T18:19:57.437Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’re someone who wants to learn how LLM’s actually work and have heard of the term RAG but don’t know what it is or how it works, This is the perfect read for you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NOj-H6ZNi49ALsip.png" /></figure><h3>Frozen Knowledge</h3><p>Let’s start with the problem and why we even need RAG.</p><p>Basically with LLM’s there are two problems:</p><ol><li>While training the model it only knows the information till when it was trained and will not be able to assist you with anything that happened after, meaning it’s knowledge is frozen.</li><li>If a model does not know something then it hallucinates and tries to fill the gaps on it’s own and may give you information which is completely wrong.</li></ol><p>RAG works by giving your model some documents of context just before answering. Think of it like this, the model was trained on a lot of dictionaries, and you give it a stack of sheet’s to refer from while answering.</p><h3>Embeddings</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*14CtRbd5c-Jix4QS" /></figure><p>Now the task is to select the stack of relevant pages from the large pile of documents fast and reliably. For that it converts the data into vectors(just an array of floating point numbers), and geometry of these vectors tries to represent the semantic meaning of the documents.</p><p>So documents which are similar end up geometrically closer in the vector space, and this process of converting them to vectors is called embedding.</p><p>Actually to be more accurate it does not directly represent the documents but first splits the documents into chunks, and this is actually a very important part of RAG as too small chunks don’t make sense on their own and make them too large and they start having irrelevant information. Also, in general chunks are made with 10–20% overlapping information to prevent information loss at chunk boundaries.</p><p>After representing the data as vectors chunks are given a title, a short description, author, etc. and are then stored with their metadata and source information in vector databases like Pinecone and Chroma.</p><h3>The Pipeline</h3><p>So now let’s go through what actually happens when you give a prompt to an LLM.</p><ol><li>Your query is passed through the same embedding model to plot it in the same vector space as the source training material.</li><li>The query is then compared with other vectors in the space to find it’s nearest neighbours, this is generally done by cosine similarity. A similarity of 1 means same meaning, 0 means unrelated and negative similarity means opposite meaning. Also note here that we generally do not consider the magnitude of the vector and only the direction because direction matters more than magnitude for semantic similarity.</li><li>The top K results(usually 20–100) are then re-ranked, to find the most relevant chunks(usually top 3–5).</li><li>Then those top chunks are reassembled into the prompt (usually with source reference) as context and are passed to the model along with the user query. The prompt may look like: “Answer the following question using only the provided context. Context: [chunk 1] [chunk 2] [chunk 3]. Question: [user query].”</li><li>The LLM then reads the context and answers the user’s query.</li></ol><p>So, in short RAG works by translating both your documents and your query into the same geometric language as training material, where meaning equals position, and using proximity in that space to find the most relevant knowledge before letting the LLM speak.</p><p>If you learned something new consider giving this write an appreciation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3989c1a3b8ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I found the Best Python Course by Google for FREE! (With Certification)]]></title>
            <link>https://medium.com/@gylshaurya/i-found-the-best-python-course-by-google-for-free-with-certification-fce086a33fbe?source=rss-6314e6d86a8f------2</link>
            <guid isPermaLink="false">https://medium.com/p/fce086a33fbe</guid>
            <category><![CDATA[google]]></category>
            <category><![CDATA[python-course-online]]></category>
            <category><![CDATA[free-course-python]]></category>
            <category><![CDATA[coursera]]></category>
            <category><![CDATA[certification-courses]]></category>
            <dc:creator><![CDATA[Shaurya Goyal]]></dc:creator>
            <pubDate>Wed, 20 Jul 2022 17:01:34 GMT</pubDate>
            <atom:updated>2022-07-20T17:01:34.540Z</atom:updated>
            <content:encoded><![CDATA[<p>I found the Best Python Course by Google for FREE! (With Certification)</p><p>“Python has been an important part of Google since the beginning and remains so as the system grows and evolves. Today dozens of Google engineers use Python, and we’re looking for more people with skills in this language.”</p><p>Hello everyone, today, I am going to be telling you how you can get a free Python course on Coursera by Google itself…with certification, so let’s get started!</p><p>To get started open this link:</p><p><a href="https://www.coursera.org/professional-certificates/google-it-automation">https://www.coursera.org/professional-certificates/google-it-automation</a></p><p>First things first, this course is not actually for free, rather it costs around $12 for each course, but, we can get it for free using the Financial Aid Option.</p><figure><img alt="A sanpshot of the Coursera website with the financial Aid option" src="https://cdn-images-1.medium.com/max/1024/1*YO5ekOb4wjJlkmOMfNJjWA.png" /></figure><p>After clicking on the “Financial Aid Available” Button, click “Continue to the application”, then you get a list of courses, select “Crash Course On Python” and then click Next.</p><figure><img alt="A snapshot of the course selection form." src="https://cdn-images-1.medium.com/max/612/1*kj1naBEAStVj7PSqjln2AQ.png" /></figure><p>Then you get a form where after filling in just your Education Level, Annual Income, Employment Status, and reason for applying you&#39;ll easily be able to get the course.</p><p>Don’t worry, what you write in the last box usually doesn’t matter too much.</p><figure><img alt="personal details form" src="https://cdn-images-1.medium.com/max/933/1*MBduwX5YQvSbP-kxXBY5hw.png" /></figure><p>Click On Next, and you get another interface to enter how much you can pay every month, set it to zero enter some more details, verify Captcha and it is done.</p><figure><img alt="form to enter how much you can pay every month" src="https://cdn-images-1.medium.com/max/761/1*AIjRjdCbz1xvGD2FLKCJkw.png" /></figure><p>After around 15 days you will get a mail confirmation about the course. And You are ready to Go!</p><p>Thanks for reading, please like and share.</p><p>Have a Good Day!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fce086a33fbe" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>