This commit is contained in:
2024-01-20 13:14:21 +00:00
parent 330f4da216
commit 6cdb1e5fc7
2 changed files with 26 additions and 8 deletions

View File

@@ -124,6 +124,13 @@ function winestock(a::agentReflex, actorResult::NamedTuple)
Your are a helpful assistant.
</About yourself>
<You have the following conversion table>
Database table name by wine type:
Red = table for wine type "red"
White = table for wine type "white"
Sparkling = table for wine type "sparkling"
Rose = table for wine type "rose"
Dessert = table for wine type "dessert"
Fortified = table for wine type "fortified"
Intensity level:
intensity = 1, light bodied
intensity = 2, light-medium bodied
@@ -154,7 +161,6 @@ function winestock(a::agentReflex, actorResult::NamedTuple)
List of keywords not allowed in SQL: ["BETWEEN", "--", "WHEN", "IN"]
Use the following format:
Think: How do I map the info in the query to conversion table
Info map: based on conversion table, map the info in query to appropriate variables
SQL: write a specific SQL command
</Your job>
@@ -167,8 +173,8 @@ function winestock(a::agentReflex, actorResult::NamedTuple)
<Example 2>
query: {\"wine characteristics\":\"low-bodied | a little sweet | low-medium tannin\",\"price\":\"22 USD\",\"occasion\":\"anniversary\",\"wine type\":\"Rose\",\"food\":\"American dishes\"}
Think: 1) medium sweet is not explicitly stated, but assuming it falls within the range of dry and off-dry.
Info map: {\"wine type\": \"Rose\", \"intensity\": 1, \"sweetness\": 3, \"tannin\": 2, \"acidity\": 3, \"price\": 22}
SQL: SELECT * FROM Rose WHERE intensity = 1 AND tannin = 2 AND (sweetness = 1 OR sweetness = 2) AND price <= 22;
Info map: {\"wine type\": \"Rose\", \"intensity\": 1, \"sweetness\": 3, \"tannin\": 2, \"acidity\": 3, \"price\": 22, \"food\":\"American dishes\"}
SQL: SELECT * FROM Rose WHERE intensity = 1 AND tannin = 2 AND (sweetness = 1 OR sweetness = 2) AND price <= 22 AND food = American;
</Example 2>
</s>
<|query|>