diff --git a/spring-ai-core/src/main/java/org/springframework/ai/evaluation/FactCheckingEvaluator.java b/spring-ai-core/src/main/java/org/springframework/ai/evaluation/FactCheckingEvaluator.java index c0d3676d7..3dc03c769 100644 --- a/spring-ai-core/src/main/java/org/springframework/ai/evaluation/FactCheckingEvaluator.java +++ b/spring-ai-core/src/main/java/org/springframework/ai/evaluation/FactCheckingEvaluator.java @@ -23,19 +23,19 @@ import org.springframework.ai.chat.client.ChatClient; /** * Implementation of {@link Evaluator} used to evaluate the factual accuracy of Large * Language Model (LLM) responses against provided context. - *
+ ** This evaluator addresses a specific type of potential error in LLM outputs known as * "hallucination" in the context of grounded factuality. It verifies whether a given * statement (the "claim") is logically supported by a provided context (the "document"). - *
+ ** Key concepts: - Document: The context or grounding information against which the claim * is checked. - Claim: The statement to be verified against the document. - *
+ ** The evaluator uses a prompt-based approach with a separate, typically smaller and more * efficient LLM to perform the fact-checking. This design choice allows for * cost-effective and rapid verification, which is crucial when evaluating longer LLM * outputs that may require multiple verification steps. - *
+ ** Implementation note: For efficient and accurate fact-checking, consider using * specialized models like Bespoke-Minicheck, a grounded factuality checking model * developed by Bespoke Labs and available in Ollama. Such models are specifically @@ -45,12 +45,12 @@ import org.springframework.ai.chat.client.ChatClient; * Hallucinations with Bespoke-Minicheck and the research paper: * MiniCheck: An Efficient Method for LLM * Hallucination Detection - *
+ ** Note: This evaluator is specifically designed to fact-check statements against given * information. It's not meant for other types of accuracy tests, like quizzing an AI on * obscure facts without giving it any reference material to work with (so-called 'closed * book' scenarios). - *
+ *
* The evaluation process aims to determine if the claim is supported by the document,
* returning a boolean result indicating whether the fact-check passed or failed.
*
diff --git a/spring-ai-core/src/main/java/org/springframework/ai/model/function/FunctionCallingOptions.java b/spring-ai-core/src/main/java/org/springframework/ai/model/function/FunctionCallingOptions.java
index f977a4ecf..91530dac3 100644
--- a/spring-ai-core/src/main/java/org/springframework/ai/model/function/FunctionCallingOptions.java
+++ b/spring-ai-core/src/main/java/org/springframework/ai/model/function/FunctionCallingOptions.java
@@ -53,7 +53,7 @@ public interface FunctionCallingOptions extends ChatOptions {
void setFunctionCallbacks(List
* Based on OpenTelemetry's Semantic Conventions for AI systems.
*
* @author Thomas Vitale