ajuste no guardraild COE
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
27
tests/migration/test_coer_semantic_prompt_contract.py
Normal file
27
tests/migration/test_coer_semantic_prompt_contract.py
Normal file
@@ -0,0 +1,27 @@
|
||||
from agent_framework.guardrails.calibrated.prompts.coerencia import build_coer_prompt
|
||||
|
||||
|
||||
def test_coer_prompt_delega_intencao_parametros_e_execucao_para_camadas_seguintes():
|
||||
prompt = build_coer_prompt("qualquer fala", "")
|
||||
lowered = prompt.lower()
|
||||
assert "não tente decidir aqui" in lowered
|
||||
assert "qual é a intenção" in lowered
|
||||
assert "faltam parâmetros" in lowered
|
||||
assert "mudança de intenção" in lowered
|
||||
assert "compreensível mas sem todos os parâmetros -> 1" in lowered
|
||||
|
||||
|
||||
def test_coer_prompt_trata_negacao_sem_heuristica_textual_chumbada():
|
||||
prompt = build_coer_prompt("qualquer fala", "")
|
||||
lowered = prompt.lower()
|
||||
assert "contendo negação/discordância -> 1" in lowered
|
||||
assert "tire esse \"não\"" not in lowered
|
||||
assert "não quero parcelar" not in lowered
|
||||
assert "cancelar, tirar cobrança" not in lowered
|
||||
|
||||
|
||||
def test_coer_prompt_bloqueia_apenas_incompreensibilidade_semantica_real():
|
||||
prompt = build_coer_prompt("qualquer fala", "")
|
||||
lowered = prompt.lower()
|
||||
assert "bloquear apenas incompreensibilidade" in lowered
|
||||
assert "não incerteza de negócio" in lowered
|
||||
Reference in New Issue
Block a user