update
This commit is contained in:
@@ -93,7 +93,7 @@ julia> output_thoughtDict = Dict(
|
|||||||
- [] implement RAG to pull similar experience
|
- [] implement RAG to pull similar experience
|
||||||
- [] use customerinfo
|
- [] use customerinfo
|
||||||
- [] user storeinfo
|
- [] user storeinfo
|
||||||
- [x] add try block. check result that it is expected before returning
|
- BUG LLM recommend wine before check inventory
|
||||||
|
|
||||||
# Signature
|
# Signature
|
||||||
"""
|
"""
|
||||||
@@ -219,6 +219,10 @@ function decisionMaker(a::T)::Dict{Symbol, Any} where {T<:agent}
|
|||||||
Context: ...
|
Context: ...
|
||||||
Your earlier conversation with the user: ...
|
Your earlier conversation with the user: ...
|
||||||
|
|
||||||
|
You MUST follow the following guidelines:
|
||||||
|
- Check your inventory before recommending any wine to the user
|
||||||
|
- Only recommending wine from your inventory.
|
||||||
|
|
||||||
You should follow the following guidelines as you see fit:
|
You should follow the following guidelines as you see fit:
|
||||||
- If the user interrupts, prioritize the user.
|
- If the user interrupts, prioritize the user.
|
||||||
- Get to know how much the user willing to spend
|
- Get to know how much the user willing to spend
|
||||||
@@ -226,13 +230,8 @@ function decisionMaker(a::T)::Dict{Symbol, Any} where {T<:agent}
|
|||||||
- Get to know what occasion the user is buying wine for
|
- Get to know what occasion the user is buying wine for
|
||||||
- Get to know what characteristics of wine the user is looking for e.g. tannin, sweetness, intensity, acidity
|
- Get to know what characteristics of wine the user is looking for e.g. tannin, sweetness, intensity, acidity
|
||||||
- Get to know what food will be served with wine
|
- Get to know what food will be served with wine
|
||||||
- With enough user information, search your inventory
|
- Based on the user's information, check your inventory and recommend a suitable wine from your stock.
|
||||||
- Recommend the wines to the user
|
- After recommending wine to the user, ask the customer if there is anything else you can help with. If the customer doesn't need anything else, finish the conversation.
|
||||||
- After recommending wine to the user, ask the customer if there is anything else you can help with. If the customer doesn’t need anything else, finish the conversation.
|
|
||||||
|
|
||||||
You MUST follow the following guidelines:
|
|
||||||
- Do not mentioning any wine until you've check your inventory
|
|
||||||
- Do not ask what the user already told you
|
|
||||||
|
|
||||||
You should then respond to the user with interleaving Thought, Plan, Action and Observation:
|
You should then respond to the user with interleaving Thought, Plan, Action and Observation:
|
||||||
- thought:
|
- thought:
|
||||||
@@ -256,7 +255,7 @@ function decisionMaker(a::T)::Dict{Symbol, Any} where {T<:agent}
|
|||||||
Let's begin!
|
Let's begin!
|
||||||
"""
|
"""
|
||||||
|
|
||||||
context = length(a.memory[:shortmem]) > 0 ? vectorOfDictToText(memory[:shortmem], withkey=false) : "None"
|
context = length(a.memory[:shortmem]) > 0 ? vectorOfDictToText(a.memory[:shortmem], withkey=false) : "None"
|
||||||
|
|
||||||
usermsg =
|
usermsg =
|
||||||
"""
|
"""
|
||||||
@@ -995,8 +994,6 @@ function conversation(a::T, userinput::Dict) where {T<:agent}
|
|||||||
|
|
||||||
return chatresponse
|
return chatresponse
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@@ -1206,8 +1203,7 @@ function generatechat(memory::Dict, chathistory::Vector, text2textInstructLLM::F
|
|||||||
Your current thoughts in your mind: ...
|
Your current thoughts in your mind: ...
|
||||||
|
|
||||||
You must follow the following guidelines:
|
You must follow the following guidelines:
|
||||||
- Do not mentioning any wine until you've check your inventory.
|
- Check your inventory before mentioning any wine or region to the user
|
||||||
- Check your inventory before recommending any specific wine.
|
|
||||||
- Your thoughts matter.
|
- Your thoughts matter.
|
||||||
- Do not offer the user to try wine as you are internet-based agent.
|
- Do not offer the user to try wine as you are internet-based agent.
|
||||||
|
|
||||||
@@ -1220,11 +1216,11 @@ function generatechat(memory::Dict, chathistory::Vector, text2textInstructLLM::F
|
|||||||
Let's begin!
|
Let's begin!
|
||||||
"""
|
"""
|
||||||
|
|
||||||
context = length(memory[:shortmem]) > 0 ? vectorOfDictToText(memory[:shortmem], withkey=false) : "None"
|
context_1 = length(memory[:shortmem]) > 0 ? vectorOfDictToText(memory[:shortmem], withkey=false) : "None"
|
||||||
|
|
||||||
usermsg =
|
usermsg =
|
||||||
"""
|
"""
|
||||||
Context: $context
|
Context: $context_1
|
||||||
Your earlier conversation with the user: $(vectorOfDictToText(chathistory))
|
Your earlier conversation with the user: $(vectorOfDictToText(chathistory))
|
||||||
Your thoughts: $(memory[:chatbox])
|
Your thoughts: $(memory[:chatbox])
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -477,7 +477,7 @@ function extractWineAttributes_2(a::T1, input::T2
|
|||||||
3) Do not generate other comments.
|
3) Do not generate other comments.
|
||||||
|
|
||||||
You should then respond to the user with the following points:
|
You should then respond to the user with the following points:
|
||||||
- repeat: repeat the user query exactly
|
- repeat: State the user query
|
||||||
- sweetness: S where S are integers represent the range of sweetness levels
|
- sweetness: S where S are integers represent the range of sweetness levels
|
||||||
Example: 1-2
|
Example: 1-2
|
||||||
- acidity: D where D are integers represent the range of acidity level
|
- acidity: D where D are integers represent the range of acidity level
|
||||||
|
|||||||
@@ -89,8 +89,8 @@ main()
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
I'm having a graduation party this evening. I have no budget limit. I want a bottle of dry white wine.
|
I'm having a graduation party this evening. I have no budget limit. I want a bottle of dry white wine.
|
||||||
I have no idea. The party will be casual. I like medium bodied wine from France.
|
I have no idea but I like medium bodied wine from France. The party will be casual.
|
||||||
What about sparkling Rose?
|
The latter one seems nice.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user