Package genlayer.std.eq_principles#
Warning
This is an internal module
- genlayer.std.eq_principles.eq_principle_prompt_comparative(fn: Callable[[], Any], principle: str) str [source]#
Comparative equivalence principle that utilizes NLP for verifying that results are equivalent
- Parameters:
- Return type:
Note
As leader results are encoded as calldata,
format()
is used for string representation. However, operating on strings by yourself is more safe in generalNote
supports
.lazy()
version, which will returnLazy
- genlayer.std.eq_principles.eq_principle_prompt_non_comparative(fn: Callable[[], str], *, task: str, criteria: str) str [source]#
Non-comparative equivalence principle that must cover most common use cases
Both leader and validator finish their execution via NLP, that is used to perform
task
oninput
. Leader just executes this task, but the validator checks if task was performed with integrity. This principle is useful when task is subjectiveNote
supports
.lazy()
version, which will returnLazy
- Return type: