Comments (3)
A workaround (which might be enough) seems to be adding a clause using where(text("vector_dims(field) = ${vector_len of the queried term}"))
from pgvector-python.
Hi @ostefano, thanks for the suggestion. Can you share more details about the specific use case? Typically, vectors with different dimensions will come from different models, so you'll want another field like model_id
on the table to use for filtering instead (since even if two models have the same number of dimensions, you don't want to compare embeddings across models).
from pgvector-python.
Hi @ankane indeed you are right, that shall not be needed. However it is counterintuitive from a DB perspective that the select would stop working, and there is not much documentation about it. Happy to close it, but I would mention this aspect more prominently.
from pgvector-python.
Related Issues (20)
- [Question] Ideas on clustering vectors (without defining no. clusters) HOT 3
- [peewee] using Model.get_or_create() doesn't work with pgvector HOT 2
- `register_vector(conn)` yields `psycopg.ProgrammingError: vector type not found in the database` HOT 2
- [Django] Using null=True raises error HOT 2
- How to set ivfflat.probes for indexed embeddings HOT 1
- HINT: No operator matches the given name and argument types. You might need to add explicit type casts. HOT 1
- Where to call the class Migration to enable pgvector extension? HOT 1
- Unable to run the extension migration HOT 2
- Cannot adapt type 'ndarray' with placeholder %s HOT 5
- How to rebuild indexes with Django? HOT 2
- ModuleNotFoundError: No module named 'pgvector.psycopg2'; 'pgvector' is not a package HOT 3
- Setting HNSW ef_search variable HOT 1
- Average embeddings returns string not np array HOT 10
- How to set query options (e.g. # of ivfflat.probe) when querying a table with IVFFlat or HNSW index? HOT 1
- Question : can i use 1024 dimensions size vector ? HOT 1
- examples seem to not work HOT 3
- Error when querying for the most similar vector HOT 3
- Searching for vectors when there is no default length HOT 1
- Error when querying nearest vector HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pgvector-python.