Skip to content

Commit a660d03

Browse files
committed
docu: add diagram and screenshot to enhance readme
1 parent 69de6b0 commit a660d03

6 files changed

+41
-221
lines changed

README.md

+41-31
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
Bedrock Deep Research is a Streamlit-based application using Amazon Bedrock, LangGraph, and LangChain AWS libraries that automates article/report generation through AI-powered research, content writing, and image generation. It combines web research, structured content generation, and human feedback to produce comprehensive, well-researched articles with accompanying header images (generated by [Amazon Bedrock Nova Canvas](https://docs.aws.amazon.com/nova/latest/userguide/what-is-nova.html)). This repo is inspired by LangChain's [Deep Researcher](https://github.com/langchain-ai/open_deep_research/tree/main).
44

5-
## Repository Structure
5+
## Features
6+
- **Automated Research**: Performs targeted web searches to gather relevant information
7+
- **Structured Content Generation**: Creates cohesive article outlines and detailed section content
8+
- **Interactive Feedback Loop**: Incorporates human feedback to refine article outlines
9+
- **AI-Generated Imagery**: Produces relevant header images for visual appeal
10+
11+
### Repository Structure
612
```
713
bedrock_deep_research/
814
├── bedrock_deep_research.py # Main Streamlit application entry point
@@ -22,18 +28,37 @@ bedrock_deep_research/
2228
```
2329

2430

25-
### Prerequisites
26-
- Python 3.12 (to install, visit this link: https://www.python.org/downloads/).
27-
Check your python version using `python --version`.
28-
If your global python isn't set as `3.12`, follow the steps here: https://python-poetry.org/docs/managing-environments/)
29-
- Poetry for dependency management
30-
- [AWS Bedrock access](https://docs.aws.amazon.com/bedrock/latest/userguide/model-access-modify.html) for LLM inference (supported models provided in `SUPPORTED_MODELS` variable in `./bedrock_deep_research/config.py`)
31+
## Work Flow
32+
The application follows a sequential workflow from topic input to final article generation, with feedback loops for refinement.
3133

34+
![Agent Flow with Example](static/agent_walkthrough.png)
3235

33-
## Setup
36+
Key Components of the graph:
37+
1. **Initial Researcher**: It performs initial web searches to gather context
38+
2. **Article Outline Generator**: creates structured outline using research data
39+
- **Human Feedback Provider**: This incorporates human feedback for the outline
40+
3. **Section Writer**: A subgraph that generates content after web research.
41+
4. **Compilation**: combines all elements into a cohesive article
42+
5. **Final Section Generation**: Generate the overview and the last paragraph based on the other sections.
43+
6. **Header Image Generator**: creates relevant header image
44+
45+
46+
# Setup
3447

3548
The setup is meant to be used locally with [AWS authentication](https://docs.aws.amazon.com/cli/v1/userguide/cli-authentication-short-term.html), as well as within Amazon Sagemaker: either in [JupyterLab](https://docs.aws.amazon.com/sagemaker/latest/dg/studio-updated-jl.html) or [Code Editor](https://docs.aws.amazon.com/sagemaker/latest/dg/code-editor.html) instance.
3649

50+
Note: Current setup is assuming `us-east-1` region (as defined in `env.tmp` file).
51+
52+
53+
## Prerequisites
54+
- **Python 3.12** (to install, visit this link: https://www.python.org/downloads/).
55+
Check your python version using `python --version`.
56+
If your global python isn't set as `3.12`, follow the steps here: https://python-poetry.org/docs/managing-environments/)
57+
- **Poetry** for dependency management
58+
- Make sure you have **enabled model access** via [AWS Bedrock access](https://docs.aws.amazon.com/bedrock/latest/userguide/model-access-modify.html) in **`us-east-1`** region. You can find the supported models provided in `SUPPORTED_MODELS` variable in `./bedrock_deep_research/config.py`.
59+
- **Tavily API** key for web research capabilities.
60+
61+
3762
### 1. Installation
3863
```bash
3964
# Clone the repository
@@ -49,7 +74,7 @@ poetry install
4974

5075
### 2. Create and set your Tavily API key
5176

52-
Go to https://app.tavily.com/home and create an API KEY for free. Copy the API Key and paste it into the `env.tmp` file.
77+
Go to https://app.tavily.com/home and create a free API KEY. Copy the API Key and paste it into the `env.tmp` file.
5378

5479
### 3. Setup the environment variables
5580

@@ -65,19 +90,15 @@ cp env.tmp .env
6590
streamlit run bedrock_deep_research.py
6691
```
6792

68-
- In the web interface:
69-
- Enter your article topic
70-
- Specify writing guidelines
71-
- Configure search parameters
72-
- Click "Generate Outline"
93+
## Using the Application
94+
7395

74-
- Review and provide feedback on the outline:
75-
- Submit feedback to refine the outline
76-
- Accept the outline to proceed with full article generation
96+
| Step | Description | Visual Reference |
97+
|------|-------------|------------------|
98+
| **1. Enter Article Details** | • Enter your article topic in the main input field<br>• Add specific writing guidelines in the text area provided<br>• Adjust search parameters using the configuration panel<br>• Click the "Generate Outline" button to start the process | ![Article Creation Interface](static/article_config.png) |
99+
| **2. Review and Refine the Outline** | • Review the AI-generated article outline<br>• Provide specific feedback in the feedback field to improve the structure<br>• Use the editing tools to make direct modifications if needed<br>• Click "Accept Outline" when you're satisfied with the structure | ![Outline Review Interface](static/article_outline_review.png) |
100+
| **3. Generate the Complete Article** | • Review the fully researched and written article with its custom header image<br>• Use the formatting tools to make any final adjustments<br>• Click "Copy to Clipboard" to export your article<br>• Or select "New Article" to start the process again | ![Final Article View](static/final_article_view.png) |
77101

78-
- Once complete:
79-
- Review the generated article with header image
80-
- Copy to clipboard or start a new article
81102

82103
### Configuration details
83104

@@ -103,17 +124,6 @@ export LOG_LEVEL=DEBUG
103124
streamlit run bedrock_deep_research.py
104125
```
105126

106-
## Data Flow
107-
The application follows a sequential workflow from topic input to final article generation, with feedback loops for refinement.
108-
109-
Key Components of the graph:
110-
- Initial Researcher: It performs initial web searches to gather context
111-
- Article Outline Generator: creates structured outline using research data
112-
- Human Feedback Provider: This incorporates human feedback for the outline
113-
- Section Writer: A subgraph that generates content after web research.
114-
- Header Image Generator: creates relevant header images
115-
- Final compilation: combines all elements into a cohesive article
116-
117127

118128
### Contributing
119129
Contributions are welcome! Please open an issue or submit a pull request if you have any improvements or bug fixes. Read CONTRIBUTING.md for more details.

notebooks/agentic_writer.ipynb

-190
This file was deleted.

static/agent_walkthrough.png

7.05 MB
Loading

static/article_config.png

91.5 KB
Loading

static/article_outline_review.png

399 KB
Loading

static/final_article_view.png

549 KB
Loading

0 commit comments

Comments
 (0)