Skip to main content

Vanna AI LLamaPack

Vanna AI is an open-source RAG framework for SQL generation. It works in two steps:

  1. Train a RAG model on your data
  2. Ask questions (use reference corpus to generate SQL queries that can run on your db).

Check out the Github project and the docs for more details.

This LlamaPack creates a simple VannaQueryEngine with vanna, ChromaDB and OpenAI, and allows you to train and ask questions over a SQL database.

CLI Usage

You can download llamapacks directly using llamaindex-cli, which comes installed with the llama-index python package:

llamaindex-cli download-llamapack VannaPack --download-dir ./vanna_pack

You can then inspect the files at ./vanna_pack and use them as a template for your own project!

Code Usage

You can download the pack to a ./vanna_pack directory:

from llama_index.core.llama_pack import download_llama_pack

# download and install dependencies
VannaPack = download_llama_pack("VannaPack", "./vanna_pack")

From here, you can use the pack, or inspect and modify the pack in ./vanna_pack.

Then, you can set up the pack like so:

pack = VannaPack(
    openai_api_key="<openai_api_key>",
    sql_db_url="chinook.db",
    openai_model="gpt-3.5-turbo",
)

The run() function is a light wrapper around llm.complete().

response = pack.run("List some sample albums")

You can also use modules individually.

query_engine = pack.get_modules()["vanna_query_engine"]

Metadata

Release files for llama-index-packs-vanna 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llama-index-packs-vanna 0.3.0
File Size Uploaded
llama_index_packs_vanna-0.3.0.tar.gz 3.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-packs-vanna 0.3.0
File Interpreter ABI Platform
llama_index_packs_vanna-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.0 kB

Release files / llama_index_packs_vanna-0.3.0.tar.gz

Download URL llama_index_packs_vanna-0.3.0.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ef1d14c527ad7cf7423817c09ad336e0cbb8f174e056a72337f08ac2e5fa1995
BLAKE2b-256 checksum
How to use checksums
22f106637545908fa7f45756b9987a75c45929bf5b755c1ff1bfbd64fc645a8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0

Release files / llama_index_packs_vanna-0.3.0-py3-none-any.whl

Download URL llama_index_packs_vanna-0.3.0-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
316ffe9e3b0223d398d7f06c4e1893c0076eb2ad3c48ec7fe271998e79b94c0f
BLAKE2b-256 checksum
How to use checksums
a84d00065668758f02beb53b932a02e63d43284a76b9385a95d8cb5d007c97cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.0

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page