(retrieved_evidence: Dict[str, Any])
| 3300 | |
| 3301 | def _build_field_evidence_map(retrieved_evidence: Dict[str, Any]) -> Dict[str, List[str]]: |
| 3302 | matches = (retrieved_evidence or {}).get("matches") or {} |
| 3303 | |
| 3304 | def anchor_list(*buckets: str, limit: int = 2) -> List[str]: |
| 3305 | anchors: List[str] = [] |
| 3306 | for bucket in buckets: |
| 3307 | for match in matches.get(bucket) or []: |
| 3308 | anchors.append(_format_evidence_anchor(match)) |
| 3309 | return _unique_preserve_order(anchors)[:limit] |
| 3310 | |
| 3311 | return { |
| 3312 | "one_sentence_summary": anchor_list("method", "results", limit=2), |
| 3313 | "research_background": anchor_list("background", limit=2), |
| 3314 | "core_method": anchor_list("method", limit=2), |
| 3315 | "key_results": anchor_list("results", limit=2), |
| 3316 | "main_contributions": anchor_list("method", "results", limit=3), |
| 3317 | "limitations": anchor_list("limitations", limit=2), |
| 3318 | "relevance_points": anchor_list("relevance", limit=2), |
| 3319 | "reading_focus": anchor_list("relevance", "method", "results", limit=3), |
| 3320 | } |
| 3321 | |
| 3322 | |
| 3323 | def _build_report_evidence_anchors(retrieved_evidence: Dict[str, Any]) -> Dict[str, List[str]]: |
| 3324 | matches = (retrieved_evidence or {}).get("matches") or {} |
no test coverage detected