From 836d5907cc814ebedb3367cde6e64388c26ba2e7 Mon Sep 17 00:00:00 2001 From: uommou Date: Fri, 12 Apr 2024 20:43:28 +0900 Subject: [PATCH] =?UTF-8?q?[fix]=20recommendation=20=ED=94=84=EB=A1=AC?= =?UTF-8?q?=ED=94=84=ED=8A=B8=20=EB=B0=8F=20temperature=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 20자 이하로 제한 2. 문장 부호 제한 3. 모델 변경 및 창의성 증가 --- app/prompt/openai_config.ini | 4 ++-- app/prompt/openai_prompt.py | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/prompt/openai_config.ini b/app/prompt/openai_config.ini index 3627abb..315e039 100644 --- a/app/prompt/openai_config.ini +++ b/app/prompt/openai_config.ini @@ -9,9 +9,9 @@ MAX_TOKENS = 2048 MODEL_NAME = gpt-4 [NESS_RECOMMENDATION] -TEMPERATURE = 0 +TEMPERATURE = 1 MAX_TOKENS = 2048 -MODEL_NAME = gpt-3.5-turbo-1106 +MODEL_NAME = gpt-4 [NESS_TAGS] TEMPERATURE = 0 diff --git a/app/prompt/openai_prompt.py b/app/prompt/openai_prompt.py index e17f97d..0adddbe 100644 --- a/app/prompt/openai_prompt.py +++ b/app/prompt/openai_prompt.py @@ -2,12 +2,14 @@ class Template: recommendation_template = """ You are an AI assistant designed to recommend daily activities based on a user's schedule. You will receive a day's worth of the user's schedule information. Your task is to understand that schedule and, based on it, recommend an activity for the user to perform that day. There are a few rules you must follow in your recommendations: 1. YOU MUST USE {output_language} TO RESPOND TO THE USER INPUT. - 2. Ensure your recommendation is encouraging, so the user doesn't feel compelled. + 2. Ensure your recommendation is encouraging and delicate, so the user doesn't feel compelled. 3. The recommendation must be concise, limited to one sentence without any additional commentary. + 4. The recommendation must not exceed 20 characters in the {output_language}. + 5. The final punctuation of the recommendation must be exclusively an exclamation point or a question mark. Example: User schedule: [Practice guitar, Calculate accuracy, Study backend development, Run AI models in the lab, Study NEST.JS] - AI Recommendation: "Your day is filled with learning and research. how about taking a short walk in between studies?" + AI Recommendation: "공부 사이에 짧게 산책 어때요?" User schedule: {schedule} AI Recommendation: