home/coding/user-sql-refine-template

User Sql Refine Template

GPTClaudeDeepSeek··1,137 copies·updated 2026-07-14
user-sql-refine-template.prompt
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