Fix: personas use tier-based model resolution instead of hardcoded defaults"
Browse files
alpha_factory/personas/hypothesis_hunter.py
CHANGED
|
@@ -39,16 +39,10 @@ async def generate_hypothesis(
|
|
| 39 |
theme: str,
|
| 40 |
retrieved_papers: list[str],
|
| 41 |
existing_anomaly_tags: list[str],
|
| 42 |
-
model: str | None = None,
|
| 43 |
) -> Blueprint:
|
| 44 |
"""
|
| 45 |
Generate a novel alpha hypothesis blueprint.
|
| 46 |
-
|
| 47 |
-
Args:
|
| 48 |
-
llm: LLM client for guided generation
|
| 49 |
-
theme: The theme to explore (from gap analysis)
|
| 50 |
-
retrieved_papers: 3 arXiv abstracts from RAG retrieval
|
| 51 |
-
existing_anomaly_tags: tags already in the library (avoid saturation)
|
| 52 |
"""
|
| 53 |
fields = THEME_FIELDS.get(theme, [])
|
| 54 |
archetypes_str = ", ".join(PROVEN_ARCHETYPES)
|
|
@@ -84,7 +78,7 @@ Ensure each component has a clear sign_direction with academic justification."""
|
|
| 84 |
blueprint = await llm.generate_json(
|
| 85 |
prompt=user_prompt,
|
| 86 |
schema=Blueprint,
|
| 87 |
-
|
| 88 |
temperature=0.7,
|
| 89 |
system_prompt=system,
|
| 90 |
)
|
|
|
|
| 39 |
theme: str,
|
| 40 |
retrieved_papers: list[str],
|
| 41 |
existing_anomaly_tags: list[str],
|
|
|
|
| 42 |
) -> Blueprint:
|
| 43 |
"""
|
| 44 |
Generate a novel alpha hypothesis blueprint.
|
| 45 |
+
Uses tier="microfish" — ModelManager resolves to the user's selected model.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
"""
|
| 47 |
fields = THEME_FIELDS.get(theme, [])
|
| 48 |
archetypes_str = ", ".join(PROVEN_ARCHETYPES)
|
|
|
|
| 78 |
blueprint = await llm.generate_json(
|
| 79 |
prompt=user_prompt,
|
| 80 |
schema=Blueprint,
|
| 81 |
+
tier="microfish",
|
| 82 |
temperature=0.7,
|
| 83 |
system_prompt=system,
|
| 84 |
)
|