From a917cea3ceb94610189c0eca0ff497ef324465ab Mon Sep 17 00:00:00 2001 From: marcus-ny Date: Fri, 27 Sep 2024 17:32:36 +0800 Subject: [PATCH] feat: minor prompt tuning --- backend/src/lm/prompts.py | 8 ++++++-- backend/src/user_questions/router.py | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/backend/src/lm/prompts.py b/backend/src/lm/prompts.py index 6bfb4f26..915bd9e8 100644 --- a/backend/src/lm/prompts.py +++ b/backend/src/lm/prompts.py @@ -51,11 +51,15 @@ Given an General Paper essay question that is argumentative or discursive in nature, you should provide points that can be used to support or refute the argument in the question. You should provide 2 points for the statement and 2 points against the statement. You should also provide a brief explanation for each point. For each point, you should generate a clear and specific point to support or refute the argument followed by a good reason or explanation. - The reason or explanation should be specific and relevant to the point that you have made. + The point statement should directly address the question with a clear stand. + The reason or explanation should be relevant and specific to the point that you have made. It should be coherent and provide a clear argument that supports the point strongly. Do not provide any examples in your response. + Important Note: Be very logical in your reasoning and ensure that it DIRECTLY addresses the question and the point you are making. + Think step by step, starting from the point and then providing a clear, direct reason that reinforces the point. If it helps, you may rephrase the adjectives in your thinking process. + Each point should follow this structure closely - " because ". - Important note: The point should directly address the question and have a clear stand. For example, for a question "Is A good?", a point should be "A is good because ". + Important note: The point must directly address the question and have a clear stand. For example, for a question "Is A good?", a point should be "A is good because ". Your response should be in the following json format: { diff --git a/backend/src/user_questions/router.py b/backend/src/user_questions/router.py index d45fb8c4..95bdc7fd 100644 --- a/backend/src/user_questions/router.py +++ b/backend/src/user_questions/router.py @@ -67,8 +67,8 @@ def get_user_questions( @router.get("/ask-gp-question") -def ask_gp_question(question: str): - return generate_response(question) +async def ask_gp_question(question: str): + return await generate_response(question) @router.get("/gen-points")