WEBVTT

00:00:01.290 --> 00:00:02.228
Hi, I'm Piccolo!

00:00:02.228 --> 00:00:05.043
jev-semgrep is a grep whose pattern is a sentence.

00:00:05.043 --> 00:00:09.421
Here's how it questions every line, and why that can do what vectors can't.

00:00:11.142 --> 00:00:12.294
Don't compare vectors.

00:00:12.294 --> 00:00:16.135
Ask a decision model whether each line matches a proposition.

00:00:16.135 --> 00:00:21.127
You get a probability, and unlike cosine distance, a probability has a complement.

00:00:23.008 --> 00:00:26.878
The file goes out thirty numbered lines at a time, as one shared state.

00:00:27.298 --> 00:00:31.020
For every line and every meaning, a yes-or-no question: does line

00:00:31.020 --> 00:00:32.373
seven match this meaning?

00:00:32.373 --> 00:00:34.065
One request carries them all.

00:00:34.485 --> 00:00:36.563
Jev returns a probability for each.

00:00:36.563 --> 00:00:41.067
Lines above the threshold are printed, and NOT is one minus the probability.

00:00:42.858 --> 00:00:46.904
An embedding is computed before your query exists, and cosine is distance.

00:00:46.904 --> 00:00:50.613
A sentence and its negation land right next to each other.

00:00:51.033 --> 00:00:55.305
Jev reads the line and the question together, so AND, OR and

00:00:55.305 --> 00:00:57.441
NOT become plain operations on probabilities.

00:00:58.942 --> 00:01:01.607
The article then builds it into Next.js sixteen.

00:01:02.027 --> 00:01:05.087
A route handler, because server actions run one at a time.

00:01:05.507 --> 00:01:09.828
Cache each request by its body: the lines, the propositions, the pinned model.

00:01:10.248 --> 00:01:13.432
Keep the threshold out of the key, so changing it costs nothing.

00:01:13.852 --> 00:01:15.748
And stream verdicts as each chunk lands.

00:01:17.758 --> 00:01:21.659
There's no index, so every query pays for the whole corpus again.

00:01:21.659 --> 00:01:25.561
One pass over this site is about eleven cents and eighty-three seconds.

00:01:26.683 --> 00:01:30.177
Search by meaning works when the model reads the question with the

00:01:30.177 --> 00:01:33.088
line; the price is paying for every line, every query.

00:01:36.192 --> 00:01:40.292
To recap: thirty lines per request, NOT from a probability's complement, and

00:01:40.292 --> 00:01:42.342
a bill paid on every query.

00:01:42.762 --> 00:01:44.863
Every source is in the full article.

00:01:44.863 --> 00:01:45.463
I'm Piccolo.

00:01:45.463 --> 00:01:45.763
Bye!
