Mindinventory/MindSQL
A Python RAG library enabling natural language queries against SQL databases via LLMs and vector stores.

MindSQL streamlines database interactions by converting natural language questions into SQL queries using retrieval-augmented generation. It indexes DDL statements and example question-SQL pairs into a vector store for context-aware retrieval, then leverages LLMs like GPT-4, Llama 2, and Google Gemini to generate accurate SQL based on the retrieved schema context. Supports PostgreSQL, MySQL, SQLite, Snowflake, BigQuery, and integrates with ChromaDB or Faiss for vector storage.