Posts

Showing posts with the label AI Ethics

Agentic AI - Series 5

Image
                                                              Hope you all having fun with our Agentic AI series. In this blog, we will see how to design a MAS (Multi Agent System) using CrewAI. CrewAI is a popular framework for building production grade AI systems.  We know that every agent needs Role. Goal. Backstory. Tasks. Tools MAS is nothing but completing a work with the help or collaboration of one more agents. Lets understand with a real life example. We are going to design a application which involves in recommending food for diabetic patients based on the given ingredients. To accomplish the task, we need a agent called " Chef ". Role - Experience Chef. Goal - Prepare delicious food based on the given ingredient. Backstory : You are an experienced chef and received accolades for preparing ...

Agentic AI - Series 4

Image
                                                                   In this blog, will how to create a simple agent using AI framework like Langchain with a simple LLM model  gpt-4o-mini. from langchain_openai import ChatOpenAI from langchain_core . tools import tool import os # Creating a tool @ tool def add_numbers ( x : int , y : int ) -> int :     "Add two numbers"     return x + y @tool is a decorator to define a tool. This is a simple tool to add 2 numbers. The below line creates a Langchain LLM wrapper around on the OpenAI chat mode 'gpt-4o-mini' # Binding the tool to a model llm = ChatOpenAI( model = "gpt-4o-mini" ).bind_tools([add_numbers]) response = llm .invoke( "What is 5 + 7?" ) When we print response, is the expected outcome? Is it 12. NO...

Agentic AI - Series 3

Image
                                                                      In this blog we will see how to build a simple agent without using any LLM model. Simple flow of an agent: Agent takes input -> Based on the input, it decides which tool to use -> Performs operation and send the output back to the user. An AI agent framework is  a set of tools, libraries, and structures that simplifies building, deploying, and managing autonomous AI agents. But, here we are going to build an agent without using any framework and LLM's. Agent functionality is to perform "Addition" and "Subtraction". Agent uses 2 python functions (Tools) to perform addition and subtraction operations. Finally, it send the output to the user. We are going to implement the above discussed functionality vi...

Agentic AI - Series 2

Image
  Now we know the brain behind Agents are LLM models. So, how do I access and use the models? That where we rely on organizations like OpenAI, Google, Meta, Mircosoft, Hugging Face, Nvidia, Grog and others who primarily build LLM models that serves various purpose like Text Generation, Image Recognition, and others. I am sure everyone have been using ChatGPT which is a service provided by OpenAI for interactive/chat based conversation for our daily activities starting from asking a riddle, solving math problem and other tasks. This is my simple interaction with ChatGPT asking for the "Weather in California?" Lets imagine building an Agent which needs perform the same action as above, then it must be done programmatically.  If its programmatically, then you need API credentials to perform the same. I have generated OpenAI API credentials via  API keys - OpenAI API Let's ask the same question to ChatGPT programmatically: from openai import OpenAI from dotenv import loa...

Agentic AI - Series 1

Image
  What is Agentic AI?  Agents are nothing but a software programs which can think and act autonomously. This is often called " ReAct " model.  Re - Reasoning. Act - Acting based on that what they thought.  Reasoning is not as same as Thinking. Because, reasoning is a logical process of deriving a conclusion based on the ideas. E.g.: Let's say you want to drive to your friends place. Based on the previous experience you might think it takes 30 minutes to reach the friends place - This is called " Thinking ". Now, the same route to your friend is analyzed by some GPS applications like Google/Apple Map and it does logical analysis by evaluating the current traffic and other attributes and shows the best possible route which might show the ETA as 15 to 20 mins - This is called " Reasoning ". How does the Agent works? Agents are build on top of the LLM (Large Language Models). Agents can use various tools like web scraping, web search and other activities t...

Agentic AI - Guardrails

Image
  Agentic AI refers to AI systems that can autonomously plan, decide, and act—interacting with tools, APIs, and environments without constant human oversight. Guardrails are essential to ensure these agents operate safely, ethically, and within defined boundaries. ๐Ÿค– What Is Agentic AI? Unlike traditional AI that passively generates responses (e.g., chatbots or classifiers), Agentic AI systems are active participants in workflows. They can: ๐Ÿ” Search and retrieve internal or external data ⚙️ Trigger workflows or automate multi-step tasks ๐Ÿง  Make decisions based on goals and context ๐Ÿงพ Write or modify code , schedule events, or make purchases ๐Ÿ”— Interact with APIs, databases, and other systems ⚠️ Why Guardrails Are Critical for Agentic AI Because agentic systems can act independently, they pose greater systemic risk than traditional AI. Without proper controls, they might: ๐Ÿ•ต️‍♂️ Access sensitive data unintentionally ๐Ÿงจ Trigger unauthorized actions (e.g., deleti...