Operator: AISCORE
Syntax: AISCORE(<qualified_column>, <min_score>, <max_score>, '<criterion>')
Parameters
<qualified_column>: qualified SQL column (TEXT) containing📝 text,🖼️ image, or🔊 audiovalues.<min_score>: numeric lower scoring bound.<max_score>: numeric upper scoring bound.<criterion>:📝natural-language criterion to score against.
Output semantics
- Returns one
FLOATscore per input row. - Typical usage expects scores between
<min_score>and<max_score>. - If output cannot be parsed as a number, the operator returns
<min_score> - 1.0.
Columns containing text, images, or audio files always use SQL type TEXT. Images and audio files are encoded as text and automatically recognized by GesamtDB.
Example
SELECT text,
AISCORE(text, 1, 10, 'positivity') AS positivity_score
FROM movie_reviews
ORDER BY positivity_score DESC;
Tips
- Use precise criteria (for example,
'positivity on a 1-10 scale'). - Keep score ranges intuitive (
0..1,1..5,1..10). - Use SQL filters to narrow candidate rows before scoring.