BASMA Quality
AI-generatedSummary
Filters incoming items by the trimmed text field and minimum length, then adds a quality score and validity flag to each remaining item.
Inputs
- Drop Empty Messages — Defaults to true. Drops items whose
textis missing, empty, or whitespace only. - Min Length — Defaults to 0. Drops items when the trimmed
textis shorter than this character count. - Incoming items (required) — Each item is evaluated using its JSON
textfield;messageTypealso affects its score.
Output shape
A single output containing the kept items, each with its original JSON fields plus qualityScore and isValid.
qualityScoreadds 50 when trimmed text is nonempty, 20 when it exceeds 10 characters, and 30 whenmessageTypeis present and notunknown.isValidis true when the score is at least 50. Output items retain their input-item pairing; filtered items produce no output.
Examples
Example 1: A message passes the filters and has text plus a known message type.
Drop Empty Messages=true; Min Length=0; text has more than 10 characters; messageType is present and not 'unknown'. Output includes the original fields with qualityScore=100 and isValid=true.
Example 2: A message is dropped because its trimmed text is shorter than Min Length.
Min Length=10; text is 5 characters after trimming. No output item is produced.