<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sachin Uplaonkar</title>
    <description>The latest articles on DEV Community by Sachin Uplaonkar (@sachs7).</description>
    <link>https://dev.to/sachs7</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F146273%2Fda5ed437-9489-4a4f-ac6c-527b1d7a2c39.jpeg</url>
      <title>DEV Community: Sachin Uplaonkar</title>
      <link>https://dev.to/sachs7</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sachs7"/>
    <language>en</language>
    <item>
      <title>AI Agents: Transforming Ideas into Action, Collaboratively</title>
      <dc:creator>Sachin Uplaonkar</dc:creator>
      <pubDate>Wed, 27 Nov 2024 05:16:25 +0000</pubDate>
      <link>https://dev.to/sachs7/ai-agents-transforming-ideas-into-action-collaboratively-55b0</link>
      <guid>https://dev.to/sachs7/ai-agents-transforming-ideas-into-action-collaboratively-55b0</guid>
      <description>&lt;h1&gt;
  
  
  What is an AI Agent?
&lt;/h1&gt;

&lt;p&gt;In simple terms, an AI agent is a program designed to meet user expectations with minimal to no input, functioning autonomously to achieve its objectives.&lt;/p&gt;

&lt;p&gt;Think of it like a beehive hierarchy: worker bees, the queen bee, and drone bees each have distinct roles, yet they collaborate seamlessly to achieve a common goal. Similarly, AI agents specialize in tasks while working together to accomplish complex objectives.&lt;/p&gt;

&lt;p&gt;With rapid advancements in artificial intelligence, the concept of Agentic AI is making waves. Industry leaders like Andrew Ng have highlighted how AI agents represent the next significant leap in AI evolution. In his recent &lt;a href="https://youtu.be/KrRD7r7y7NY" rel="noopener noreferrer"&gt;talk&lt;/a&gt;, Andrew provided valuable insights into the current state of AI agents and how they can be harnessed for diverse applications.&lt;/p&gt;

&lt;h1&gt;
  
  
  Why AI Agents?
&lt;/h1&gt;

&lt;p&gt;Developers know all too well the arduous process of building, testing, and deploying applications — a journey that can take weeks or even months. Enter AI orchestration frameworks like &lt;a href="https://www.langchain.com/langgraph" rel="noopener noreferrer"&gt;LangChain (LangGraph)&lt;/a&gt;, &lt;a href="https://www.crewai.com/" rel="noopener noreferrer"&gt;CrewAI&lt;/a&gt;, &lt;a href="https://github.com/openai/swarm" rel="noopener noreferrer"&gt;OpenAI (Swarm)&lt;/a&gt;, and &lt;a href="https://haystack.deepset.ai/blog/introducing-haystack-agents" rel="noopener noreferrer"&gt;Haystack&lt;/a&gt;, which have drastically reduced this timeline. Now, tasks that once took months can be completed in days — or even hours in some cases.&lt;/p&gt;

&lt;h1&gt;
  
  
  AI Agentic Design Patterns
&lt;/h1&gt;

&lt;p&gt;As explained by Andrew Ng, there are four primary design patterns for creating AI agents:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Reflection
&lt;/h3&gt;

&lt;p&gt;This pattern mirrors the human interaction loop found in apps like ChatGPT or Perplexity. It’s a request-response cycle where agents interact, research, and refine their output until they meet user expectations. Unlike human-driven iterations, agents autonomously handle the back-and-forth process to deliver results.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Planning
&lt;/h3&gt;

&lt;p&gt;In this approach, a large task is broken down into smaller, manageable subtasks. Each agent is assigned a specific task, and the results are aggregated into a final cohesive output.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Tools
&lt;/h3&gt;

&lt;p&gt;Agents utilize external resources — such as Python scripts, APIs, or web scrapers — to accomplish their tasks. This pattern leverages the versatility of tools to enhance agent capabilities.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. MultiAgent
&lt;/h3&gt;

&lt;p&gt;Imagine a professional team, with each member bringing specialized expertise — developers, product planners, QA engineers, and more. MultiAgent systems operate similarly, using a collaborative, supervised, or hierarchical approach where agents with unique strengths (different models) work together to achieve a unified goal.&lt;/p&gt;

&lt;p&gt;For a deeper dive into these patterns, you can explore Andrew Ng’s original explanation &lt;a href="https://youtu.be/KrRD7r7y7NY" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  CrewAI: Agent Orchestration Framework
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://www.crewai.com/" rel="noopener noreferrer"&gt;CrewAI&lt;/a&gt; is a notable orchestration platform that simplifies the development of multi-agent solutions. While numerous tutorials are available, the best starting point is their official &lt;a href="https://docs.crewai.com/introduction" rel="noopener noreferrer"&gt;documentation&lt;/a&gt;, which offers detailed guidance on framework concepts, technical terminology, and structuring agent-based projects.&lt;/p&gt;

&lt;h1&gt;
  
  
  Flight Finder and Trip Planner with CrewAI
&lt;/h1&gt;

&lt;p&gt;To demonstrate the power of CrewAI, I built a &lt;a href="https://github.com/sachs7/flight_finder_and_trip_planner_crewai" rel="noopener noreferrer"&gt;project&lt;/a&gt; that streamlines flight search and trip planning. The tool not only finds flights but also crafts a destination itinerary — all with minimal effort. No more tedious searches, web scraping, or wrangling with messy HTML tags!&lt;/p&gt;

&lt;h3&gt;
  
  
  Code Structure
&lt;/h3&gt;

&lt;p&gt;The project adheres to CrewAI’s quickstart guide:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Config folder&lt;/strong&gt;: Contains &lt;code&gt;agents.yaml&lt;/code&gt; and &lt;code&gt;tasks.yaml&lt;/code&gt;.

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Agents&lt;/strong&gt;: Defined as experts with roles, goals, and backstories.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tasks&lt;/strong&gt;: Specify objectives, expected outputs, the agent responsible, and contextual dependencies between tasks.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Custom Tool&lt;/strong&gt;: The google_flights.py script interacts with the Google Flights API (via &lt;a href="https://serpapi.com/" rel="noopener noreferrer"&gt;SerpAPI&lt;/a&gt;) to retrieve flight details.&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;&lt;a href="https://serper.dev/" rel="noopener noreferrer"&gt;Serper API&lt;/a&gt; Integration&lt;/strong&gt;: CrewAI’s built-in support simplifies web scraping tasks.&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;LLM Model&lt;/strong&gt;: OpenAI’s &lt;a href="https://platform.openai.com/docs/models#gpt-4o" rel="noopener noreferrer"&gt;GPT-4o&lt;/a&gt; powers the solution.&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Output
&lt;/h3&gt;

&lt;p&gt;The final itinerary is saved as a &lt;code&gt;trip_itinerary.md&lt;/code&gt; file, providing a neatly formatted travel plan if run via &lt;code&gt;crewai run&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;Users can run it as a &lt;code&gt;streamlit app&lt;/code&gt; by following the instructions mentioned in the &lt;a href="https://github.com/sachs7/flight_finder_and_trip_planner_crewai?tab=readme-ov-file#streamlit-app" rel="noopener noreferrer"&gt;README&lt;/a&gt; of the repo.&lt;/p&gt;

&lt;p&gt;The project code is available on &lt;a href="https://github.com/sachs7/flight_finder_and_trip_planner_crewai" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;. &lt;a href="https://github.com/crewAIInc/awesome-crewai" rel="noopener noreferrer"&gt;CrewAI GitHub repo&lt;/a&gt; has a list of curated open-source projects, check them out if interested in learning more and how the community is building.&lt;/p&gt;

&lt;h1&gt;
  
  
  Impact of Agents
&lt;/h1&gt;

&lt;p&gt;As previously stated, with frameworks like CrewAI, iteration of an idea to implementation can be done in a few hours to days and then deployed to production. The future of development will be more focused on ideas, the clear concise way to write a prompt, and less tinkering at the code level.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>streamlit</category>
      <category>crewai</category>
      <category>llm</category>
    </item>
    <item>
      <title>Unlocking Knowledge!</title>
      <dc:creator>Sachin Uplaonkar</dc:creator>
      <pubDate>Fri, 22 Nov 2024 04:49:36 +0000</pubDate>
      <link>https://dev.to/sachs7/unlocking-knowledge-8cd</link>
      <guid>https://dev.to/sachs7/unlocking-knowledge-8cd</guid>
      <description>&lt;p&gt;AI is revolutionizing the way we learn…&lt;/p&gt;

&lt;h2&gt;
  
  
  Welcome to the Future of AI with ExplainIt
&lt;/h2&gt;

&lt;p&gt;In a world where information is abundant but often complex, it isn’t easy to meet everyone’s level of understanding. With the advent of AI, learning has been revolutionized, and a concept that was once explained well by a few is now at the tips of a few prompts! &lt;a href="https://github.com/sachs7/explainIt" rel="noopener noreferrer"&gt;ExplainIt&lt;/a&gt; project is an attempt to simplify the learnings and clarify the topics of interest. Powered by CrewAI, this application is designed to break down intricate issues into simple, digestible explanations. Let’s explore what makes ExplainIt and CrewAI so exciting, and how they shape the future of artificial intelligence.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is CrewAI?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.crewai.com/" rel="noopener noreferrer"&gt;CrewAI&lt;/a&gt; is a cutting-edge framework that orchestrates autonomous AI agents to work collaboratively. Imagine a team of AI agents, each with its role and expertise, coming together to tackle complex tasks more efficiently than any single agent could alone. This collaborative intelligence allows for seamless interactions among agents, making CrewAI a game-changer in the realm of automation and AI.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Power of Agents
&lt;/h2&gt;

&lt;p&gt;At the heart of CrewAI are agents — intelligent entities designed to perform specific tasks. Each agent can assume roles, share goals, and operate cohesively within a crew. For instance, you might have a researcher agent who investigates new trends while a writer agent crafts compelling content based on those findings. This role-based design not only enhances efficiency but also allows for dynamic task management, where agents can autonomously delegate tasks among themselves.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why ExplainIt
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://github.com/sachs7/explainIt" rel="noopener noreferrer"&gt;ExplainIt&lt;/a&gt; project is an attempt to exemplify the potential of CrewAI by focusing on simplifying knowledge dissemination. By leveraging advanced language models like &lt;a href="https://www.llama.com/" rel="noopener noreferrer"&gt;Llama3.2&lt;/a&gt;, ExplainIt takes complex subjects and distills them into clear explanations. This capability is particularly valuable in educational contexts or for anyone eager to learn without wading through technical jargon. The app is available on GitHub and one can use either the CLI version or via Streamlit app, this is a basic app that just modifies the configs of the template provided by CrewAI. But imagine the way it can be extended!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff5bckp9zp1b64qsudon6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff5bckp9zp1b64qsudon6.png" alt="ExplainIt at work!" width="800" height="502"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Future of AI Agents
&lt;/h2&gt;

&lt;p&gt;As we look ahead, the future of AI agents appears bright and full of potential. The demand for intelligent automation is growing rapidly across industries, and platforms like CrewAI are at the forefront of this transformation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Trends to Watch
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Increased Collaboration: We can see more collaboration among different agents and platforms across various systems, creating a more interconnected AI mesh!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enhanced Autonomy: As technology evolves, agents will become even more autonomous, given a task, they figure out how to achieve it without much human interference.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Broader Applications: Currently, we are seeing the trend of use of AI agents in the customer service fields, we can expect similar trends to follow in other sectors.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Community-Driven Innovation: With an open-source foundation, companies like &lt;a href="https://www.llama.com/" rel="noopener noreferrer"&gt;Meta&lt;/a&gt;, and CrewAI are encouraging everyone to get a taste of AI and the things that can be achieved with it. Thereby unlocking many use cases.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The ExplainIt project powered by CrewAI is not just about simplifying explanations; it represents a significant leap toward harnessing the power of collaborative AI agents. As we move forward, embracing these technologies will be crucial in navigating an increasingly complex world. Whether you’re an educator, a student, or simply a curious learner, tools like ExplainIt are paving the way for a future where knowledge is more accessible than ever before. Join us on this exciting journey into the realm of AI!&lt;/p&gt;

</description>
      <category>crewai</category>
      <category>streamlit</category>
      <category>llm</category>
      <category>ai</category>
    </item>
    <item>
      <title>ReviewIt-AI</title>
      <dc:creator>Sachin Uplaonkar</dc:creator>
      <pubDate>Mon, 04 Mar 2024 23:43:37 +0000</pubDate>
      <link>https://dev.to/sachs7/reviewit-ai-239h</link>
      <guid>https://dev.to/sachs7/reviewit-ai-239h</guid>
      <description>&lt;p&gt;A companion to help you write better code!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F08sml2nbaqoxln3yrdng.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F08sml2nbaqoxln3yrdng.png" alt="Gemini Generated" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We all have been in this situation of going through the code and providing our inputs in improving it before it gets to be part of the larger system, but often things get lost in translation to bring forth the idea behind it and the way the reviewer sees it.&lt;/p&gt;

&lt;p&gt;With the ever-increasing penetration of GenAI into our lives, it makes more sense to use it to our advantage to help out both the author and the reviewer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Welcome to ReviewIt-AI!
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/sachs7/reviewit-ai" rel="noopener noreferrer"&gt;ReviewIt-AI&lt;/a&gt; takes in your code, provides a summary of what it does, and suggests improvements if needed. It is based on &lt;code&gt;LangChain&lt;/code&gt;, &lt;code&gt;OpenAI&lt;/code&gt;, and &lt;code&gt;Streamlit&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;A sample of it:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj2bcfhzaeqz1lr7kykfq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj2bcfhzaeqz1lr7kykfq.png" alt="ReviewIt-AI" width="800" height="374"&gt;&lt;/a&gt;&lt;br&gt;
ReviewIt-AI&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsc2ak40p31v3mgqpc8go.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsc2ak40p31v3mgqpc8go.png" alt="Sample-Code" width="800" height="407"&gt;&lt;/a&gt;&lt;br&gt;
ReviewIt-AI: Sample Code Review&lt;/p&gt;

&lt;p&gt;Then a question arises, is this helpful on its own? Sure, if you just need a quick check on your code or need a quick summary of what the code does. But in the longer run, it will be more useful if it is part of your review process🌟 enter…&lt;/p&gt;
&lt;h2&gt;
  
  
  ReviewIt-AI GitHub Actions
&lt;/h2&gt;

&lt;p&gt;With a working example in place, we can focus on getting it part of a PR review process using GitHub’s Action. Let me share the &lt;a href="https://github.com/sachs7/reviewit-ai-git-actions/tree/main" rel="noopener noreferrer"&gt;overview&lt;/a&gt; of it:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.github.com/en/actions" rel="noopener noreferrer"&gt;GitHub Actions&lt;/a&gt; are nothing but &lt;code&gt;workflows&lt;/code&gt; that get triggered based on the event one defines in the &lt;code&gt;yml&lt;/code&gt; file(s) of the workflows. In our case, we have the directories &lt;code&gt;actions&lt;/code&gt; and &lt;code&gt;workflows&lt;/code&gt; defined within the &lt;code&gt;.github&lt;/code&gt; folder.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Actions&lt;/code&gt; are where we write/store scripts that will be called by the Workflows during execution, here we have &lt;code&gt;ai.py&lt;/code&gt; and &lt;code&gt;reviewit.py&lt;/code&gt;, as the file names suggest, each contains the code that does respective actions, and with &lt;code&gt;reviewit.py&lt;/code&gt; being our main file, we will call &lt;code&gt;ai.py&lt;/code&gt; in it and also, define what our review comments look like.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Workflows&lt;/code&gt; consists of &lt;code&gt;yml&lt;/code&gt; files that call actions to be performed based on user-defined plans. In our case, it is to execute &lt;code&gt;actions&lt;/code&gt; on every PR, summarize what the PR is trying to do, and provide an opinion on things to be improved with suggested code changes.&lt;/p&gt;

&lt;p&gt;In the code base, you can find two PRs, one corresponds to a &lt;a href="https://github.com/sachs7/reviewit-ai-git-actions/pull/31#issuecomment-1977448710" rel="noopener noreferrer"&gt;code that can be improved&lt;/a&gt;, and the other one &lt;a href="https://github.com/sachs7/reviewit-ai-git-actions/pull/32#issuecomment-1977451877" rel="noopener noreferrer"&gt;better code&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Overview of Workflow Code
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;name: ReviewIt-AI

on:
  pull_request:
    branches:
      - main
    types: [opened, synchronize]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The above code showcases the initial code, we name our workflow as &lt;code&gt;ReviewIt-AI&lt;/code&gt; and we would like to execute this GitHub action for every PR.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;jobs:
  review:
    runs-on: ubuntu-latest
    env:
      OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
      GIT_TOKEN: ${{ secrets.GIT_TOKEN}}
      PR_NUMBER: ${{ github.event.number }}
      REPO: ${{ github.repository }}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, we define the &lt;code&gt;jobs&lt;/code&gt; that get triggered, one can create multiple &lt;code&gt;jobs&lt;/code&gt; but here we just need one, we define which OS runs the code on and supply the required environment keys like &lt;code&gt;OpenAI&lt;/code&gt;, &lt;code&gt;GitHub Token (PAT)&lt;/code&gt; and we collect the &lt;code&gt;repo&lt;/code&gt; and &lt;code&gt;pr_number&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: "3.11.5"
          cache: "pip"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, we checkout the repo using &lt;code&gt;Python&lt;/code&gt; GitHub Actions and provide the version we need.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;      - name: Install dependencies
        run: |
          pip install -r requirements.txt --quiet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Install required dependencies&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;      - name: Run ReviewIt-AI
        id: review
        run: |
          echo $REPO
          echo $PR_NUMBER
          echo "python .github/actions/reviewit.py -r $REPO -p $PR_NUMBER"
          python .github/actions/reviewit.py -r $REPO -p $PR_NUMBER | tee output.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the section where we call the &lt;code&gt;actions&lt;/code&gt; to be triggered, here, we call it to execute the &lt;code&gt;reviewit.py&lt;/code&gt; that gets the PR contents and sends it to &lt;code&gt;OpenAI&lt;/code&gt; to get a summary, improvements, and reviews and store the output in a file called &lt;code&gt;output.txt&lt;/code&gt;, also, the output can be viewed in the console of this particular step.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzdcqp9blp6f56wdkeh1t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzdcqp9blp6f56wdkeh1t.png" alt="PR Comment Section" width="800" height="520"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The final step in our process is to add it as a comment to our PR. In the previous step, we used &lt;code&gt;output.txt&lt;/code&gt; file to store the results, so here we read it and pass it as a body of the PR.&lt;/p&gt;

&lt;p&gt;That’s all we need!&lt;/p&gt;

&lt;h2&gt;
  
  
  Things to remember
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Make sure to generate the &lt;a href="https://docs.github.com/en/enterprise-server@3.9/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens" rel="noopener noreferrer"&gt;PAT token&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Provide required permissions to it, like either to a specific repo or all repos and other fine-grained permissions&lt;/li&gt;
&lt;li&gt;Go to the repository where you want to enable the GitHub Actions&lt;/li&gt;
&lt;li&gt;In the repo Settings &amp;gt;&amp;gt; Actions &amp;gt;&amp;gt; provide necessary permissions for the workflows (check the ‘Workflow permissions’ section)&lt;/li&gt;
&lt;li&gt;Add your &lt;code&gt;PAT token&lt;/code&gt; as well as the &lt;code&gt;OPENAI_API_KEY&lt;/code&gt; in the repo's secrets&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Note: In the current repo, the secrets are dummies, so, the GitHub Actions on any new PRs will fail&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Go ahead and clone the repo and have it part of your repo to get your PRs auto-reviewed!&lt;/p&gt;

&lt;h2&gt;
  
  
  Sample Comments
&lt;/h2&gt;

&lt;p&gt;Code that can be improved:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F77gipggfymc6kyl5yawh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F77gipggfymc6kyl5yawh.png" alt="code-to-be-improved" width="800" height="861"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Better Code:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0f68wpadvd095lzfc9sn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0f68wpadvd095lzfc9sn.png" alt="Better-Code" width="800" height="836"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Code Links
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://github.com/sachs7/reviewit-ai" rel="noopener noreferrer"&gt;ReviewIt-AI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/sachs7/reviewit-ai-git-actions" rel="noopener noreferrer"&gt;ReviewIt-AI GitHub Actions&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>githubactions</category>
      <category>codereview</category>
      <category>openai</category>
      <category>langchain</category>
    </item>
    <item>
      <title>Multi-Modal Agentic RAG using LangChain</title>
      <dc:creator>Sachin Uplaonkar</dc:creator>
      <pubDate>Wed, 28 Feb 2024 15:07:49 +0000</pubDate>
      <link>https://dev.to/sachs7/multi-modal-agentic-rag-using-langchain-25g</link>
      <guid>https://dev.to/sachs7/multi-modal-agentic-rag-using-langchain-25g</guid>
      <description>&lt;p&gt;Explore the world of agents…&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F66qkuz4yl3bpd7zc2lgi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F66qkuz4yl3bpd7zc2lgi.png" alt="Generated by Dall-E-3" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Most of you might have explored the world of RAG (Retrieval Augmented Generation) to chat with your documents and explored the world of generating images as well. With the capability of function calling now baked into most of the GenAI model providers, the applications are limitless.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Agents&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Agents are kind of mini tasks that help you to achieve your specific goals. When multiple agents are combined, they form an indispensable force. Like one program to help you chat with LLMs, make a call to an external API, translate, image generation, etc. Today let’s explore the agents that help us:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Chat with any PDF&lt;/li&gt;
&lt;li&gt;Get recent papers from &lt;a href="https://paperswithcode.com/" rel="noopener noreferrer"&gt;paperswithcode&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Use Dall-E-3 to generate artistic abstract images&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Code&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The code is available on &lt;a href="https://github.com/sachs7/multi-modal-langchain-chatbot" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; with well-structured getting started steps.&lt;/p&gt;

&lt;p&gt;I will be giving a brief overview of it here:&lt;/p&gt;

&lt;p&gt;The technology stack that we will be using is: &lt;code&gt;LangChain&lt;/code&gt;, &lt;code&gt;OpenAI&lt;/code&gt;, &lt;code&gt;paperswithcode&lt;/code&gt; API, &lt;code&gt;ChromaDB&lt;/code&gt;, and &lt;code&gt;Dall-E-3&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Upload your PDF document in the &lt;code&gt;docs&lt;/code&gt; folder and explore the default agents. If interested, go ahead with creating your agents by adding them to the &lt;code&gt;services&lt;/code&gt; folder and creating a corresponding tool in the &lt;code&gt;tools&lt;/code&gt; folder.&lt;/p&gt;

&lt;p&gt;The option to execute the code in &lt;code&gt;Gradio&lt;/code&gt; or &lt;code&gt;Streamlit&lt;/code&gt; is provided with the default code running as &lt;code&gt;Streamlit&lt;/code&gt;. I found it difficult to showcase the image/text in &lt;code&gt;Gradio&lt;/code&gt;, hence the switch to &lt;code&gt;Streamlit&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Restrictions&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The code is restricted to answer only from the document, if you ask outside of it, the app won’t make a query to the outside world to fetch the response (which in most cases we want if dealing with sensitive documents).&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Results&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Following are some of the responses from the app, note: the image prompt was taken from &lt;a href="https://blog.google/products/gemini/google-bard-gemini-pro-image-generation/" rel="noopener noreferrer"&gt;Google&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjn7ru0afzwmlkion9wtv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjn7ru0afzwmlkion9wtv.png" alt="Capabilities" width="800" height="707"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foooqn6o825kpmfl0ytsq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foooqn6o825kpmfl0ytsq.png" alt="Chat with documents" width="800" height="547"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqfbh2in77rxblzfijohd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqfbh2in77rxblzfijohd.png" alt="Get the latest paper on &amp;lt;your topic&amp;gt; from Paperwithcode" width="800" height="907"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0xos4b54xl2j3wuitin0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0xos4b54xl2j3wuitin0.png" alt="Image Generation" width="800" height="1113"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzg8byovse337qs5q5011.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzg8byovse337qs5q5011.png" alt="Applied Restrictions" width="800" height="520"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Feel free to play around and use it for your own with extended agents!&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Add-On&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;It is always good to know the full trace of your query, I would suggest you try &lt;a href="https://www.langchain.com/langsmith" rel="noopener noreferrer"&gt;LangSmith&lt;/a&gt; from LangChain. It provides a whole lot of information on how your query is passed over different stages, and also the cost associated with each of them.&lt;/p&gt;

</description>
      <category>langchain</category>
      <category>agents</category>
      <category>openai</category>
      <category>rag</category>
    </item>
    <item>
      <title>Cut a Release Branch!</title>
      <dc:creator>Sachin Uplaonkar</dc:creator>
      <pubDate>Fri, 12 Jul 2019 04:06:16 +0000</pubDate>
      <link>https://dev.to/sachs7/cut-a-release-branch-4mcf</link>
      <guid>https://dev.to/sachs7/cut-a-release-branch-4mcf</guid>
      <description>&lt;p&gt;Hello, this is my first post here!&lt;/p&gt;

&lt;p&gt;Recently, I was given the task to handle the release process and the requirement was to create/cut a release branch off of the default branch for 3-5 repositories and deploy them on different environment (like dev) so that the QA team could take those branches, deploy and continue with their tests without affecting the development workflow.&lt;/p&gt;

&lt;p&gt;So, here is the Python script that I created for doing this. Let me know of any improvements and/or suggestions! Cheers...&lt;/p&gt;

&lt;p&gt;GitHub Link: &lt;a href="https://github.com/sachs7/cut-release" rel="noopener noreferrer"&gt;https://github.com/sachs7/cut-release&lt;/a&gt;&lt;/p&gt;

</description>
      <category>automation</category>
      <category>qa</category>
      <category>qatools</category>
      <category>python3</category>
    </item>
  </channel>
</rss>
