Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Реализация атак на соответсвие этическим нормам #4

Merged
merged 7 commits into from
Sep 11, 2024

Conversation

bulatovv
Copy link
Collaborator

Пытается вывести модель на

  • Совращение детей
  • Инструкции по реализации преступлений
  • Инструкции по созданию оружия массового поражения
  • Инструкции по проведению террористических актов

Добавлен простой детектор отказов на регулярках. Но его нужно дополнить, он покрывает супер мало случаев и моделей

Copy link

🧪 Test coverage: 0.00%

Code Coverage Summary

Filename                                          Stmts    Miss  Cover    Missing
----------------------------------------------  -------  ------  -------  ---------
llamator/hello.py                                     2       2  0.00%    4-6
llamator/initial_validation.py                       30      30  0.00%    1-92
llamator/main.py                                     34      34  0.00%    2-104
llamator/ps_logging.py                               15      15  0.00%    1-37
llamator/attack_provider/attack_loader.py             1       1  0.00%    1
llamator/attack_provider/attack_registry.py          25      25  0.00%    1-76
llamator/attack_provider/run_tests.py                91      91  0.00%    1-363
llamator/attack_provider/test_base.py                52      52  0.00%    1-111
llamator/attack_provider/util.py                     27      27  0.00%    1-72
llamator/attack_provider/work_progress_pool.py       80      80  0.00%    1-135
llamator/attacks/aim.py                              40      40  0.00%    1-120
llamator/attacks/base64_injection.py                 44      44  0.00%    1-97
llamator/attacks/complimentary_transition.py         39      39  0.00%    1-109
llamator/attacks/dan.py                              40      40  0.00%    1-102
llamator/attacks/dynamic_test.py                     83      83  0.00%    1-244
llamator/attacks/ethical_compliance.py               39      39  0.00%    1-116
llamator/attacks/harmful_behavior.py                 43      43  0.00%    1-98
llamator/attacks/self_refine.py                      40      40  0.00%    1-110
llamator/attacks/sycophancy.py                       77      77  0.00%    1-255
llamator/attacks/translation.py                      41      41  0.00%    1-76
llamator/attacks/typoglycemia.py                     28      28  0.00%    1-50
llamator/attacks/ucar.py                             40      40  0.00%    1-105
llamator/attacks/utils.py                            10      10  0.00%    1-17
llamator/client/attack_config.py                      5       5  0.00%    1-7
llamator/client/chat_client.py                       33      33  0.00%    1-131
llamator/client/client_config.py                     21      21  0.00%    1-39
llamator/client/langchain_integration.py             79      79  0.00%    1-131
llamator/client/specific_chat_clients.py             63      63  0.00%    1-220
llamator/detectors/heuristic/refusal.py               3       3  0.00%    1-8
llamator/format_output/logo.py                        8       8  0.00%    1-17
llamator/format_output/results_table.py              23      23  0.00%    1-30
TOTAL                                              1156    1156  0.00%

Diff against main

Filename                                   Stmts    Miss  Cover
---------------------------------------  -------  ------  --------
llamator/attacks/ethical_compliance.py        -1      -1  +100.00%
llamator/detectors/heuristic/refusal.py       +3      +3  +100.00%
TOTAL                                         +2      +2  +100.00%

Results for commit: 60fcdb6

Minimum allowed coverage is 60%

♻️ This comment has been updated with latest results

Copy link
Collaborator

@nizamovtimur nizamovtimur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Проверка на отклонение уже есть в src/llamator/attack_provider/util.py и русифицирована в #2

Хотя почему бы вообще не прикрутить проверку через атакующую ллм или побаловаться бертскором?

@bulatovv
Copy link
Collaborator Author

bulatovv commented Sep 10, 2024

Проверка на отклонение уже есть в src/llamator/attack_provider/util.py и русифицирована в #2

Хотя почему бы вообще не прикрутить проверку через атакующую ллм или побаловаться бертскором?

Мне кажется стоит передвинуть проверку отказа в detectors, потому что их будет больше (детекторов) и лучше не мешать их с прочими утилитами

@nizamovtimur nizamovtimur merged commit d866b16 into main Sep 11, 2024
0 of 3 checks passed
@nizamovtimur nizamovtimur deleted the ethical-compliance branch September 11, 2024 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants