|
|
|
|
|
by 9rx
262 days ago
|
|
If an LLM understands that coffee and expresso are both relevant, like the earlier comment suggests, why wouldn't it understand that it should search for something like `foo LIKE '%coffee%' OR foo LIKE '%expresso%'`? In fact, this is what ChatGPT came up with: SELECT *
FROM documents
WHERE text ILIKE '%coffee%'
OR text ILIKE '%espresso%'
OR text ILIKE '%latte%'
OR text ILIKE '%cappuccino%'
OR text ILIKE '%americano%'
OR text ILIKE '%mocha%'
OR text ILIKE '%macchiato%';
(I gave it no direction as to the structure of the DB, but it shouldn't be terribly difficult to adapt to your exact schema) |
|
There are an unlimited number of items to add to your “like” clauses. Vector search allows you to efficiently query for all of them at once.