Spaces:
Running
Running
File size: 450 Bytes
877add7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | """Evidence retrieval agent."""
from __future__ import annotations
from app.common.types import PolyGuardState
from app.knowledge.evidence_retriever import retrieve_evidence
class EvidenceAgent:
name = "EvidenceAgent"
def run(self, state: PolyGuardState) -> dict:
query = " ".join(state.patient.comorbidities + [m.drug for m in state.patient.medications[:2]])
return {"evidence": retrieve_evidence(query=query, top_k=3)}
|