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

Function _format_evidence_anchor

agents/reading-agent/main.py:3294–3299  ·  view source on GitHub ↗
(match: Dict[str, Any])

Source from the content-addressed store, hash-verified

3292
3293def _format_evidence_anchor(match: Dict[str, Any]) -> str:
3294 section = _format_pdf_section_label(match.get("section", ""))
3295 text = _truncate_text(_clean_pdf_evidence_text(match.get("text")), 180)
3296 score = match.get("score")
3297 score_text = f" | score={float(score):.3f}" if isinstance(score, (int, float)) else ""
3298 return f"{section}{score_text} | {text}"
3299
3300
3301def _build_field_evidence_map(retrieved_evidence: Dict[str, Any]) -> Dict[str, List[str]]:
3302 matches = (retrieved_evidence or {}).get("matches") or {}

Callers 2

anchor_listFunction · 0.85

Calls 4

_truncate_textFunction · 0.85
_clean_pdf_evidence_textFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected