Skip to content

Commit 60cabe8

Browse files
authored
Vanna with NVIDIA AI Endpoints (#290)
* Vanna with NV Signed-off-by: Divyansh Jain <[email protected]> * Moving vanna to community folder * Remove Vanna files from langchain folder * Add README and project assets --------- Signed-off-by: Divyansh Jain <[email protected]>
1 parent 14482a5 commit 60cabe8

File tree

7 files changed

+1278896
-0
lines changed

7 files changed

+1278896
-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+
* [Vanna with NVIDIA AI Endpoints](./Vanna_with_NVIDIA_AI_Endpoints/)
27+
28+
This example demonstrates how to optimize Vanna's open-source text-to-SQL pipeline using NVIDIA NIM and NeMo Retriever for faster and more efficient analytics. The notebook showcases integration with NVIDIA's AI endpoints to accelerate natural language to SQL queries on a Steam games dataset, enabling data exploration through simple English questions that are automatically converted to optimized SQL queries.
29+
2630
* [NVIDIA Data Analysis Agent](./data-analysis-agent/)
2731

2832
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.
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Accelerating Text-to-SQL Inference with Vanna and NVIDIA AI Endpoints
2+
3+
This repository demonstrates how to optimize Vanna's open-source text-to-SQL pipeline using NVIDIA NIM and NeMo Retriever for faster and more efficient analytics.
4+
5+
![NVIDIA Accelerated Vanna Pipeline](assets/nvidia_vanna.png)
6+
7+
## Overview
8+
9+
This project showcases how to leverage NVIDIA's AI endpoints to significantly accelerate text-to-SQL generation with Vanna, enabling faster natural language queries on databases.
10+
11+
## Features
12+
13+
- Integration with NVIDIA NIM for LLM-based SQL generation
14+
- NeMo Retriever for efficient semantic search
15+
- Training Vanna on domain specific data
16+
17+
## Requirements
18+
19+
- Python 3.10+
20+
- NVIDIA API key (get yours at [https://build.nvidia.com/](https://build.nvidia.com/))
21+
- Required Python packages:
22+
- vanna
23+
- langchain
24+
- langchain-nvidia-ai-endpoints
25+
- pymilvus[model]
26+
- pandas
27+
- numpy
28+
- sqlite3
29+
- openai
30+
- kagglehub
31+
32+
## Getting Started
33+
34+
1. Clone this repository
35+
2. Install the required packages
36+
3. Set your NVIDIA API key
37+
4. Run the Jupyter notebook `vanna_with_NVIDIA.ipynb`
38+
39+
## Dataset
40+
41+
The notebook uses Steam game datasets from Kaggle:
42+
- [Steam Games Dataset](https://www.kaggle.com/datasets/fronkongames/steam-games-dataset/data)
43+
- [Games on Steam](https://www.kaggle.com/datasets/sujaykapadnis/games-on-steam/)
44+
45+
After preprocessing, the data is organized into three tables:
46+
- `games`: Game information including name, price, reviews, etc.
47+
- `categories`: Game categories
48+
- `tags`: User-defined tags and their frequencies
49+
50+
## Pipeline
51+
52+
The NVIDIA-accelerated Vanna pipeline consists of:
53+
1. Data preparation and ingestion
54+
2. Vector DB setup with Milvus
55+
3. Integration with NVIDIA LLM (Llama 3.1) and embedding models
56+
4. SQL database setup and training
57+
5. Natural language query to SQL conversion
58+
59+
## Example Queries
60+
61+
The notebook demonstrates several example queries:
62+
- "Which 5 games have the most positive reviews and how many?"
63+
- "Which indie game has the biggest player base?"
64+
- "Which category has the maximum number of gamers and how many?"
65+
66+
## License
67+
68+
This project is licensed under the MIT License - see the LICENSE file for details.
47.5 KB
Loading

0 commit comments

Comments
 (0)