An open API service indexing awesome lists of open source software.

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.

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!