DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Top 3 AI Tools to Supercharge Your Software Development
  • Exploring the Security Risks of Large Language Models
  • ReactJS With ChatGPT: Building Conversational AI Into Your Web Apps
  • How Can Software Developers Be Useful With ChatGPT and Bard AI?

Trending

  • DevOps and Platform Engineering Readiness Checklist: Everything Needed for a Scalable, Secure, High-Velocity Delivery Platform
  • Architecting Sub-Microsecond HFT Systems With C++ and Zero-Copy IPC
  • Pragmatica Aether: Let Java Be Java
  • How to Format Articles for DZone
  1. DZone
  2. Data Engineering
  3. AI/ML
  4. AI Agents: Generative AI Trend of the Month

AI Agents: Generative AI Trend of the Month

In just 30 minutes, learn to build no-code AI agent applications with an LLM that has real-world knowledge.

By 
Rolly Seth user avatar
Rolly Seth
·
Tushar Chugh user avatar
Tushar Chugh
·
Aug. 24, 23 · Tutorial
Likes (2)
Comment
Save
Tweet
Share
5.0K Views

Join the DZone community and get the full member experience.

Join For Free

If you have been involved in LLM (Large Language Model) and Generative AI application development, "AI agents" wouldn't be a new term for you. 

AI agents are Software that can perform certain tasks independently and proactively without the need for human intervention, often utilizing a suite of tools like calculators or web browsing.
- AI Glossary

If you are new to the domain, you might wonder: "How is it different from Large Language Models and when do I use AI agents in my application?"

One of the major areas where AI agents could help is removing the shortcomings of LLMs that models might not have the most current world knowledge. Why? This is because models can only be used on the data it is trained on. To solve this, we introduce AI agents in the flow to help with getting the latest data. Thus, if LLMs are not able to answer a question confidently and correctly, related agents that are assigned are called.

As we enter the 2nd half of 2023, AI agents are being utilized for complex workflows, creating specialized personality templates and multi-tasking AI. It is a hot area in the industry as several tech startups are growing in this area (see "Insight: Race towards 'autonomous' AI agents grips Silicon Valley"). You might have recently heard the news of AI Village utilizing 25 bots (see "Researchers Create AI Village Where Bots Plan Valentine's Day Parties"). But there are several other companies already offering AI agent workflow support such as AgentGPT (reworkd.ai) and CognosysAI.

My personal favorite is a drag and drop AI called FlowiseAI - Build LLMs Apps Easily which helps me in creating ChatGPT applications that have real-world information. 

Thus, I wanted to share step by step approach to how I created a no-code LLM application that answers with the latest world knowledge using the Flowise.ai tool.

I used a five-stage process to build the application:

  • Stage 1: Install
  • Stage 2: Build
  • Stage 3: Connect
  • Step 4: Run
  • Step 5: Share/Export 

The steps below don't require you to have experience in day-to-day software development. Thus, even product managers, designers, and other field professionals can also use it. 

Stage 1: Install

  • 1. 1. Install NodeJS - Download Node.js and run the installer (no coding experience required).
  • 1.2. Open command prompt - By typing cmd on your Windows search bar; within the command prompt, type the following instruction:>npm install -g flowise instruction

This will install GitHub - FlowiseAI/Flowise. Drag and drop UI to build your customized LLM flow.

  • 1.3. After the above installation is done, start  the Flowise tool by typing Npx flowise start on the command prompt.

When Flowise is successfully started, you will get a custom message like this:

Custom message after starting Flowise

If you are an advanced developer, you can find alternative ways to install from the above GitHub link to Flowise. 

  • 1.4.Running Flowise.AI- Next open the browser and type localhost:3000. It will open a page like the one below:

Chatflows screen

Stage 2: Build

We are now ready to start building our ChatGPT application feeding in real-world data. 

In order for the LLM to fetch the latest world information, we will leverage SerpAPI, which helps integrate Google Search APIs.

Let's go through building step-by-step. 

  • 2.1. On the localhost:3000 browser that has flowise.ai running, click on add new on the right of the page. This would open a blank canvas:

Add new

  • 2.2. This is where we will build our drag-and-drop application with AI agents. On the left of the canvas, you will see the option to add different nodes as shown in the below screenshot.

    Untitled chatflow: add nodes

Using the search button on Add node above, drag and drop the following four nodes and connect them in the way shown below:

  1. ChatOpenAI - Connects basic ChatGPT bot
  2. Conversational agent- Helps build an interactive chatbot that remembers the chatbot history
  3. Buffer memory- It helps save the conversation for more contextual answers.
  4. SerpAPI - Google Search API, an AI agent that is called when OpenAI doesn't have the latest information 

Note: The items marked in red below will be filled in during the next step. 

The temperature number inside ChatOpenAI has been marked as 0.2 to provide a more accurate answer. If you want more creative answers, you can increase this number to 1.

Connect credentials

This shouldn't take more than 5min. 

Stage 3: Connect

Once you have built the application shown in the screenshot above using drag and drop only, you will need two APIs to connect to the following:

  • 3.1. OpenAI Key - Visit the OpenAI platform to get the key. You would need to create a new account if not having an existing one. After the account is created, on the top right, you will see an option to view API keys.

    View API keys

Click on View API keys and create a new secret key. 

Create new secret key

Once this key is created, save it somewhere secured and go back to the Flowise localhost:3000 application running on the browser. 

Now add this key under Connect Credential in the ChatOpenAI box on the browser as shown below:

ChatOpenAI: Connect Credential
Connect Credential: Create New


OpenAI API Credential Name

  • 3.2.SerpAPI Key - Next, visit SerpAPI for the Google search key. I signed up for the free tier. 

SerpAPI: Choose a plan

Similar to the OpenAI key, add the SerpAPI key on the browser. 

Stage 4: Run

After your APIs are added in the previous stage, make sure to save the Flowise chatflow. 

Save button

Your flow should look something like the below:

Chatflow flow

We will now test it by clicking on the chat button on the Flowise UI on the right and asking Chatbot for some of the latest information as shown in the screenshot below. 

Ask Chatbot sample question

Stage 5: Share/Export

Once you are happy, just click on the settings button on the top right of the page, and then click Export Chatflow.

Export Chatflow

I decided to use the Share Chatbot button. If you are a more advanced developer, you can use other embed/Python/JavaScript/cURL integration options.

Embed in website or use as API


This is what my personalized chatbot finally looks like from the Share Chatbot customized options. 

Personalized chatbot results

Happy creating quick LLM applications that are personalized and don't hallucinate, thanks to AI Agents! :)

AI Language model ChatGPT

Opinions expressed by DZone contributors are their own.

Related

  • Top 3 AI Tools to Supercharge Your Software Development
  • Exploring the Security Risks of Large Language Models
  • ReactJS With ChatGPT: Building Conversational AI Into Your Web Apps
  • How Can Software Developers Be Useful With ChatGPT and Bard AI?

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook