mysql-ailike
Native MySQL plugin adding an AILIKE operator that asks Jev whether a value satisfies a natural-language condition.
Overview
AILIKE for MySQL is a native plugin that lets SQL queries filter rows and compare text columns using natural-language conditions, with TypeSafe Jev deciding each match. You write column AILIKE 'condition', ailike(value, prompt) or ailike(left, right, prompt) for a relationship between two columns, and the function returns 1 for a match, 0 otherwise, and NULL for NULL inputs.
Examples include finding films whose description implies an Asian setting, matching supplier and catalog products that describe the same item with different wording, and format-independent date matching. Each uncached evaluation is an API request, so the README advises narrowing candidates with ordinary SQL first, and notes that values and prompts are sent to TypeSafe. It is a preview release under GPL-2.0-only, with a Docker demo and an AI coding agent skill. It suits analysts who want semantic filters inside existing SQL.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Yes / no | Does this value satisfy the condition? | 1 · 0 |
| Yes / no | Do these two values satisfy the described relationship? | 1 · 0 |
How it works
- Narrow rows with ordinary SQL predicates.
- Evaluate AILIKE on the remaining values.
- Jev answers yes/no per value or pair (cached when repeated).
- Rows with 1 are returned or joined.
Strengths
- Semantic filtering directly in SQL.
- Caching avoids repeat API calls.
- Works on joins to match differently worded records.
Caveats
- Preview release; requires a TypeSafe API key.
- Evaluated values and prompts are sent to TypeSafe.
- Returns a model judgment, not an exact comparison.
Getting started
Follow docs/install.md to install the plugin, or run the Docker demo in docs/sample-data.md, then use column AILIKE 'condition' in a WHERE clause.At a glance
- Type
- Plugin
- Status
- beta
- Language
- C++
- Runtime
- MySQL plugin
- Has code
- yes
- License
- GPL-2.0-only
Use cases and integrations
How curated lists describe it
Database filtering: MySQL plugin that filters rows by a natural-language predicate instead of a literal one, powered by Jev.
yibie/awesome-jev
Frequently asked questions
What does AILIKE decide?
Whether a column value, or a pair of values, satisfies a natural-language condition.
Does my data leave the database?
Yes, evaluated values and prompts are sent to TypeSafe.
How do I keep costs down?
Filter with ordinary SQL first; each uncached AILIKE evaluation is an API call.
Related projects
dbt package and Terraform module adding jev_noul, jev_choice, jev_score and jev_ask SQL functions to Snowflake.
LibrarybetaSQLPostgreSQL extension with jev(), jev_prob, jev_choice and jev_score to filter, rank and classify rows by plain-language conditions.
PluginbetaCdbt package whose macros run Jev Choice, Noul and Score over SQL values in DuckDB and ClickHouse models.
ProjectbetaSQL (Jinja)DuckDB extension that asks Jev about every row in SQL and returns answers as ENUM, DOUBLE or STRUCT columns.
PluginbetaC++SQLite and Node library adding Jev judgments to SQL for matching, evidence picking, ranking, review queues and semantic CI checks.
ProjectbetaJavaScriptCLI that scans tabular, structured and text files or databases and asks Jev which fields look anomalous, building a review queue.
CLIbetaPython