You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Missing method implementations in RefinementAgent #1
Hi! Thank you for developing and maintaining CellForge - it's a really impressive project. I found 3 undefined methods being called in the RefinementAgent class:
_format_dataset_refinement_prompt() - called at line 385 in _refine_dataset_analysis()
_format_problem_refinement_prompt() - called at line 400 in _refine_problem_investigation()
_format_baseline_refinement_prompt() - called at line 416 in _refine_baseline_assessment()
The refinement loop in refine_analysis() will fail with AttributeError when calling these methods.
Are these methods missing from the repository, or should they be implemented following the pattern of other _format_*_prompt() methods in the class? Could you please provide these implementations or guidance on how they should be structured?
Thank you for your time and for sharing this valuable work with the community!
You can add blocks of code like these inside RefinementAgent class of cellforge/Task_Analysis/refinement_agent.py and temporarily fix the AttributeError.
def _format_dataset_refinement_prompt(self, dataset_info: dict, context: dict) -> str:
"""
Format a prompt for refining dataset descriptions.
"""
return (
"You are an expert bioinformatics assistant. Refine the following dataset "
"description so that it is concise, standardized, and ready for analysis. "
"Preserve important details such as organism, tissue, assay, technology, "
"and sample size.\n\n"
f"DATASET INFO:\n{dataset_info}\n\n"
f"CONTEXT:\n{context}\n\n"
"REFINED DESCRIPTION:"
)
def _format_problem_refinement_prompt(self, problem_statement: str, context: dict) -> str:
"""
Format a prompt for refining problem statements.
"""
return (
"You are an expert research planner. Refine the following research problem "
"statement to be clear, precise, and suitable for inclusion in a research "
"plan. Keep the scientific intent intact.\n\n"
f"PROBLEM STATEMENT:\n{problem_statement}\n\n"
f"CONTEXT:\n{context}\n\n"
"REFINED PROBLEM:"
)
def _format_baseline_refinement_prompt(self, baseline_info: str, context: dict) -> str:
"""
Format a prompt for refining baseline assessments.
"""
return (
"You are an expert reviewer. Refine the following baseline assessment so that "
"it is clear, concise, and captures the key findings. Ensure terminology is "
"consistent with standard biomedical reporting.\n\n"
f"BASELINE INFO:\n{baseline_info}\n\n"
f"CONTEXT:\n{context}\n\n"
"REFINED BASELINE ASSESSMENT:"
)
You can add a blocks of code like this inside RefinementAgent class of cellforge/Task_Analysis/refinement_agent.py and temporarily fix the AttributeError.
def _format_dataset_refinement_prompt(self, dataset_info: dict, context: dict) -> str:
"""
Format a prompt for refining dataset descriptions.
"""
return (
"You are an expert bioinformatics assistant. Refine the following dataset "
"description so that it is concise, standardized, and ready for analysis. "
"Preserve important details such as organism, tissue, assay, technology, "
"and sample size.\n\n"
f"DATASET INFO:\n{dataset_info}\n\n"
f"CONTEXT:\n{context}\n\n"
"REFINED DESCRIPTION:"
)
def _format_problem_refinement_prompt(self, problem_statement: str, context: dict) -> str:
"""
Format a prompt for refining problem statements.
"""
return (
"You are an expert research planner. Refine the following research problem "
"statement to be clear, precise, and suitable for inclusion in a research "
"plan. Keep the scientific intent intact.\n\n"
f"PROBLEM STATEMENT:\n{problem_statement}\n\n"
f"CONTEXT:\n{context}\n\n"
"REFINED PROBLEM:"
)
def _format_baseline_refinement_prompt(self, baseline_info: str, context: dict) -> str:
"""
Format a prompt for refining baseline assessments.
"""
return (
"You are an expert reviewer. Refine the following baseline assessment so that "
"it is clear, concise, and captures the key findings. Ensure terminology is "
"consistent with standard biomedical reporting.\n\n"
f"BASELINE INFO:\n{baseline_info}\n\n"
f"CONTEXT:\n{context}\n\n"
"REFINED BASELINE ASSESSMENT:"
)
Activity
Carringbrinks commentedon Aug 28, 2025
@ASIWU Hi, how did you solve this problem? I also encountered the same problem as you.
mhSepehri commentedon Sep 2, 2025
Hi, I encountered the same problem during Task Analysis. Did you find any manual fix to this problem?
ASIWU commentedon Sep 4, 2025
@Carringbrinks @mhSepehri Sorry, I haven't found a solution yet.
Amazingren commentedon Sep 5, 2025
Dear all @Carringbrinks @ASIWU @mhSepehri @Jiahao-Gao @tangxiangru ,
I also encountered the same problem during reproduction. Are there any solutions you guys have already found or suggested?
Best regards and many thx,
mhSepehri commentedon Sep 5, 2025
@Amazingren @ASIWU @Carringbrinks
You can add blocks of code like these inside
RefinementAgent classofcellforge/Task_Analysis/refinement_agent.pyand temporarily fix theAttributeError.Amazingren commentedon Sep 5, 2025
Great! Thx for sharing this experience!
Bests,