NeMo-Guardrails icon indicating copy to clipboard operation
NeMo-Guardrails copied to clipboard

self_check_facts is not executed

Open AnnPe opened this issue 11 months ago • 1 comments

im trying to use self_check_facts out of the box here is the relevant part of my yml: rails: output: flows: - self check facts

here is colang file: define bot inform fact checking fails "fact checking fails."

define flow self check facts $accuracy = execute self_check_facts if $accuracy < 0.5 bot inform fact checking fails stop

but it seems that the self_check_facts is never executed (I saw it with the debugger)

What im doing wrong? thank you very much in advance!

AnnPe avatar Mar 29 '24 13:03 AnnPe

Hi @AnnPe!

Make sure you set the $check_facts to True before a bot utterance that needs fact-checking:

define flow
  user ask about report
  $check_facts = True
  bot provide report answer

Also, you should not need to redefine the self check facts flow. Just adding the name of the flow in the config should be enough.

drazvan avatar Apr 15 '24 13:04 drazvan