Local SQL Agent with LLM Feedback

A robust AI agent designed to bridge the gap between non-technical users and relational databases. The system translates plain English questions into complex SQL queries using local LLMs (Llama 3). It features a unique 'self-healing' loop: if a generated query fails, the agent captures the database error, analyzes it, and iteratively refines the SQL code until a successful execution is achieved.

Key Features

Tech Stack

PythonLangChainOllama (Llama 3)SQLite3SQLPrompt Engineering

Screenshots

Screenshot 0