Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Python package for generating accurate SQL via LLMs using RAG (github.com/vanna-ai)
7 points by zainhoda on Dec 17, 2023 | hide | past | favorite
Hello HN! We’ve been working hard on Vanna, our RAG framework for SQL generation and we’ve been updating our documentation. Please have a look — we have a ton of Jupyter notebooks for any combination of desired use cases.

At it’s heart, we have abstractions that help you:

- “train” a RAG “model” i.e. add metadata for the retrieval augmentation system to reference when constructing the LLM prompt (yes, we know that the terms “train” and “model” are somewhat confusing and we’re open to changing those terms if you can suggest better ones)

- “ask” questions, which will generate SQL, run it, produce charts, etc

You can use this in:

- Jupyter notebooks

- Streamlit (open-source code provided)

- Flask (open-source code provided)

- Slack (open-source code provided)

One key thing to note is that in most of the user interfaces, there’s an opportunity for something _akin_ to RLHF. If the user says that a generated query was correct for a question, then it’s stored back in the vector database for future reference, making the “model” more accurate over time.

You can plug it into any LLM or vector database. In the next couple of days we’ll be adding built-in connectors for Mistral, Gemini, and Anthropic.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: