Spaces:
Sleeping
Sleeping
Claude commited on
Commit ·
7831904
1
Parent(s): b2dcb24
fix: Add critic evaluation to synthesis engine call
Browse files
app.py
CHANGED
|
@@ -235,10 +235,14 @@ def generate_synthesis(perspectives_responses: Dict[str, str], query: str, reque
|
|
| 235 |
# Use the trained synthesis engine from the forge
|
| 236 |
if HAS_FORGE:
|
| 237 |
try:
|
| 238 |
-
#
|
|
|
|
|
|
|
|
|
|
| 239 |
synthesis_result = forge.synthesis.synthesize(
|
| 240 |
concept=query,
|
| 241 |
-
analyses=perspectives_responses
|
|
|
|
| 242 |
)
|
| 243 |
if synthesis_result and isinstance(synthesis_result, str):
|
| 244 |
return synthesis_result.strip()
|
|
|
|
| 235 |
# Use the trained synthesis engine from the forge
|
| 236 |
if HAS_FORGE:
|
| 237 |
try:
|
| 238 |
+
# Generate critique from the critic agent
|
| 239 |
+
critique = forge.critic.evaluate_ensemble(query, perspectives_responses)
|
| 240 |
+
|
| 241 |
+
# Get synthesized response from the synthesis engine
|
| 242 |
synthesis_result = forge.synthesis.synthesize(
|
| 243 |
concept=query,
|
| 244 |
+
analyses=perspectives_responses,
|
| 245 |
+
critique=critique
|
| 246 |
)
|
| 247 |
if synthesis_result and isinstance(synthesis_result, str):
|
| 248 |
return synthesis_result.strip()
|