Skip to content

Repository files navigation

Review Copilot for Analysis & Planning (RECAP)

Ruff

Review Copilot for Analysis & Planning (RECAP) is an agentic chat-based system for querying and analyzing review datasets using a multiagent workflow.

Built using LangGraph and LangChain, RECAP provides a framework for utilizing specialized agents as structured tool. The repository provides retrieval, summarization, analytics, and visualization into a single conversational interface. Although the repository is built using Meta-Review Dataset (MReD), the architecture is designed to support other review datasets with minimal changes.

Agents

Table of Contents

Documentation

The full documentation for the repository is located here

Features

  • Multi Agent Orchestration - Utilized Langchain and an orchestrator-tool pattern to utilize speciailized subagents as StructuredTools.
  • Custom Chat Interface - React-based interface for interaction with the orchestrator agent. Frontend displays tool call information, retrieval artifacts, and generates visualizations.
  • ChromaDB Integration - The repository supports use of ChromaDB RAG implementation.
  • Generalizable - The repository is built using the Meta Review Dataset (MReD) but is meant to be generalizable to other datasets with minor code changes.
  • Extensible - The repository provides a structure to easily allow for development and addition of new agents. Agents can be easily converted to tools for utilization by other agents.

Installation

Below are the steps to install the recap repository. The repo supports both local and docker installations

Prerequisites

In order to run the application you will need the following installed on your system:

Alternatively you can you the application using docker

  • Optional: Docker (with GPU support)

Note: Out of the box the system uses Ollama to run the models locally so for best performance ensure the system has dedicated GPUs.

Clone Repository

To get started, clone the source code to your machine.

git clone git@github.com:vtnsi/recap.git
cd recap

Setup Python Virtual Environment

Next, to interact with the agentic python backend you must first set up your virtual environment.

python -m venv .venv

# Use corresponding command to activate virtual venv
source ./.venv/bin/activate # Git bash
./.venv/Scripts/activate.ps1 # Powershell

pip install -e .

Setup Node Environment

Next, to run the frontend application set up your node environment. First confirm you have Node.js and npm installed. If not follow the instructions linked above:

npm --version
node --version

Next install the necessary dependencies to run the frontend react application:

cd recap/ui/
npm install

(Optional) Docker Installation

Instead of instaling locally with Node.js and python you can build and run the application using docker.

docker compose build

Usage

Running the API

Once your virtual environment is set up and active, run the backend API using the following command

python main.py --mode api

On first run, the backend will take a bit longer to run as it pulls necessary models and ingests necessary data. Once these are complete, you should be able to test the api by navigating to Swagger docs at http://localhost:8000/docs

Running Frontend

With the API running, open a new terminal to start the frontend application. Run the following commands

cd ui/
npm run dev

The frontend can then be accessed at http://localhost:5173

(Optional) Running Docker

You can also run the repository using docker

docker compose up

Once the containers have spun up you can test both frontend and backend using http://localhost:5173 and http://localhost:8000/docs respectively.

Interacting with Agents (CLI)

Another way to interact with the different agents is via the CLI. main.py provides a basic chat CLI interaction to interact with agents directly while developing.

python main.py # Invokes Orchestrator Agent

Retrieval Agent:

python main.py --agent retrieval # Invokes Retrieval Agent

Clearing Databse

Review data is automatically ingested on first start up. However if you want to reingest data/ directory into database, Use the --clean flag while starting the application:

python main.py --clean

Authors

Citations

This repo uses the Meta-Review Dataset (MReD) as example review dataset. To learn more about this work see the cited paper:

@inproceedings{shen2022mred,
  title={MReD: A Meta-Review Dataset for Structure-Controllable Text Generation},
  author={Shen, Chenhui and Cheng, Liying and Zhou, Ran and Bing, Lidong and You, Yang and Si, Luo},
  booktitle={Findings of ACL},
  year={2022}
}

License

recap is distributed under the terms of the MIT license.


Virginia Tech · Intelligent System Division

About

Review Copilot for Analysis & Planning (RECAP) is an agentic chat-based system for querying and analyzing review data.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages