validate_rag_json: Validate a RAG JSON structure

View source: R/rag_json.R

validate_rag_jsonR Documentation

Validate a RAG JSON structure

Description

Ensures the object has the expected fields and types: 'labels', 'confidences', 'intensity', and 'evidence_chunks'.

Usage

validate_rag_json(x, error = TRUE)

Arguments

x

A list (parsed JSON) to validate.

error

Logical; if TRUE, throws an error on invalid input.

Value

Invisibly returns TRUE when valid; otherwise FALSE or error.


transforEmotion documentation built on Jan. 8, 2026, 5:06 p.m.