(improvement)(launcher) Optimize Demo to distinguish domain and model sets (#1056)

Co-authored-by: jolunoluo
This commit is contained in:
LXW
2024-05-30 19:39:23 +08:00
committed by GitHub
parent aedabd24f7
commit b4bc92e586
16 changed files with 118 additions and 173 deletions

View File

@@ -48,12 +48,8 @@ public class OnePassSCSqlGenStrategy extends SqlGenStrategy {
}
);
//3.format response.
List<String> schemaLinkingResults = llmResults.stream()
.map(llmResult -> OutputFormat.getSchemaLinks(llmResult)).collect(Collectors.toList());
List<String> candidateSortedList = OutputFormat.formatList(schemaLinkingResults);
Pair<String, Map<String, Double>> linkingMap = OutputFormat.selfConsistencyVote(candidateSortedList);
List<String> sqlList = llmResults.stream()
.map(llmResult -> OutputFormat.getSql(llmResult)).collect(Collectors.toList());
.map(OutputFormat::getSql).collect(Collectors.toList());
Pair<String, Map<String, Double>> sqlMapPair = OutputFormat.selfConsistencyVote(sqlList);

View File

@@ -45,7 +45,6 @@ public class TwoPassSCSqlGenStrategy extends SqlGenStrategy {
}
);
List<String> sortedList = OutputFormat.formatList(linkingResults);
Pair<String, Map<String, Double>> linkingMap = OutputFormat.selfConsistencyVote(sortedList);
//3.generator sql prompt,and parallel generate response.
List<String> sqlPromptPool = promptGenerator.generateSqlPromptPool(llmReq, sortedList, exampleListPool);
List<String> sqlTaskPool = new CopyOnWriteArrayList<>();