User Sql Refine Template
Intent {user_query} Original SQL candidates {original_sql_json} Search report {search_report_json} Instruction: Based on the evidence in the search report, determine whether any of the candidates must be adjusted to better fit the intent and schema. If adjustments are needed, return the corrected SQL and explain why. If no changes are needed, return the best candidate and explain why. Return STRICT JSON only, in the exact format described.
fill the variables
This prompt has 3 variables. Pro fills them into a ready-to-paste prompt for you — no manual find-and-replace.
{user_query}{original_sql_json}{search_report_json}
Unlock with Pro →when to use it
Community prompt sourced from the open-source GitHub repo YiboLi1986/LLM2SQLSTRUCTUREDSEARCH (no explicit license). A "User Sql Refine Template" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
codingcommunitydeveloper
source
YiboLi1986/LLM2SQLSTRUCTUREDSEARCH · no explicit license
more in Coding
Coding✓ tested
Senior code review (strict mode)
senior staff engineer running a merciless but fair review
Coding✓ tested
Debug by hypothesis, not by guessing
debugging partner who forms theories before touching code
Coding✓ tested
Generate tests from described behavior
test engineer who writes tests that would actually catch regressions