Skip to content

Implementation of a ReAct Agent leveraging SerpAPI, LangChain, and Google's Gemini v1.5 model. The agent uses search, compare, and analyze tools to handle complex queries, integrated with a Streamlit interface for user interaction.

Notifications You must be signed in to change notification settings

RishabhS66/ReAct-Agent-for-Search-Compare-and-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ReAct Agent: Reasoning and Acting with Multiple Tools

Author: Rishabh Srivastava

This repository contains the code for an interactive ReAct Agent that integrates search, comparison, and analysis tools using LangChain, SerpAPI, and Google Vertex AI's Gemini model. The project includes a Gradio-based UI for processing queries and displaying results, with robust error handling and seamless tool transitions.

Features

  • Search Tool: Fetches information from the web using SerpAPI.
  • Comparison Tool: Compares multiple items based on a specified category using LangChain.
  • Analysis Tool: Summarizes and extracts key insights from search and comparison results using Gemini model.

Dependencies

To run this project, ensure the following Python libraries are installed:

  • gradio
  • langchain
  • langchain_community
  • langchain_google_vertexai
  • google-cloud-aiplatform

Install the required dependencies using pip:

pip install gradio langchain langchain_community langchain_google_vertexai google-cloud-aiplatform

Running the App

Run the application by using the command:

python app.py

You can access the Gradio interface via the link provided on your terminal.

The user interface generated by Gradio is shown below:

UI for ReAct Agent

UI for ReAct Agent

The Jupyter Notebook ReAct_Agent.ipynb has also been added for convenience in running the code and ease of experimentation.

About

Implementation of a ReAct Agent leveraging SerpAPI, LangChain, and Google's Gemini v1.5 model. The agent uses search, compare, and analyze tools to handle complex queries, integrated with a Streamlit interface for user interaction.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published