fabricatio_judge.capabilities.advanced_judge
The Capabilities module for advanced judging.
Classes
A class that judges the evidence and makes a final decision. |
|
A class that uses a language model to vote on the evidence. |
|
A class that votes on the evidence and makes a final decision. |
Module Contents
- class fabricatio_judge.capabilities.advanced_judge.EvidentlyJudge(/, **data: Any)
Bases:
fabricatio_core.capabilities.propose.Propose,abc.ABCA class that judges the evidence and makes a final decision.
- async evidently_judge(prompt: str, **kwargs: Unpack[fabricatio_core.models.kwargs_types.ValidateKwargs[fabricatio_judge.models.judgement.JudgeMent]]) fabricatio_judge.models.judgement.JudgeMent | None
- async evidently_judge(prompt: List[str], **kwargs: Unpack[fabricatio_core.models.kwargs_types.ValidateKwargs[fabricatio_judge.models.judgement.JudgeMent]]) List[fabricatio_judge.models.judgement.JudgeMent] | List[fabricatio_judge.models.judgement.JudgeMent | None] | None
Judge the evidence and make a final decision.
- class fabricatio_judge.capabilities.advanced_judge.VoteLLMConfig(/, **data: Any)
Bases:
fabricatio_core.models.generic.ScopedConfigA class that uses a language model to vote on the evidence.
- vote_llm: Dict[float, fabricatio_core.models.kwargs_types.ValidateKwargs[fabricatio_judge.models.judgement.JudgeMent]]
Config that specify the models used to make a decision.
- class fabricatio_judge.capabilities.advanced_judge.VoteJudge(/, **data: Any)
Bases:
EvidentlyJudge,VoteLLMConfig,abc.ABCA class that votes on the evidence and makes a final decision.
- async vote_judge(prompt: str, vote_pass_threshold: float | None = None, **kwargs: Unpack[fabricatio_core.models.kwargs_types.ValidateKwargs[fabricatio_judge.models.judgement.JudgeMent]]) bool | None
- async vote_judge(prompt: List[str], vote_pass_threshold: float | None = None, **kwargs: Unpack[fabricatio_core.models.kwargs_types.ValidateKwargs[fabricatio_judge.models.judgement.JudgeMent]]) List[bool | None] | None
Vote on the evidence and make a final decision.
- Parameters:
prompt (str | List[str]) – The input prompt(s) to be judged.
vote_pass_threshold (Optional[float], optional) – The threshold for passing the vote. Defaults to None.
**kwargs (Unpack[ValidateKwargs[JudgeMent]]) – Additional keyword arguments for configuring the judgment process.
- Returns:
- A list of boolean results indicating
whether each vote passed, or None if no prompt is provided.
- Return type:
- static resolve_pass(weights: List[float], judgments: List[fabricatio_judge.models.judgement.JudgeMent], vote_pass_threshold: float) bool
Determine if the vote passes based on the provided weights and judgments.
- Parameters:
- Returns:
- True if the weighted sum of judgments meets or exceeds the threshold,
False otherwise.
- Return type: