A 3-stage multi-model AI pipeline that automates startup story generation — from web discovery to publication-ready article.
Startup stories and founder narratives are scattered across the web and interviews. Manually collecting, structuring, and converting them into publishable content is time-consuming and inconsistent.
This pipeline automates:
- discovery of startup information
- structuring into machine-readable format
- generation of coherent, publication-ready stories
- Multi-model approach avoids over-reliance on a single LLM
- Separation of stages improves modularity and debugging
- Structured JSON intermediate reduces hallucination in final output
Alternatively, feed a raw founder interview transcript directly into Stage 3.
Full pipeline (query → story):
python pipeline.py --query "Zepto grocery delivery India" --saveTranscript only (transcript → story):
python pipeline.py --transcript examples/sample_transcript.txt --save1. Install dependencies:
pip install -r requirements.txt2. Create a .env file:
ANTHROPIC_API_KEY=your_key_here
GEMINI_API_KEY=your_key_here
TAVILY_API_KEY=your_key_here
3. Get API keys:
- Anthropic: platform.anthropic.com
- Gemini: aistudio.google.com
- Tavily: tavily.com (1000 free searches/month)
Running with --save creates an /output folder with:
story.md— formatted startup articlestructured_brief.json— extracted startup data (query mode only)
llm-content-pipeline/
├── pipeline.py ← main script
├── requirements.txt
├── .gitignore
├── prompts/
│ ├── transcript_to_story.md ← prompt for transcript mode
│ ├── data_extraction.md ← prompt for JSON extraction
│ └── hallucination_control_rules.md ← prompt engineering reference
└── examples/
├── sample_transcript.txt ← sample founder interview
├── sample_output_story.md ← example story output
└── sample_extraction_output.json ← example JSON output
| Stage | Model | Task |
|---|---|---|
| 1 — Discovery | Tavily | Web search for startup info |
| 2 — Structuring | Gemini 1.5 Flash | Extract structured JSON from research |
| 3 — Drafting | Claude Sonnet | Generate publication-ready story |
Each model is used where it performs best:
- Tavily — purpose-built for AI search, returns clean cited results
- Gemini — reliable structured extraction, handles JSON formatting well
- Claude — strongest narrative generation with hallucination controls
Query: "Zepto grocery delivery India"
- Generated structured JSON with startup details
- Final article written in narrative format
- Claude produced high-quality storytelling with good coherence
- Gemini provided consistent structured extraction
- Tavily ensured up-to-date factual grounding
See: examples/sample_output_story.md
- Add caching layer to reduce API calls
- Implement retry mechanism for API failures
- Add evaluation metrics for output quality
- Model-agnostic support — let users configure their own API keys and choose models
Biswajyoti Nath B.Tech Computer Science, Barak Valley Engineering College LinkedIn | Portfolio
