https://github.com/sarita-joshi/multi-agent-llm-article-generation
Explore AI writing systems with agents, graphs, adapters, RAG, and multi-model generation workflow.
https://github.com/sarita-joshi/multi-agent-llm-article-generation
agentic-ai ai-tools article-geenration generative-ai graph-ai langchain langgraph llm llm-agents multi-agent openai prompt-engineering rag streamlit
Last synced: 3 months ago
JSON representation
Explore AI writing systems with agents, graphs, adapters, RAG, and multi-model generation workflow.
- Host: GitHub
- URL: https://github.com/sarita-joshi/multi-agent-llm-article-generation
- Owner: Sarita-Joshi
- Created: 2024-07-20T20:01:19.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-05-03T04:17:44.000Z (about 1 year ago)
- Last Synced: 2025-05-15T06:11:22.574Z (about 1 year ago)
- Topics: agentic-ai, ai-tools, article-geenration, generative-ai, graph-ai, langchain, langgraph, llm, llm-agents, multi-agent, openai, prompt-engineering, rag, streamlit
- Language: Python
- Homepage:
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ง LLM Article Generator Hub
> A modular, multi-agent, multi-LLM system to explore and benchmark different architectures for AI-powered article generation โ from simple prompt pipelines to deep LangGraph reasoning workflows.
## ๐ Table of Contents
- [Project Motivation](#-project-motivation)
- [System Capabilities](#-system-capabilities)
- [Evolution of the Architecture](#-evolution-of-the-architecture)
- [Achievements So Far](#-achievements-so-far)
- [Benchmark Goals](#-benchmark-goals)
- [Current Implementations](#-current-implementations)
- [Comparison of Approaches](#-comparison-of-approaches)
- [Directory Structure](#-directory-structure)
- [Getting Started](#-getting-started)
- [Roadmap & Next Phases](#-features-to-explore)
## ๐งฉ Project Motivation
This project started as a simple OpenAI-based prompt wrapper for generating blog-style articles. As I explored more real-world use cases and enterprise LLM patterns, the system evolved into a **research platform** to test and compare:
- Prompt-only vs Tool-using vs Multi-agent designs
- One-shot text vs modular section-based writing
- Static generation vs interactive reasoning graphs
- Single-model dependence vs LLM portability
This repo now acts as a sandbox for testing different approaches to LLM-driven generation systems โ not just for the final output, but also for how we structure and scale the process itself.
The goal is not just to generate content โ but to **analyze and benchmark reliability, explainability, scalability, and extensibility** using a simple usecase!
## ๐ง System Capabilities
This hub currently supports:
โ
**Multi-Agent Design**
- Research agents (Web, Academic, RAG, Validator)
- Writer agents (Outline, Section Writer, Editor)
- Quality agents (Fact Checker, Plagiarism, SEO)
- Controller & Planner models in graph mode
โ
**Multi-Model Support (LLM Factory)**
- OpenAI (GPT-3.5, GPT-4, GPT-4o)
- Anthropic (Claude 3 family)
- Cohere, Gemini (planned)
- Adapter-based config system with shared prompt schema
โ
**Multi-Tool Retrieval**
- Wikipedia (cached)
- Tavily, Serper, Exa, PubMed, Arxiv
- Local file RAG with chunked vector storage (FAISS)
โ
**Execution Modes**
- **Quick mode (V1):** Chain-of-agents with optional RAG
- **Deep mode (V2):** LangGraph-based reasoning and retry DAG
โ
**Streamlit UI with Mode Switcher**
- Form-based UI that adapts between modes
- Optional flags (summary, outline, research toggle)
- Customizable LLM behavior: temperature, model, etc.
## ๐ Evolution of the Architecture
| Stage | Description | Status |
|-------|-------------|--------|
| Stage 0 | Prompt wrapper with OpenAI | Completed |
| Stage 1 | LangChain agent tools (Wikipedia, RAG, etc.) | Completed |
| Stage 2 | Multi-agent flow with LangGraph | Completed |
| Stage 3 | Graph-based planner (Minigraph-style) | Planned |
| Stage 4 | Multimodal + voice-based interaction | In Research |
## ๐ง Achievements So Far
- Built a working **multi-agent research โ writer โ editor** system with optional summary
- Added **MultiPrompt + RAG** pipelines using LangChain tools
- Developed a **LangGraph DAG** with built-in retries, QA gates, and modular agent nodes
- Created a **LLM Adapter Factory** for model switching at runtime
- Designed a **versioned architecture**: `v1/`, `v2/` with flexible UI routing
- Implemented simple caching, structured prompts, vector search fallback
- Developed `pytest`-based testing suite for modular nodes
- Ready to scale with Minigraph, external APIs, Notion/Slack exports
## ๐งช Benchmark Goals
Not a benchmarking tool (yet), but this project can evolve to help measure:
| Aspect | Intention |
|-------------------|-------------------------------|
| Repeatability | How consistent is generation? |
| Cost efficiency | Token usage across workflows |
| Output quality | Clarity, tone, factuality |
| Tool effectiveness| When RAG or search helps most |
| Model flexibility | LLM portability in real flows |
## ๐ Current Implementations
### โ
[V1 โ Lightweight Agentic System](v1/README.md)
- Tools: Wikipedia, RAG, WebSearch
- Agents: Research, Outline, Writer, Summary
- Control: Sequential routing (if/else logic)
- LLM: OpenAI GPT-3.5 / GPT-4
### โ
[V2 โ LangGraph Multi-Agent Pipeline](v2/README.md)
- Pods: Research โ Writing โ Quality
- Tools: + Validators (Fact, SEO, Plagiarism)
- Architecture: StateGraph with retries + node state
- LLM: OpenAI, Claude, etc. via Adapter Factory
## โ๏ธ Comparison of Approaches
| Feature | V1: RouterChain Agents | V2: LangGraph Pipeline |
|----------------------|------------------------|------------------------|
| Flow Control | Sequential | Graph DAG |
| Modularity | Medium | High |
| Tools | RAG, WebSearch, Wiki | All V1 + QA pods |
| Revisions / Retry | Manual | Built-in via edges |
| LLM Portability | OpenAI only | Multi-provider Adapter |
| Token Budgeting | None | Per-agent budgeting |
| Best For | Fast blogs | Long-form, formal docs |
| Planning Layer | None | Planned |
| Multimodal Input | N/A | In progress |
## ๐ฆ Directory Structure
```
.
โโโ app.py # Unified Streamlit UI
โโโ generate.py # Delegates to V1 / V2
โโโ requirements.txt
โ
โโโ v1/ # RouterChain agentic workflow
โ โโโ README.md
โ
โโโ v2/ # LangGraph-based agent system
โ โโโ README.md
```
## ๐ Getting Started
### 1. Clone the Repo
```bash
git clone https://github.com/yourname/llm-article-generator-hub.git
cd llm-article-generator-hub
```
### 2. Create Environment
```bash
python -m venv .venv
source .venv/bin/activate # or .venv\Scripts\activate on Windows
```
### 3. Install Dependencies
```bash
pip install -r requirements.txt
```
### 4. Configure Keys
```
OPENAI_API_KEY=
TAVILY_API_KEY=
...
```
## ๐งญ Features to explore...
- โ
Multi-agent workflow
- โ
LLM Adapter pattern
- โ
Tool integration (RAG)
- Section-wise RAG + adaptive search queries
- Minigraph-based planning before generation
- Quality control layers: fact-checking, plagiarism, tone analysis
- Export support: PDF, Markdown, Notion
- Community prompts and evaluation modes
- LLM feedback + edit suggestions
- Guardrails + EvalSuite
- Multimodal/vision LLM
## ๐ License
MIT License.
Feel free to fork, extend, experiment, or collaborate!