Is your feature request related to a problem?
In the assessment prefilter, topic relevance (TR) is not activated when only attachment columns are used. This limitation leads to skipping important topic relevance filtering when no text columns are present.
Describe the solution you'd like
- Modify the TR enabling condition to include both text columns and attachment columns.
- The condition should check if either one of the columns is configured along with a prompt.
Original issue
Describe the bug
In the assessment prefilter, topic relevance (TR) is only enabled when text columns and a prompt are configured. If a TR config uses only attachment_columns (e.g. an answer sheet) with no text columns, tr_enabled resolves to False and topic relevance filtering is silently skipped.
backend/app/services/assessment/prefilter/pipeline.py — resolve_prefilter_settings:
"tr_enabled": bool(tr_columns and tr_prompt),
Here attachment_columns is not considered, so attachment-only configs never enable TR.
Expected behavior
TR should be enabled when either text columns or attachment_columns are present, as long as a prompt is set.
Steps to reproduce
- Configure a prefilter with
topic_relevance.attachment_columns = ["Answer Sheet"], topic_relevance.columns = [], and a non-empty prompt.
- Run the prefilter pipeline.
- Observe
tr_enabled is False and topic relevance is skipped.
Proposed fix
Enable TR when either column source is present:
"tr_enabled": bool((tr_columns or tr_attachment_columns) and tr_prompt),
Is your feature request related to a problem?
In the assessment prefilter, topic relevance (TR) is not activated when only attachment columns are used. This limitation leads to skipping important topic relevance filtering when no text columns are present.
Describe the solution you'd like
Original issue
Describe the bug
In the assessment prefilter, topic relevance (TR) is only enabled when text
columnsand apromptare configured. If a TR config uses onlyattachment_columns(e.g. an answer sheet) with no textcolumns,tr_enabledresolves toFalseand topic relevance filtering is silently skipped.backend/app/services/assessment/prefilter/pipeline.py—resolve_prefilter_settings:Here
attachment_columnsis not considered, so attachment-only configs never enable TR.Expected behavior
TR should be enabled when either text
columnsorattachment_columnsare present, as long as apromptis set.Steps to reproduce
topic_relevance.attachment_columns = ["Answer Sheet"],topic_relevance.columns = [], and a non-emptyprompt.tr_enabledisFalseand topic relevance is skipped.Proposed fix
Enable TR when either column source is present: