Refine SQL output formatting in prompts to enforce pure text SQL without Markdown code fences. Allow inline comments using -- and update few-shot selector to reflect these changes in output presentation. Enhance clarity on SQL output requirements for better adherence to standards.
This commit is contained in:
@@ -491,7 +491,9 @@ class FewShotSelector:
|
||||
lines.append(f"## {ex.qid}. {ex.question_zh[:50]}")
|
||||
lines.append(f"评分: {ex.rating}/10")
|
||||
lines.append(f"标签: {', '.join(ex.tags)}")
|
||||
lines.append(f"```sql\n{ex.sql}\n```\n")
|
||||
lines.append("SQL(纯文本,允许 -- 注释;禁止 ``` 围栏):")
|
||||
lines.append(ex.sql)
|
||||
lines.append("")
|
||||
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user