[improvement](chat) support filterCondition in InMemoryS2EmbeddingStore (#523)

This commit is contained in:
lexluo09
2023-12-16 20:04:01 +08:00
committed by GitHub
parent 95334441b1
commit 59c21ea19a
2 changed files with 42 additions and 6 deletions

View File

@@ -56,8 +56,8 @@ public class SqlPromptGenerator {
public String generateSqlPrompt(LLMReq llmReq, String schemaLinkStr, List<Map<String, String>> fewshotExampleList) {
String instruction = "# Use the the schema links to generate the SQL queries for each of the questions.";
List<String> exampleKeys = Arrays.asList("questionAugmented", "dbSchema", "generatedSchemaLinkings", "sql");
String exampleTemplate = "dbSchema\nQ: questionAugmented\n"
+ "Schema_links: generatedSchemaLinkings\nSQL: {sql}";
String exampleTemplate = "dbSchema\nQ: questionAugmented\n" + "Schema_links: generatedSchemaLinkings\n"
+ "SQL: {sql}";
String schemaLinkingPrompt = InputFormat.format(exampleTemplate, exampleKeys, fewshotExampleList);
Pair<String, String> questionPrompt = transformQuestionPrompt(llmReq);