Skip to main content

Vanna-based Text-to-SQL integration for NeMo Agent Toolkit with Databricks support

Project description

NVIDIA NeMo Agent Toolkit Vanna

Vanna-based Text-to-SQL integration for NeMo Agent Toolkit.

Overview

This package provides production-ready text-to-SQL capabilities using the Vanna framework with Databricks support.

Features

  • AI-Powered SQL Generation: Convert natural language to SQL using LLMs
  • Databricks Support: Optimized for Databricks SQL warehouses
  • Vector-Based Similarity Search: Milvus integration for few-shot learning
  • Streaming Support: Real-time progress updates
  • Query Execution: Optional database execution with formatted results
  • Highly Configurable: Customizable prompts, examples, and connections

Quick Start

Install the package:

pip install nvidia-nat-vanna

Create a workflow configuration:

functions:
  text2sql:
    _type: text2sql
    llm_name: my_llm
    embedder_name: my_embedder
    milvus_retriever: my_retriever
    database_type: databricks
    connection_url: "${CONNECTION_URL}"
    execute_sql: false

  execute_db_query:
    _type: execute_db_query
    database_type: databricks
    connection_url: "${CONNECTION_URL}"
    max_rows: 100

llms:
  my_llm:
    _type: nim
    model_name: meta/llama-3.1-70b-instruct
    api_key: "${NVIDIA_API_KEY}"

embedders:
  my_embedder:
    _type: nim
    model_name: nvidia/llama-3.2-nv-embedqa-1b-v2
    api_key: "${NVIDIA_API_KEY}"

retrievers:
  my_retriever:
    _type: milvus_retriever
    uri: "${MILVUS_URI}"
    connection_args:
      user: "developer"
      password: "${MILVUS_PASSWORD}"
      db_name: "default"
    embedding_model: my_embedder
    content_field: text
    use_async_client: true

workflow:
  _type: rewoo_agent
  tool_names: [text2sql, execute_db_query]
  llm_name: my_llm

Run the workflow:

nat run --config config.yml --input "How many customers do we have?"

Components

text2sql Function

Generates SQL queries from natural language using:

  • Few-shot learning with similar examples
  • DDL (schema) information
  • Custom documentation
  • LLM-powered query generation

execute_db_query Function

Executes SQL queries and returns formatted results:

  • Databricks SQL execution
  • Result limiting and pagination
  • Structured output format
  • SQLAlchemy Object Relational Mapper (ORM)-based connection

Use Cases

  • Business Intelligence: Enable non-technical users to query data
  • Data Exploration: Rapid prototyping and analysis
  • Conversational Analytics: Multi-turn Q&A about your data
  • SQL Assistance: Help analysts write complex queries

Documentation

Full documentation: https://docs.nvidia.com/nemo/agent-toolkit/latest/

License

Part of NVIDIA NeMo Agent Toolkit. See repository for license details.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nvidia_nat_vanna-1.7.0a20260424-py3-none-any.whl (25.7 kB view details)

Uploaded Python 3

File details

Details for the file nvidia_nat_vanna-1.7.0a20260424-py3-none-any.whl.

File metadata

File hashes

Hashes for nvidia_nat_vanna-1.7.0a20260424-py3-none-any.whl
Algorithm Hash digest
SHA256 dd91258f35f27614f18c902abe47304b546f03ba3704388b2bdf6e22a1440722
MD5 ecb8c8c08e247d89233aa3ff69420024
BLAKE2b-256 46b9576b2c63f5353ca98687d11a42d0db3d81eb83a054963fca40fe70a77e91

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page