Skip to content

Conversation

rosannamilner
Copy link
Collaborator

@rosannamilner rosannamilner commented Sep 30, 2025

Having chatted to Olesya about how the news genre classifier behaves, she recommends having a default genre always set. This will be "Reporting" ("Objective reporting" seen by users). If "Satire" or "Opinionated news" return with a score higher than a threshold, then the relevant label will be displayed instead.

Added separate threshold for news framing (0.8) and news genre (0.7)

@rosannamilner rosannamilner marked this pull request as draft September 30, 2025 14:44
@rosannamilner rosannamilner changed the title added default genre if category with highest score below threshold assistant/add default genre Sep 30, 2025
@rosannamilner rosannamilner marked this pull request as ready for review October 1, 2025 09:33
@rosannamilner rosannamilner requested a review from Sallaa October 1, 2025 09:33
credibilitySignal === subjectivityTitle
) {
filteredCategories[label] = classification[label];
} else if (credibilitySignal === keyword("news_genre_title")) {
Copy link
Contributor

Choose a reason for hiding this comment

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

The PR looks good. I am just wondering, do these keyword checks still work if the user changes the language?

We had some issue doing checks with the keyword function elsewhere, and we now do checks based on the keyword labels only e.g. checking if ... === "news_genre_title". Maybe changing the language doesn't break things here though

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It behaves as expected across different languages checking the keywords like this, but I'm happy to create a new issue and swap these across the assistant to if ... === "news_genre_title" just to be safe?

I have just changed keyword("news_genre_title") to the constant newsGenreTitle here:

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