AI Report Generator is a robust tool that leverages state-of-the-art language models and AI-driven search functionalities to dynamically create detailed reports, newsletters, or blogs. The project harnesses a state graph workflow, integrating research, content generation, and interactive user interfaces to deliver high-quality, structured content.
- Overview
- Demo
- Features
- Technologies Used
- Project Structure
- Installation
- Usage
- Converting Markdown to PDF
- Customization
- Roadmap
- Contributing
- License
- Acknowledgements
The AI Report Generator is designed to streamline the creation of comprehensive content by:
- Generating well-organized outlines based on user-provided topics and instructions.
- Performing deep research using integrated AI search tools for general, finance, and news queries.
- Compiling and formatting final reports in markdown format, which can be easily converted to PDF using pandoc and related tools.
This project is ideal for content creators, researchers, and anyone looking to automate the production of detailed written materials.
Watch our local demo video to see the AI Report Generator in action. This demo showcases:
- User Interface Walkthrough: An overview of the Streamlit-based UI where you input parameters.
- Workflow Visualization: How the state graph transitions from research to content generation.
- Report Generation: The process of generating, previewing, and downloading a report.
Click the video below to view it:
-
Graph Workflow Diagram:
This diagram illustrates the state transitions from initial research through final report generation. -
Sample Generated Reports:
-
Dynamic Report Generation:
Automatically generates structured reports, newsletters, or blogs from a given topic and outline. -
AI-Powered Deep Research:
Integrates with specialized search tools (via the Tavily API) to fetch up‑to‑date research and news, ensuring the content is current and comprehensive. -
State Graph Workflow:
Utilizes a robust state graph (powered by LangGraph) to manage multi-stage processes—from initial research to final report composition. -
Interactive Web Interface:
Built using Streamlit, the interface allows users to input parameters, visualize report structure, and download the final markdown document. -
Customizable Workflow:
Easily extend the system by modifying the state graph and integrating new tools or prompts to better suit your content needs.
-
Language Models & AI Tools:
-
Workflow Management:
-
APIs & Libraries:
- Tavily API for search functionalities
- Streamlit for the web interface
-
Python Ecosystem:
- Environment management with dotenv
-
workflow.py:
Orchestrates the research and report generation processes using a state graph to define transitions and interactions. -
tools.py:
Contains custom tool functions for executing general, finance, and news searches via the Tavily API. -
report_generator.py:
Implements AI-driven content generation, from creating detailed outlines to final report assembly, using ChatNVIDIA and LangChain. -
models.py:
Defines the data models (using TypedDicts) for managing Report and Research states throughout the workflow. -
streamlit_app.py:
Provides a sleek Streamlit interface for users to input parameters, trigger the report generation workflow, and download the final content. -
requirements.txt:
Lists all necessary dependencies to run the project. -
.gitignore & .env_example:
Standard configuration files to manage environment variables and ignore unnecessary files in version control.
- Python 3.8 or higher
- pip
-
Clone the Repository:
git clone https://github.com/your-username/ai-report-generator.git cd ai-report-generator
-
Create and Activate a Virtual Environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Dependencies:
pip install -r requirements.txt
-
Configure Environment Variables:
-
Duplicate the
.env_example
file to.env
:cp .env_example .env
-
Update the
.env
file with your API keys forTAVILY_API_KEY
andNVIDIA_API
.
-
Launch the Streamlit interface by executing:
streamlit run streamlit_app.py
-
Input Parameters:
Provide the topic, select the report type (Report, News Letter, Blog), and define an outline for the content. -
Initiate Generation:
Click on Generate Report to start the multi-stage workflow that:- Generates a detailed report structure.
- Performs deep research to fetch relevant content.
- Compiles a final report in markdown format.
-
Download Report:
View the generated structure and report on-screen and download the final markdown file using the provided download button.
To convert your generated markdown report to PDF, follow these steps (Ubuntu/Debian):
-
Install Pandoc and TeX Live packages:
sudo apt-get install -y pandoc sudo apt-get install -y texlive-xetex texlive-fonts-recommended texlive-plain-generic
-
Convert the Markdown file to PDF:
pandoc report.md -o report.pdf
This command converts report.md
to report.pdf
using Pandoc. Adjust the filenames as needed.
-
Workflow Extensions:
Enhance or modify the state graph inworkflow.py
to include new research or content generation steps. -
Tool Integration:
Add or update functions intools.py
to support additional search topics or integrate different APIs. -
Prompt Tuning:
Adjust the prompts inreport_generator.py
to refine the AI-generated content or match a particular writing style.
-
Feature Enhancements:
- Integrate more domain-specific search tools.
- Add support for multi-language reports.
- Improve prompt tuning for better content consistency.
-
UI Improvements:
- Enhance the Streamlit dashboard with more interactive elements.
- Implement progress indicators for long-running tasks.
-
Community Contributions:
- Gather feedback from users and incorporate feature requests.
- Expand documentation with tutorials and usage examples.
Contributions are highly appreciated! To contribute:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Commit your changes with clear commit messages.
- Open a pull request for review.
This project is licensed under the MIT License. See the LICENSE file for complete details.
- LangChain & LangGraph:
For providing frameworks that simplify complex workflows. - Streamlit:
For enabling rapid development of interactive data applications. - Tavily & NVIDIA:
For their APIs that power advanced search and content generation capabilities. - Community Contributions:
Thanks to all open source contributors who make projects like this possible.