3 ms·
very cool that you used supabase for this yoko - thank you. it could be worthwile adding an an index to the migration script[0]. if you decide to do this, it w
by kiwicopple 3y ago
very cool that you used supabase for this yoko - thank you.
it could be worthwile adding an an index to the migration script[0]. if you decide to do this, it will need to be HNSW since ivfflat indexes should be created _after_ the table has some data[1]. HNSW is faster as well, so it's a sensible default.
also it's worth mentioning that the gte-small[2] embedding model isn't great with non-english embeddings. I don't know if many developers will get tripped up on that, but hopefully it's clear that they can swap that for any huggingface model
[0] https://github.com/ykhli/local-ai-stack/blob/main/supabase/migrations/20231028002341_create_vector_db.sql https://github.com/ykhli/local-ai-stack/blob/main/supabase/m...
[1] https://github.com/pgvector/pgvector#ivfflat https://github.com/pgvector/pgvector#ivfflat
[2] https://github.com/ykhli/local-ai-stack/blob/1a23061442ce1d98981f0f3af83f2cbbc2ed5c18/supabase/functions/embed/index.ts#L15 https://github.com/ykhli/local-ai-stack/blob/1a23061442ce1d9...
- ykhli 3y agoThese are great suggestions!! Really appreciate it. Let me open a few PRs and add you to review :D