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

Function build_query_profile

experiments/baselines/scinup_strict/runner.py:194–213  ·  view source on GitHub ↗

Build a fixed text query without PaperFlow lexicon expansion.

(user_meta: Dict[str, Any], role: Dict[str, Any])

Source from the content-addressed store, hash-verified

192
193
194def build_query_profile(user_meta: Dict[str, Any], role: Dict[str, Any]) -> Dict[str, Any]:
195 """Build a fixed text query without PaperFlow lexicon expansion."""
196 description = str(user_meta.get("description") or role.get("description") or "").strip()
197 bootstrap_summary = str(role.get("bootstrap_summary") or "").strip()
198 directions = dedupe_strings(
199 seed_direction_phrases(user_meta.get("seed_directions"))
200 + seed_direction_phrases(role.get("seed_directions"))
201 + seed_direction_phrases(role.get("core_directions"))
202 )
203 parts = [
204 description,
205 bootstrap_summary if bootstrap_summary != description else "",
206 " ".join(directions),
207 ]
208 query_text = " ".join(part for part in parts if part).strip()
209 return {
210 "query_text": query_text,
211 "directions": directions,
212 "description": description,
213 }
214
215
216def build_profile_map(

Callers 1

build_profile_mapFunction · 0.85

Calls 3

seed_direction_phrasesFunction · 0.85
getMethod · 0.80
dedupe_stringsFunction · 0.70

Tested by

no test coverage detected