From 1e7d23f82d0a622d2b83040a417e5e97c1a18226 Mon Sep 17 00:00:00 2001 From: marcus-ny Date: Thu, 26 Sep 2024 04:46:00 +0800 Subject: [PATCH] fix: update model configs --- backend/src/lm/generate_events.py | 2 +- backend/src/lm/prompts.py | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/backend/src/lm/generate_events.py b/backend/src/lm/generate_events.py index 3e6509b5..dd4c3377 100644 --- a/backend/src/lm/generate_events.py +++ b/backend/src/lm/generate_events.py @@ -16,7 +16,7 @@ os.environ["LANGCHAIN_TRACING_V2"] = LANGCHAIN_TRACING_V2 os.environ["OPENAI_API_KEY"] = OPENAI_API_KEY -lm_model = ChatOpenAI(model="gpt-4o-mini", temperature=0) +lm_model = ChatOpenAI(model="gpt-4o-mini", temperature=0.3) class CategoryAnalysis(BaseModel): diff --git a/backend/src/lm/prompts.py b/backend/src/lm/prompts.py index de17b2a6..1c935c93 100644 --- a/backend/src/lm/prompts.py +++ b/backend/src/lm/prompts.py @@ -11,7 +11,7 @@ For each event, you should give an analysis of how the event can be used in the context of its respective category i.e. the categories that you have chosen for this event. The analysis should be specific to the category of the event and should be tailored to the context of General Paper essays. Provide coherent arguments and insights. Be sure to give a detailed analysis of 3-4 sentences. - In your analysis, you should not mention "General Paper" or "A Levels". + Important Note: In your analysis, you should not mention "General Paper" or "A Levels". For the analysis, remember that this is in the context of General Paper which emphasises critical thinking and the ability to construct coherent arguments. If needed, you can think about the questions you have generated and how the event can be used to write about points for/against the argument in the question. @@ -58,12 +58,19 @@ { "for_points": [ - "The point that supports the argument + The explanation for the point", + "The point that supports the argument and the explanation for the point", ], "against_points": [ - "The point that refutes the argument + The explanation for the point", + "The point that refutes the argument and the explanation for the point", ] } The question: """ + +QUESTION_ANALYSIS_GEN_SYSPROMPT = """ + You are a Singaporean student studying for your GCE A Levels General Paper. + You will be given a General Paper essay question that is argumentative or discursive in nature. + You will also be given 2 points for the statement and 2 points against the statement. + You will also be given analysis of events +"""