compass.validation.location.DTreeJurisdictionValidator#

class DTreeJurisdictionValidator(jurisdiction, **kwargs)[source]#

Bases: BaseLLMCaller

Jurisdiction Validation using a decision tree

Parameters:
  • structured_llm_caller (StructuredLLMCaller) – Instance used for structured validation queries.

  • **kwargs – Additional keyword arguments to pass to the BaseLLMCaller instance.

Methods

check(content)

Check if the content passes the validation

Attributes

META_SCORE_KEY

Key in doc.attrs where score is stored

SYSTEM_MESSAGE

System message for jurisdiction validation LLM calls

META_SCORE_KEY = 'Jurisdiction Validation Score'#

Key in doc.attrs where score is stored

SYSTEM_MESSAGE = 'You are a legal expert assisting a user with determining the scope of applicability for their legal ordinance documents.'#

System message for jurisdiction validation LLM calls

async check(content)[source]#

Check if the content passes the validation

Parameters:

content (str) – Document content to validate.

Returns:

boolTrue if the content passes the validation check, False otherwise.