GroundingGuardrail

org.llm4s.agent.guardrails.rag.GroundingGuardrail
See theGroundingGuardrail companion class

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

Create a grounding guardrail with default settings.

Create a grounding guardrail with default settings.

Attributes

def apply(llmClient: LLMClient, threshold: Double): GroundingGuardrail

Create a grounding guardrail with custom threshold.

Create a grounding guardrail with custom threshold.

Value parameters

llmClient

The LLM client for evaluation

threshold

Minimum score to pass (0.0 to 1.0)

Attributes

def apply(llmClient: LLMClient, threshold: Double, onFail: GuardrailAction): GroundingGuardrail

Create a grounding guardrail with custom settings.

Create a grounding guardrail with custom settings.

Attributes

Preset: Balanced mode - good default for most applications.

Preset: Balanced mode - good default for most applications.

Allows some unverifiable claims if overall grounding is strong.

Attributes

Preset: Lenient mode - only fails on clearly ungrounded responses.

Preset: Lenient mode - only fails on clearly ungrounded responses.

Use when some creative interpretation is acceptable.

Attributes

Preset: Monitoring mode - warns but doesn't block.

Preset: Monitoring mode - warns but doesn't block.

Use for measuring grounding quality without affecting user experience.

Attributes

Preset: Strict mode - any ungrounded claim fails.

Preset: Strict mode - any ungrounded claim fails.

Use for high-stakes applications where accuracy is critical.

Attributes