| expect_no_hallucination | R Documentation |
Test that an LLM response does not contain hallucinated information when compared against ground truth.
expect_no_hallucination(
response,
ground_truth,
model = NULL,
tolerance = 0.1,
info = NULL
)
response |
The LLM response to check. |
ground_truth |
The factual information to check against. |
model |
Model to use for checking. |
tolerance |
Allowed deviation (0 = strict, 1 = lenient). |
info |
Additional information for failure message. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.