Hard coding numeric constants inline in source code is an anti pattern, and is called "magic numbers". We would want to refactor those out at least into a contants.py or similar files so the developer can adjust them in a central location, or sometimes even better if it's in an environment variables .env.
hackathon_agent.py 1036
for i, source in enumerate(ttd_dr_result.sources[:10], 1):
evaluator_agent.py, coverage_evaluator.py, hallucination_evaluator.py
two [:200]
synthesis_evaluator.py, one [:200]
context_pruner.py
topic=topic[:500],
denoiser.py
source_list = ", ".join([s.get("title", "Unknown") for s in sources[:3]])
old_preview = old_draft[:2000] if len(old_draft) > 2000 else old_draft
new_preview = new_draft[:2000] if len(new_draft) > 2000 else new_draft
evaluator.py
research_brief=research_brief[:2000],
draft=draft[:8000],
evolver.py
top_variants = sorted_variants[:min(3, len(sorted_variants))]
Hard coding numeric constants inline in source code is an anti pattern, and is called "magic numbers". We would want to refactor those out at least into a
contants.pyor similar files so the developer can adjust them in a central location, or sometimes even better if it's in an environment variables.env.A few examples: