Beatles Bench · Start
Code sees strings, not meaning.
To code, "Octopus's Garden" is a string of letters. You know it is a Ringo song on Abbey Road. grep matches letters, and none of these titles holds the words Abbey Road.
ThinkThen asks Jev what the words mean. Jev returns the probability of yes, and your threshold turns it into an answer.
Run it
grep finds nothing and exits 1.cat <<'EOF' |
Octopus's Garden
Hey Jude
Penny Lane
EOF
grep -i 'abbey road'No outputexit 1
At the default bar of 0.5, Octopus's Garden is yes and the others are no.
is_a_song="The text is the title of a song by the Beatles."
on_abbey_road="It appears on the album Abbey Road."
question="$is_a_song $on_abbey_road"
cat <<'EOF' |
Octopus's Garden
Hey Jude
Penny Lane
EOF
thinkthen decide "$question" \
--batch 1 \
--lines \
--threshold 0.5 \
--replay recordingOutput
{"input":"Octopus's Garden","value":true}
{"input":"Hey Jude","value":false}
{"input":"Penny Lane","value":false}exit 0: the run finished
Change the bar
The band 0.3:0.7 turns Penny Lane into not sure.
is_a_song="The text is the title of a song by the Beatles."
on_abbey_road="It appears on the album Abbey Road."
question="$is_a_song $on_abbey_road"
cat <<'EOF' |
Octopus's Garden
Hey Jude
Penny Lane
EOF
thinkthen decide "$question" \
--batch 1 \
--lines \
--threshold 0.3:0.7 \
--replay recordingOutput
{"input":"Octopus's Garden","value":true}
{"input":"Hey Jude","value":false}
{"input":"Penny Lane","value":null}exit 0: the run finished
The lesson
Octopus's Garden is the only one of the three on Abbey Road. Penny Lane falls inside the band and goes to a person as not sure.
A question about meaning finds what no pattern can match.
On GitHub: github.com/botassembly/beatles-bench/tree/main/examples/filter