Skip to content

Create a spam flag on automatic spam classificaiton #6706

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

Merged
merged 1 commit into from
Jun 10, 2025

Conversation

akatsoulas
Copy link
Collaborator

  • DRY up helpers

Copy link
Contributor

@escattone escattone left a comment

Choose a reason for hiding this comment

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

Nice changes.

Comment on lines +236 to +243
flag_kwargs.update(
{
"notes": (
f"LLM classified as spam, for the following reason:\n"
f"{result.get('spam_result', {}).get('reason', '')}"
),
}
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit. For me, the following is a bit simpler and more readable:

flag_kwargs.update(
    notes=(
        "LLM classified as spam, for the following reason:\n"
        f"{result.get('spam_result', {}).get('reason', '')}"
    )
)

@akatsoulas akatsoulas merged commit 899e78d into mozilla:main Jun 10, 2025
2 checks passed
@akatsoulas akatsoulas deleted the create-spam-flag-llm branch June 10, 2025 14:06
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.

2 participants