Skip to main content

validate_review_json

Function validate_review_json 

Source
pub fn validate_review_json(
    text: &str,
    evidence: &[GroundingEvidence],
) -> Result<(Vec<GroundedClaim>, Vec<GroundedRecommendation>, usize)>
Expand description

Parse model JSON and discard every claim, recommendation, or hop that does not cite the supplied evidence set. This is public for contract tests and for non-HTTP actors that share the same grounding gateway.