LLMGuardrail

org.llm4s.agent.guardrails.LLMGuardrail
See theLLMGuardrail companion trait
object LLMGuardrail

Attributes

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

Members list

Value members

Concrete methods

def apply(client: LLMClient, prompt: String, passThreshold: Double, guardrailName: String, guardrailDescription: Option[String]): LLMGuardrail

Create a custom LLM guardrail with the specified parameters.

Create a custom LLM guardrail with the specified parameters.

Value parameters

client

The LLM client to use for evaluation

guardrailDescription

Optional description

guardrailName

Name for logging and error messages

passThreshold

Minimum score to pass (default: 0.7)

prompt

The evaluation prompt describing criteria

Attributes