Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LLM Based Research Orchestration Engine

AI-Powered Research Report Generation System Using LangChain Runnables

A modular research automation pipeline built using LangChain Expression Language (LCEL), Runnable architecture, and Groq LLMs.


Overview

LLM Based Research Orchestration Engine is a modular AI workflow system that automates the process of generating structured research reports using LangChain Runnables.

The project demonstrates how modern AI systems are engineered using:

  • RunnableSequence
  • RunnableParallel
  • RunnableLambda
  • RunnablePassthrough
  • LCEL Pipelines
  • Modular Prompt Engineering

Instead of relying on a single prompt-response interaction, this system uses a multi-stage orchestration pipeline capable of generating multiple research sections simultaneously and combining them into a professionally formatted report.


Problem Statement

Creating detailed research reports manually is time-consuming and repetitive. Writers, students, analysts, and researchers often spend significant time:

  • Structuring research topics
  • Generating section-wise content
  • Maintaining consistency in writing style
  • Formatting reports properly
  • Summarizing findings

This project solves the problem by automating the entire report generation workflow using orchestrated LLM pipelines.


Project Architecture

User Topic
    ↓
RunnableParallel
 ├── Introduction Chain
 ├── Applications Chain
 └── Challenges Chain
    ↓
RunnableLambda Formatter
    ↓
Final Markdown Report

image alt


Core Concepts Used

Component Purpose
RunnableSequence Creates sequential AI workflows
RunnableParallel Generates multiple report sections simultaneously
RunnableLambda Transforms and formats outputs
RunnablePassthrough Preserves and propagates workflow state
Prompt Templates Provides modular prompting architecture
LCEL Enables declarative chain composition

Features

  • Automated AI-powered research report generation
  • Parallel section generation using RunnableParallel
  • Modular chain architecture
  • Structured prompt engineering
  • Markdown report formatting
  • Scalable workflow design
  • Groq LLM integration
  • Production-style project structure

Project Structure

AI_Research_Report_Generator/
│
├── app.py
│
├── chains/
│   ├── planner_chain.py
│   ├── section_chain.py
│   ├── parallel_chain.py
│   └── formatter_chain.py
│
├── prompts/
│   ├── planner_prompt.py
│   └── section_prompt.py
│
├── utils/
│   └── formatter.py
│
├── outputs/
│   └── report.md
│
├── requirements.txt
│
├── .env
│
└── README.md

Workflow Explanation

1. Topic Input

The user provides a research topic.

Example:
"Future of Generative AI in Healthcare"

2. Parallel Section Generation

The system uses RunnableParallel to generate multiple sections simultaneously:

  • Introduction
  • Applications
  • Challenges

3. Formatting Pipeline

RunnableLambda combines and formats all generated sections into a structured markdown report.

4. Final Output

The final report is stored as:

outputs/report.md

Technologies Used

Technology Purpose
Python Core programming language
LangChain LLM orchestration framework
LangChain Core Runnable architecture and LCEL
Groq API LLM inference provider
LCEL Chain composition syntax
dotenv Environment variable management

Installation

1. Clone Repository

git clone https://github.com/your-username/AI_Research_Report_Generator.git

cd AI_Research_Report_Generator

2. Create Virtual Environment

python -m venv venv

3. Activate Virtual Environment

Windows

venv\Scripts\activate

Linux / Mac

source venv/bin/activate

4. Install Dependencies

pip install -r requirements.txt

Environment Variables

Create a .env file in the root directory:

GROQ_API_KEY=your_api_key_here

Running The Project

python app.py

Enter a research topic when prompted.


Example Output

# Future of Generative AI in Healthcare

## Introduction
...

## Applications
...

## Challenges
...

Learning Outcomes

This project demonstrates practical understanding of:

  • LLM Workflow Engineering
  • Prompt Chaining
  • Parallel AI Processing
  • Production-Style AI Architecture
  • Modular LangChain Development
  • Runnable Orchestration
  • State Transformation Pipelines

Future Improvements

  • Dynamic section generation
  • Executive summary generation
  • RunnableBranch integration
  • Audience-specific report styles
  • Report evaluation chains
  • Hallucination detection
  • Streamlit frontend
  • PDF export support
  • RAG integration
  • Multi-agent orchestration

Version

Version 1.0


Author

Ashutosh Pandey

Generative AI Research Analyst | AI Workflow Engineering Enthusiast

About

An intelligent LLM-powered research orchestration system built using LangChain Runnables. This project demonstrates modular AI workflow engineering through parallel section generation, prompt orchestration, dynamic pipeline construction, and automated research report synthesis.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages