WordsApp / prompts.py
dht-tb16p
Commit 1st version
e60c070
raw
history blame
3.32 kB
"""define some usefull prompts"""
trans_prompt = """
Please translate the word into chinese: {} """
query_prompt = """
Please translate the word into chinese \
and give english example sentence and sentence meaning in Chinese:
{} """
learn_prompt = """
Please give an english sentence contains these words: {} \
and give sentence meaning in Chinese.
"""
wash_prompt = """
Please help me to remove the duplicate words and meaningless words from
the words list: {} and return the result.
For example:
User: apple, red, green, yellow, red, blll><, :*&
Your return: apple, red, green, yellow
"""
#*******************************************************
#************** user prompts ***************************
#*******************************************************
user_message_mapper = """
Please classify the following categories and return the name of the category. If your think user's requirement does not belong to the following categories, return the number 0.
Here are four examples:
User: I want to know the meaning of the word "apple"
"""
#*******************************************************
#************** system prompts *************************
#*******************************************************
# Using few shots learning to map the user's requirement to a command
system_message_mapper = """
You will receive the user's requirement. \
Please classify the user's requirement into the following categories \
and return the name of the category.
If your think user's requirement does not belong to the \
following categories, return the number 0.
Here are four examples:
User: I want to know the meaning of the word "apple"
Your return: :query apple
User: I want to add the word "apple" to my dictionary
Your return: :add apple
User: I want to remove the word "apple" from my dictionary
Your return: :remove apple
User: I want to learn the word "apple" based words in my dictionary now
Your return: :learn
User: I already learnt the meaning of the word "apple"
Your return: :remove apple
User: I want to know the rest words in my dictionary
Your return: :show
Here are the meaning of four categories for you to reference:
:query word means user want to study the meaning of word
:add word means user want to add word into his dictionary
:remove word means user want to remove word from his dictionary
:learn word means user want to learn words in his dictionary related to the word
:show means user want to show all words in his dictionary
"""
# using few shots learning to select the important words in a sentence
system_message_select = """
You will receive the english sentence from user, please select the words in the sentence that you think
is important for the user to understand the meaning of the sentence.
If the sentence does not contain any english words, please just return number 0.
For example:
User: The apple is red, and it's green.
Your return: apple, red
"""