MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / generate_interest_vector

Function generate_interest_vector

agents/coldstart-agent/main.py:1623–1644  ·  view source on GitHub ↗

Generate a deterministic pseudo-vector from the detected directions.

(core_directions: Dict[str, float])

Source from the content-addressed store, hash-verified

1621 data_driven_count = sum(1 for keyword in METHODOLOGY_KEYWORDS["data_driven"] if keyword in text_lower)
1622 theory_count = sum(1 for keyword in METHODOLOGY_KEYWORDS["theory"] if keyword in text_lower)
1623 systematic_count = sum(1 for keyword in METHODOLOGY_KEYWORDS["systematic"] if keyword in text_lower)
1624 incremental_count = sum(1 for keyword in METHODOLOGY_KEYWORDS["incremental"] if keyword in text_lower)
1625 open_source_count = sum(1 for keyword in METHODOLOGY_KEYWORDS["open_source"] if keyword in text_lower)
1626 bio_count = sum(1 for keyword in ("bio", "science", "scientific", "molecular", "protein") if keyword in text_lower)
1627
1628 preferences: Dict[str, Any] = {}
1629 if data_driven_count > theory_count and data_driven_count > 0:
1630 preferences["preference_data_driven_over_theory"] = True
1631 elif theory_count > data_driven_count and theory_count > 0:
1632 preferences["preference_data_driven_over_theory"] = False
1633
1634 if systematic_count > incremental_count and systematic_count > 0:
1635 preferences["preference_systematic_work_over_incremental"] = True
1636 elif incremental_count > systematic_count and incremental_count > 0:
1637 preferences["preference_systematic_work_over_incremental"] = False
1638
1639 if open_source_count > 0:
1640 preferences["preference_open_source_code"] = True
1641 if bio_count > 0:
1642 preferences["preference_bio_science_application"] = True
1643
1644 return preferences
1645
1646
1647def _build_taste_profile_from_methodology(methodology_preferences: Dict[str, Any]) -> Dict[str, List[str]]:

Callers 6

ensure_profile_shapeFunction · 0.85
_trim_bootstrap_profileFunction · 0.85
parse_natural_languageFunction · 0.85
cold_startFunction · 0.85

Calls 2

getMethod · 0.80
encodeMethod · 0.80

Tested by

no test coverage detected