MBilal-72 commited on
Commit
5ecf52b
·
verified ·
1 Parent(s): 65780f0

update system prompt human

Browse files
Files changed (1) hide show
  1. utils/scorer.py +5 -3
utils/scorer.py CHANGED
@@ -5,7 +5,7 @@ Analyzes content for Generative Engine Optimization (GEO) performance
5
 
6
  import json
7
  from typing import Dict, Any, List
8
- from langchain.prompts import ChatPromptTemplate
9
 
10
 
11
  class GEOScorer:
@@ -129,9 +129,11 @@ Provide analysis in JSON:
129
 
130
  # Build prompt and run analysis
131
  prompt_template = ChatPromptTemplate.from_messages([
132
- ("system", system_prompt),
133
- ("user", user_message)
134
  ])
 
 
135
  chain = prompt_template | self.llm
136
  result = chain.invoke({}) # No variables needed
137
 
 
5
 
6
  import json
7
  from typing import Dict, Any, List
8
+ from langchain.prompts import ChatPromptTemplate, SystemMessagePromptTemplate, HumanMessagePromptTemplate
9
 
10
 
11
  class GEOScorer:
 
129
 
130
  # Build prompt and run analysis
131
  prompt_template = ChatPromptTemplate.from_messages([
132
+ SystemMessagePromptTemplate.from_template(system_prompt),
133
+ HumanMessagePromptTemplate.from_template(user_message)
134
  ])
135
+ # ("user", user_message)
136
+ # ("system", system_prompt),
137
  chain = prompt_template | self.llm
138
  result = chain.invoke({}) # No variables needed
139