1.0 KiB
1.0 KiB
LangGraph Comparison Agent
Overview
This repository contains a LangGraph agent that, given three entities (e.g. vector databases, frameworks, or products), builds a comparative review. The agent:
- Plans criteria – LLM generates 3‑5 comparison criteria based on the entities.
- Researches each entity‑criterion pair – uses Tavily web search to fetch a short note for each pair.
- Builds a Markdown table – rows are criteria, columns are entities.
- Produces a verdict – LLM gives a concise recommendation.
The final output is a Markdown table followed by a verdict paragraph.
Requirements
pip install -r requirements.txt
Environment variables:
OPENAI_API_KEY– key for the OpenAI model used by LangChain.TAVILY_API_KEY– key for the Tavily API.
Usage
# Default demo – compares Chroma, FAISS, Qdrant
python -m src.main
# Custom entities
python -m src.main "Chroma,FAISS,Qdrant"
The script prints the comparison table and verdict in Markdown format.