It is possible to do monkey patching in C++, but it is not recommended.
One way to do it is to use LD_PRELOAD.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence