Update src/agents/reflection_agent.py
Browse files
src/agents/reflection_agent.py
CHANGED
|
@@ -159,3 +159,24 @@ class ReflectionAgent(BaseAgent):
|
|
| 159 |
|
| 160 |
score = positive_count / total
|
| 161 |
return score
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 159 |
|
| 160 |
score = positive_count / total
|
| 161 |
return score
|
| 162 |
+
|
| 163 |
+
def review_hypothesis(self, hypothesis: str, research_goal: str) -> str:
|
| 164 |
+
"""Review a single hypothesis in the context of the research goal and return feedback as a string."""
|
| 165 |
+
prompt = f"""
|
| 166 |
+
RESEARCH GOAL: {research_goal}
|
| 167 |
+
|
| 168 |
+
HYPOTHESIS TO REVIEW:
|
| 169 |
+
{hypothesis}
|
| 170 |
+
|
| 171 |
+
Please conduct a thorough peer review of this hypothesis. Assess:
|
| 172 |
+
1. Scientific validity and plausibility
|
| 173 |
+
2. Strengths of the hypothesis
|
| 174 |
+
3. Weaknesses, inconsistencies, or logical flaws
|
| 175 |
+
4. Potential contradictions with established knowledge
|
| 176 |
+
5. Ethical considerations or concerning implications
|
| 177 |
+
6. Practical limitations for testing or implementation
|
| 178 |
+
7. Suggested modifications to strengthen the hypothesis
|
| 179 |
+
|
| 180 |
+
Structure your review clearly with sections for each aspect of the assessment.
|
| 181 |
+
"""
|
| 182 |
+
return self.get_response(prompt)
|