Find answers from the community

Updated 8 months ago

Hey folks! I'm using llamaindex with

Hey folks! I'm using llamaindex with pgvector. I'm usiong text-embedding-large-3 with embedding size of 1536.
When using the vector store and asking a question, I get this error:
sqlalchemy.exc.StatementError: (builtins.ValueError) expected 1536 dimensions, not 3072
This is odd because embedding with 3072 doesn't work with pgvector due to postgres max dimensions. I'm assuming that there must be a dimension size that is hardcoded somewhere? Does anyone have a similar issue?
0
L
9 comments
in env file:
Attachment
image.png
Swapping to ada-2 works, even though a different embedding model was used to embed it. The results are wrong, but at least it doesn't give an error. I'm assuming there is a hardcoded 3072 somewhere for what it is expecting. But we can actually use 1536 dimensions with embedding-3-large. Any thoughts, friends?
I can confirm that the embeddings are stored with 1536 dimensions
You need to set the embed dim

PGVectorStore(..., embed_dim=3072)
Thanks @Logan M that worked. But now I'm running into this problem which happened with other dimensions too:
Basically mid-generation it just stops and gives an error. The backend logs don't show anything:
Attachment
image.png
Is this a known issue? Could you throw some pointers at where I should look to resolve this? Thanks πŸ™‚ @Logan M
It might be easier to debug if you console logged the error instead of trying to parse it
Add a reply
Sign up and join the conversation on Discord