Skip to content

Commit d6ef188

Browse files
authored
feat: add data analysis agent example (#289)
1 parent e253fd3 commit d6ef188

File tree

6 files changed

+454
-0
lines changed

6 files changed

+454
-0
lines changed

community/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ Community examples are sample code and deployments for RAG pipelines that are no
2323

2424
## Inventory
2525

26+
* [NVIDIA Data Analysis Agent](./data-analysis-agent/)
27+
28+
This example demonstrates an interactive, agentic data analysis application that leverages NVIDIA Llama-3.1-Nemotron-Ultra-253B-v1 for advanced reasoning and data exploration. Users can upload CSV files, ask questions in natural language, and receive automated visualizations with clear, step-by-step reasoning. The implementation features a modular agent architecture for data insight, code generation, execution, and transparent reasoning.
29+
2630
* [NVIDIA RAG in 5 minutes](./5_mins_rag_no_gpu/)
2731

2832
This is a simple standalone implementation showing rag pipeline using Nvidia API Catalog models. It uses a simple Streamlit UI and one file implementation of a minimalistic RAG pipeline.
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# Data Analysis Agent
2+
3+
An interactive, agentic data analysis application that leverages advanced LLM reasoning to help users explore, visualize, and understand their data using NVIDIA Llama-3.1-Nemotron-Ultra-253B-v1.
4+
5+
## Overview
6+
7+
This repository contains a Streamlit application that demonstrates a complete workflow for data analysis:
8+
1. **Data Upload**: Upload CSV files for analysis
9+
2. **Natural Language Queries**: Ask questions about your data in plain English
10+
3. **Automated Visualization**: Generate relevant plots and charts
11+
4. **Transparent Reasoning**: Get detailed explanations of the analysis process
12+
13+
The implementation leverages the powerful Llama-3.1-Nemotron-Ultra-253B-v1 model through NVIDIA's API, enabling sophisticated data analysis and reasoning.
14+
15+
Learn more about the model [here](https://developer.nvidia.com/blog/build-enterprise-ai-agents-with-advanced-open-nvidia-llama-nemotron-reasoning-models/).
16+
17+
## Features
18+
19+
- **Agentic Architecture**: Modular agents for data insight, code generation, execution, and reasoning
20+
- **Natural Language Queries**: Ask questions about your data—no coding required
21+
- **Automated Visualization**: Instantly generate and display relevant plots
22+
- **Transparent Reasoning**: Get clear, LLM-generated explanations for every result
23+
- **Powered by NVIDIA Llama-3.1-Nemotron-Ultra-253B-v1**: State-of-the-art reasoning and interpretability
24+
25+
![Workflow](./assets/workflow.png)
26+
27+
## Requirements
28+
29+
- Python 3.10+
30+
- Streamlit
31+
- NVIDIA API Key (see [Installation](#installation) section for setup instructions)
32+
- Required Python packages:
33+
- pandas
34+
- matplotlib
35+
- streamlit
36+
- requests
37+
38+
## Installation
39+
40+
1. Clone this repository:
41+
```bash
42+
git clone https://github.com/NVIDIA/GenerativeAIExamples.git
43+
cd GenerativeAIExamples/community/data-analysis-agent
44+
```
45+
46+
2. Install dependencies:
47+
```bash
48+
pip install -r requirements.txt
49+
```
50+
51+
3. Set up your NVIDIA API key:
52+
- Sign up or log in at [NVIDIA Build](https://build.nvidia.com/nvidia/llama-3_1-nemotron-ultra-253b-v1?integrate_nim=true&hosted_api=true&modal=integrate-nim)
53+
- Generate an API key
54+
- Set the API key in your environment:
55+
```bash
56+
export NVIDIA_API_KEY=your_nvidia_api_key_here
57+
```
58+
- Or add it to your `.env` file if you use one
59+
60+
## Usage
61+
62+
1. Run the Streamlit app:
63+
```bash
64+
streamlit run data_analysis.py
65+
```
66+
67+
2. Download example dataset (optional):
68+
```bash
69+
wget https://raw.githubusercontent.com/datasciencedojo/datasets/master/titanic.csv
70+
```
71+
72+
3. Use the application:
73+
- Upload a CSV file (e.g., the Titanic dataset)
74+
- Ask questions in natural language
75+
- View results, visualizations, and detailed reasoning
76+
77+
## Example
78+
79+
![App Demo](./assets/data_analysis_agent_demo.png)
80+
81+
## Model Details
82+
83+
The Llama-3.1-Nemotron-Ultra-253B-v1 model used in this project has the following specifications:
84+
- **Parameters**: 253B
85+
- **Features**: Advanced reasoning capabilities
86+
- **Use Cases**: Complex data analysis, multi-agent systems
87+
- **Enterprise Ready**: Optimized for production deployment
88+
89+
## Acknowledgments
90+
91+
- [NVIDIA Llama-3.1-Nemotron-Ultra-253B-v1](https://build.nvidia.com/nvidia/llama-3_1-nemotron-ultra-253b-v1)
92+
- [Streamlit](https://streamlit.io/)
93+
- [Pandas](https://pandas.pydata.org/)
94+
- [Matplotlib](https://matplotlib.org/)
95+
96+
97+
## Contributing
98+
99+
Contributions are welcome! Please open an issue or submit a pull request.
264 KB
Loading
416 KB
Loading

0 commit comments

Comments
 (0)