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.
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.
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
- Create a
.env
file with your OpenAI API key:
OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- Run the main program:
python USPL.py
- Check the outputs:
- SQL query generated by GPT
- Executed query results
- Natural language response
Install dependencies with:
pip install openai python-dotenv
openai
: GPT API integrationpython-dotenv
: Load environment variablessqlite3
: Built-in Python standard module
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
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.
This project is licensed under the MIT License.
Please retain the original author attribution: TSAI PEI LIN.
- English Technical Proof (USPL_Design_Technical_Proof_v1.1.txt)
- 中文技術證明文件(USPL_Design_Technical_Proof_v1.1_TW.txt)
💡 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).