Captain Jack Sparrow: Assistente SQL com IA
Sahil-Shimpi/sql_assistant
Converta perguntas em SQL com um pirata de IA
Ver no GitHubInterface Streamlit que converte linguagem natural em SQL usando Claude 3.5 Sonnet e LangChain. O assistente entende o schema do banco de dados e gera queries precisas sem alucinações, apresentando resultados formatados em tabelas ou listas.
Instalação
npx convez-ai Sahil-Shimpi/sql_assistant1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Consultar bases de dados sem conhecer SQL
- Exploração rápida de dados com linguagem natural
- Automatizar geração de queries complexas
- Prototipação ágil de dashboards de dados
Veredito

Solução bem estruturada que aproveita Claude para traduzir queries em linguagem natural. Idealmente usada por times de dados que precisam agilizar exploração ad-hoc, mas exige cuidado com hallucinations em schemas complexos.
README
A tradução para o português deste README ainda está na fila.
Captain Jack Sparrow: Database Treasure Hunter 🏴☠️⚓
📚 Table of Contents
- Features
- Project Treasure Map
- Setting Sail (Setup Instructions)
- How Captain Jack Navigates
- Known Treacheries (Current Limitations)
- Upcoming Upgrades for the Black Pearl
- Credits
- License
- Contributing
Captain Jack Sparrow ain't no ordinary database mate.
He’s a Streamlit-powered navigator, built with Claude 3.5 Sonnet and LangChain, ready to turn yer plain English into real SQL magic.
Speak like a sailor or a scholar — Captain fetches yer answers from the deepest database dungeons.
No dashboards.
No crashes.
Just straight treasure retrieval. 📜
🏴☠️ Features
- Natural Language to SQL: Just whisper, “Show cargos in 2024,” and the Captain takes the helm.
- Schema-Aware Navigation: No hallucinations — only real ports and planks. Schema context stays in Claude’s compass.
- Error Handling, Pirate-Style: If ye strike trouble, Jack flags it clean — no cryptic scrolls.
- Formatted Treasures: Results show up as golden tables or polished lists.
- Interactive UI via Streamlit: Smooth as sailing on calm waters.
⚓ Project Treasure Map
/
|-- sql_agent.py # Captain's main compass (Streamlit app)
|-- .env # Claude’s API key goes here (don't lose this scroll!)
|-- requirements.txt # What ye need to sail (dependencies)
|-- README.md # Ye be readin’ it now, mate
🧭 Setting Sail (Setup Instructions)
- Clone the Ship (Repo)
git clone https://github.com/Sahil-Shimpi/sql_assistant.git
- Hide Yer Secret Map
# Inside .env file
ANTHROPIC_API_KEY=your_claude_api_key_here
- Stock the Ship
pip install -r requirements.txt
- Hoist the Colors (Launch the App)
streamlit run sql_agent.py
- Open the Captain’s Deck
Visit: http://localhost:8501
🗺️ How Captain Jack Navigates
- Loads the database’s schema scrolls into memory.
- Sends yer question plus schema context to Claude 3.5 Sonnet.
- Claude conjures the right SQL inside triple backticks (savvy?).
- The code be run safely, with treasure (results) fetched and polished.
- Output is tabled or listed — no confusion, no shipwrecks.
☠️ Known Treacheries (Current Limitations)
| Stormy Waters | Status | Captain’s Notes |
|---|---|---|
| Column Guessing | ⚠️ Partial | Watch yer typos, sailor |
| Case Sensitivity | ⚠️ Partial | Be precise, lest ye be sunk |
| Schema Validation | ❌ Not yet | Trust in Claude, aye |
| Persistent Memory | ❌ None | Jack forgets each voyage |
⚒️ Upcoming Upgrades for the Black Pearl
- SQL Dry Run (pre-execution check)
- Memory of Past Voyages (chat + schema memory)
- Join Optimization (mapping joins smarter)
- Result Formatting Upgrades (charts, summaries, and more)
✨ Credits
- Ship built and captained by Sahil Shimpi ⚓
- Foundational code and debugging support graciously provided by Omniwot 🌟
- Powered by the magic of Claude 3.5 Sonnet (Anthropic), LangChain, and Streamlit
- Inspired by the dream: making databases as easy to explore as a pirate's map.
📜 License
Licensed under the MIT License —
Fork it, build on it, contribute back — always credit those who helped chart the course. ⚓
🏴☠️ Contributing
Got an idea to sharpen Captain Jack’s instincts?
Spot a reef he didn’t see?
Raise yer flag, fork the repo, and open a pull request!
“The sea may be uncertain... but with the right query, the treasure always reveals itself.”
– Captain Jack Sparrow
Ready to embark on your own database voyage?
Let’s sail. 🧭🏴☠️