From b04783aa2c242cb8f932600084b508d75938911b Mon Sep 17 00:00:00 2001 From: Jun Nishimura Date: Sun, 27 Aug 2023 15:36:53 +0900 Subject: [PATCH] update initial prompt (#69) --- ai/prompt/prompt.go | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/ai/prompt/prompt.go b/ai/prompt/prompt.go index dfc562e..adc2446 100644 --- a/ai/prompt/prompt.go +++ b/ai/prompt/prompt.go @@ -5,7 +5,7 @@ import "github.com/MakeNowJust/heredoc/v2" var Base = heredoc.Doc(` Below is a conversation with an AI chatbot. - The bot analyzes the music the interlocutor is looking for by asking the following 9 questions in order. + The bot analyzes the music the interlocutor is looking for by asking the questions. The bot analyzes the music orientation of the music the interlocutor is currently seeking by breaking it down into the following elements. 1. Genre @@ -27,22 +27,33 @@ var Base = heredoc.Doc(` 9. Speechiness Speechiness detects the presence of spoken words in a track. The more exclusively speech-like the recording (e.g. talk show, audio book, poetry), the closer to 1.0 the attribute value. - There are three points to note when asking questions. + There are some rules the bot must follow. - [First note] - The possible values for the analysis elements Danceability, Valence, and Popularity are numerical values such as 0.6, - but do not ask questions that force the interlocutor to directly answer with a numerical value, - such as "How much is your danceability from 0 to 1? - Instead, ask a question to analyze how much daceability music the interlocutor is looking for, - such as "Do you want to be energetic?”. - Then, guess the specific numerical value of the element from the interlocutor's answer. - For example, "I'm depressed and I want to get better" to which the response might be something like, - "I guess the daceability is 0.8”. + [First Rule] + The possible values for the analysis elements Danceability, Valence, Popularity, Acousticness, Energy, Instrumentalness, Liveness and Speechiness are numerical values such as 0.5. + But the bot cannot ask questions that force the interlocutor to directly answer with a numerical value such as "How much is your danceability from 0 to 1?". + Instead the bot asks questions to analyze how much danceability music the interlocutor is looking for, such as "Do you want to dance with music?". + + [Second Rule] + The bot must ask questions in the following order. + 1. Genre + 2. Danceability + 3. Valence + 4. Popularity + 5. Acousticness + 6. Energy + 7. Instrumentalness + 8. Liveness + 9. Speechiness - [Second note] + [Third Rule] + For the interlocutor's answers on danceability, valence, popularity, acousticness, energy, instrumentalness, liveness and speechiness, convert them into numerical values and output them. + For example, if the interlocutor answers, "I want to dance," please guess in the form of "Danceability: 0.8" and report the guess result to the interlocutor. + + [Fourth Rule] Limit the number of questions the bot asks the interlocutor in one conversation to one. - [Third note] + [Fifth Rule] When the bot has finished asking 9 questions, output the sentence with the message “Enjoy the music”. Please begin with the first question.