MVP Chatbot for SQL Query Conversion

Job ID: 38910753

Budget: $250 – $750 USD

Project Title:
MVP/prototype of a Chatbot to query SQL db

Project Overview:
We need a very basic MVP chatbot that takes user input in plain English, converts it into a SQL query, executes that query on a given database, and returns the results in a simple, readable table format. The primary goal is to prove the concept with a simple functioning prototype, not to build a fully polished production application.

Key Requirements:

Plain English to SQL Conversion:

The chatbot should accept natural language queries like:
"Show me my orders"
"How many orders did I place last month?"

It should then generate the appropriate SQL statement. For example:
Input: "Show me my orders"
Output SQL: SELECT * FROM orders WHERE user_id = <session_user_id>;

Database Interaction:
Connect to a provided SQL database (e.g., MySQL or PostgreSQL).
Execute the generated SQL query.
Return the result set to the user.
Session/User Context: The system will have access to a user_id associated with the chat session.
The generated SQL should use this user_id as a filter (e.g., WHERE user_id = <session_user_id>).
Result Presentation:

Display the query results in a basic, readable table format.
For the MVP, a simple HTML table or structured text output is sufficient.

Stack & Tools (Open to Suggestions):

Backend: Python preferred, Node.js as a second options, (but open to other suggestions).
Natural Language Processing: OpenAI API

Database: can be done in sqlite, postgres, mysql, or Azure SQL (schema details can be shared upon project start)

Hosting: Local development environment is fine for MVP. No need for cloud deployment yet.
MVP Scope--
Only handle a small set of known query patterns (e.g., fetching orders, counting orders, filtering by date).
No advanced NLP or complex grammar handling required at this stage—just a working prototype that can handle a few example commands with OpenAI

Deliverables:
A working codebase that:
Accepts user input in plain English.
Generates and executes an SQL query based on the user input.
Returns and displays the query result in a table format.
Short documentation with setup instructions and examples of supported queries.
Success Criteria:

The chatbot can take a few example inputs (like "Show me my orders") and return correct query results from the database.
The code is sufficiently clear and documented so we can iterate on it after delivery.
Timeline & Budget:

Quick turnaround (1-2 weeks) for the MVP.
Low-cost proof of concept with minimal bells and whistles.
Related categories: Python SQL OpenAI