Skip to content

16 natural language to sql#40

Open
Franci-343 wants to merge 12 commits into
devfrom
16-natural-language-to-sql
Open

16 natural language to sql#40
Franci-343 wants to merge 12 commits into
devfrom
16-natural-language-to-sql

Conversation

@Franci-343

@Franci-343 Franci-343 commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Oxtools Submission

Project name: [natural language to sql]
Contributor: [@Franci-343]


What does this tool do?

natural language to sql is a multi-agent tool that translates natural language queries into dialect-correct SQL, validates the generated code, and executes it inside isolated sandbox databases.

The tool leverages the Oxlo.ai API (api.oxlo.ai/v1/chat/completions) to orchestrate multiple specialized LLM agents: deepseek-v3.2 for intent classification (extracting table targets, filters, joins, and complexity from natural language), qwen-3-coder-30b for standard SQL generation and refinement, and deepseek-r1-0528 for complex analytical queries that require deeper reasoning.


Submission checklist

Structure

  • My project is in its own directory under projects/[my-project-name]/
  • I have not placed any files directly in the repository root

Required files

  • Dockerfile is present and docker build . succeeds
  • docker-compose.yml is present and docker compose up starts the app
  • oxlo-manifest.json is present and all fields are filled in
  • .env.example lists every environment variable the project needs (with empty values)
  • README.md is present with setup instructions a reviewer can follow exactly

Security

  • No API keys, private keys, or secrets are hardcoded anywhere in the codebase
  • My actual .env file is not included in this PR
  • I have verified my diff with git grep -i "api_key" and found no leaks

Oxlo API

  • The tool makes at least one functional call to the Oxlo API
  • The API key is read from the OXLO_API_KEY environment variable

For maintainers

  • Security scan passed — no secrets in diff
  • docker build . succeeded locally
  • docker compose up ran successfully and app is reachable
  • Oxlo API integration verified
  • Approved for merge

…ith schema parsing, intent classification, and validation pipeline
…hema preview components

- Added `SchemaUploader` component for loading database schemas from files or pasted DDL.
- Introduced `SchemaPreview` component to display loaded schema details.
- Created `QueryBuilder` component for generating SQL from natural language and testing queries in a sandbox.
- Implemented a lightweight DDL parser in `parser.ts` to extract table and column definitions.
- Updated `page.tsx` to integrate new components and manage execution states.
- Defined local types for schema and execution states in `types.ts`.
…ic_data

- Updated the _mock_value function in sandbox_manager.py to return a boolean value for boolean types instead of an integer.
- Updated the _mock_value function in synthetic_data.py to return a boolean value for boolean types instead of an integer.
- Removed the sql_sandbox.py file as it is no longer needed.
@Franci-343 Franci-343 linked an issue Jun 8, 2026 that may be closed by this pull request
@vercel

vercel Bot commented Jun 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
oxtools Ready Ready Preview, Comment Jun 9, 2026 3:18am

Request Review

- Reorganized imports for better readability in parser.ts and result-parser.ts.
- Refactored parseDDL function to utilize matchAll for table regex matching, enhancing performance and clarity.
- Simplified comment stripping in parseDDL by chaining replace calls.
- Updated execution state management in SqlConverterPage to improve clarity and maintainability.
- Enhanced type definitions in types.ts for better code consistency.
- Improved formatting and indentation across multiple files for better readability.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Natural Language to SQL

1 participant