How debabratapruseth/ai-agent-with-llm-and-sql works
This notebook demonstrates a single user-to-result workflow: a natural-language question is translated by GPT-4 into SQL, checked for read-only safety, executed against SQLite, and formatted for display. The README describes these stages as one function; the graph separates them to show the documented workflow, not separate modules. Source excerpts were unavailable, so relationships reflect README documentation only.
Main entry points: AI Agent_LLM with SQL.ipynb Assistant function
Components 7
SQL assistant
- Assistant function
AI Agent_LLM with SQL.ipynb - SQL validation
AI Agent_LLM with SQL.ipynb - Query execution
AI Agent_LLM with SQL.ipynb - Result formatting
AI Agent_LLM with SQL.ipynb
External services
- GPT-4 API
- SQLite database
Other components
- User
Connections 9
- User → Assistant function: asks
- Assistant function → GPT-4 API: sends schema and question
- GPT-4 API → Assistant function: returns SQL
- Assistant function → SQL validation: checks SQL
- SQL validation → Query execution: allows safe query
- Query execution → SQLite database: runs query
- SQLite database → Query execution: returns rows
- Query execution → Result formatting: passes results
- Result formatting → User: displays results