nemoguardrails.library.self_check.facts.actions

View as Markdown

Module Contents

Functions

NameDescription
_fact_check_outcome-
self_check_factsChecks the facts for the bot response by appropriately prompting the base llm.

Data

FACT_CHECK_THRESHOLD

log

API

nemoguardrails.library.self_check.facts.actions._fact_check_outcome(
accuracy: float
) -> nemoguardrails.actions.rail_outcome.RailOutcome
nemoguardrails.library.self_check.facts.actions.self_check_facts(
llm_task_manager: nemoguardrails.llm.taskmanager.LLMTaskManager,
context: typing.Optional[dict] = None,
llm: typing.Optional[nemoguardrails.types.LLMModel] = None,
config: typing.Optional[nemoguardrails.RailsConfig] = None,
relevant_chunks: typing.Optional[list] = None,
bot_message: typing.Optional[str] = None,
kwargs = {}
) -> nemoguardrails.actions.rail_outcome.RailOutcome
async

Checks the facts for the bot response by appropriately prompting the base llm.

nemoguardrails.library.self_check.facts.actions.FACT_CHECK_THRESHOLD = 0.5
nemoguardrails.library.self_check.facts.actions.log = logging.getLogger(__name__)