diff --git a/src/interface.jl b/src/interface.jl
index 98ec668..4acc918 100755
--- a/src/interface.jl
+++ b/src/interface.jl
@@ -214,12 +214,24 @@ function planner_mistral_openorca(a::agentReflex)
Plan: first you should always think about your conversation with the user and your earlier work thoroughly then extract and devise a complete, task by task, plan to achieve your objective (pay attention to correct numeral calculation and commonsense).
P.S.1 each task of the plan should be a single action.
+
+ 1. Ask the user about the occasion for which they are choosing a wine
+ 2. Ask the user about the type of food that will be served with the wine
+ 3. Ask about preferred type of wine (Rose, White, Red, Rose or Sparkling) - If the user don't know, suggest a type of wine based on the user's earlier answers
+ 4. Ask the user about their preferred sweetness level (dry to very sweet)
+ 5. Ask the user about their preferred intensity level (light to full bodied)
+ 6. Ask the user about their preferred tannin level (low to high)
+ 7. Ask the user about their preferred acidity level (low to high)
+ 8. Ask the user about their wine price range
+ 9. Use winestock tool to find wines that match the user's preferences and are within their price range
+ 10. Use finalanswer tool to present the recommended wines to the user.
+
$conversation
<|assistant|>
Plan:
"""
-
+# WORKING provide ecmaple that show good planning
plan = sendReceivePrompt(a, assistant_plan_prompt, max_tokens=1024, temperature=0.1,
timeout=180, stopword=["<|user|>", ""])
plan = split(plan, "<|")[1]
@@ -372,7 +384,7 @@ function selfAwareness(a::agentReflex)
Use the following format strictly:
What do I know: based on observed results, repeat all the information you got.
- Info match: explicitly state what information matches what variable in my plan.
+ Info match: explicitly state what information matches which variable anme in my plan.
What am I missing: based on observed results, describe in detail what you are still missing based on the plan.
P.S. do not mention any toolnames
@@ -452,7 +464,7 @@ function actor_mistral_openorca(a::agentReflex, selfaware=nothing)
# aware = "Self-awareness: Based on action's input and observed results, check your progress against the plan. Then, repeat all the details of what you have been gathered. Finally, describe in detail what you are missing."
thought =
"Self-awareness: $selfaware
- Thought: based on self-awareness, think about what to do next but focus on what you missed first. (P.S. 1) let's think a single step. 2) pay attention to correct numeral calculation and commonsense.)
+ Thought: based on self-awareness, think about what to do next by prioritize what you missed first. (P.S. 1) let's think a single step. 2) pay attention to correct numeral calculation and commonsense.)
"
end
@@ -582,7 +594,7 @@ function actor_mistral_openorca(a::agentReflex, selfaware=nothing)
end
- #check whether the act has valid json
+ # check whether the act has valid json
check_7 = true
if occursin('{', response)
try
@@ -602,7 +614,7 @@ function actor_mistral_openorca(a::agentReflex, selfaware=nothing)
#TODO paraphrase selfaware
break
end
- @show response
+ @show retrying_actor = response
end
toolname = toolNameBeingCalled(chunkedtext["Act $latestTask:"], a.tools)
diff --git a/src/llmfunction.jl b/src/llmfunction.jl
index 946e975..da7a78c 100644
--- a/src/llmfunction.jl
+++ b/src/llmfunction.jl
@@ -124,6 +124,13 @@ function winestock(a::agentReflex, actorResult::NamedTuple)
Your are a helpful assistant.
+ 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
@@ -167,8 +173,8 @@ function winestock(a::agentReflex, actorResult::NamedTuple)
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;
<|query|>