Skip to content

ZeppelinTsai/USPL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

USPL: Unified Schema Prompt Layer

License: MIT Made with Python OpenAI API Status: Original Work

💡 Why USPL Matters

Most language models today generate SQL by guessing — not by understanding. This leads to hallucinations, broken joins, and misaligned logic. USPL exists to change that.

USPL (Unified Schema Prompt Layer) helps LLMs understand where the data actually lives and how different tables relate to each other. Rather than treating knowledge as a flat string of text, USPL acts like a librarian: it tells the model where to look, what belongs together, and why.

  • "GPT doesn’t need to be louder. It needs to be accurate. USPL teaches it to check the shelves before speaking."

It’s a subtle but essential shift: from generating answers based on probability... to answering based on structured reality.

🔐 Originality Statement

This project includes original concepts and technical design documentation.
See: docs/USPL_Design_Technical_Proof_v1.1.txt

The document provides a complete overview of the background, rationale, and application value of USPL. It serves as the official technical proof for intellectual property claims, research submission, and public showcases.


📘 Project Overview

USPL is a Python-based prototype system for querying structured data using natural language.
Its core functionality includes:

  • Generate SQL queries from user prompts and database schemas using GPT-3.5-turbo
  • Execute SQL and retrieve query results
  • Feed results back to GPT for natural language summarization
  • End-to-end simulation of realistic database fields and relationship logic

🚀 Getting Started

  1. Create a .env file with your OpenAI API key:
OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  1. Run the main program:
python USPL.py
  1. Check the outputs:
  • SQL query generated by GPT
  • Executed query results
  • Natural language response

📦 Requirements

Install dependencies with:

pip install openai python-dotenv
  • openai: GPT API integration
  • python-dotenv: Load environment variables
  • sqlite3: Built-in Python standard module

📂 Project Structure

USPL/
├── USPL.py                                  # Main script
├── .env                                     # API key config (ignored by .gitignore)
├── .gitignore                               # Ignore sensitive files
├── README.md                                # English documentation
├── README-TW.md                             # Traditional Chinese documentation
└── docs/
    ├── USPL_Design_Technical_Proof_v1.1.txt     # English proof
    └── USPL_Design_Technical_Proof_v1.1_TW.txt  # Chinese proof

🧠 Author

TSAI PEI LIN
April 1, 2025
Email: b131ab131a@gmail.com

AI has helped me make sense of complex problems over the years, from prototyping ideas to navigating real-life challenges like my father's brain cancer.
That's why I built USPL: not just to make GPT stronger, but to make its reasoning clearer, more grounded, and more useful to people who depend on reliable systems.

Currently seeking remote, async-first work opportunities with teams who want to use AI not only to scale answers — but to deepen understanding.


📄 License

This project is licensed under the MIT License.
Please retain the original author attribution: TSAI PEI LIN.


📚 Supporting Documents


💡 Pro Tip: Add a Social Preview Image to your GitHub repo by uploading a banner in Settings → General → Social Preview. Recommended size: 1280 x 640 px (PNG or JPG).

About

Unified Schema Prompt Layer - Natural Language to SQL with GPT

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages