refs #739: guide no-target few-shot SQL generation

This commit is contained in:
devmrko
2026-07-28 12:49:46 +09:00
parent 5409a29297
commit 987ea44f32
3 changed files with 17 additions and 4 deletions

View File

@@ -447,7 +447,12 @@ public class SelectAiService {
if ("NO_TARGET".equals(example.referenceKind())
|| "OBJECT_UNAVAILABLE".equals(example.referenceKind())) {
String boundary = truncate(example.answer(), MAX_FEW_SHOT_SQL_CHARS);
return boundary.isBlank() ? "" : prefix + "Boundary outcome:\n" + boundary + "\n\n";
String answerSql = truncate(example.answerSql(), MAX_FEW_SHOT_SQL_CHARS);
if (boundary.isBlank() || answerSql.isBlank()) {
return "";
}
return prefix + "Boundary rule:\n" + boundary
+ "\nVerified boundary SQL template:\n" + answerSql + "\n\n";
}
String answerSql = truncate(example.answerSql(), MAX_FEW_SHOT_SQL_CHARS);
return answerSql.isBlank() ? "" : prefix + "Verified SQL template:\n" + answerSql + "\n\n";