pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
[pgvector/pgvector] issue #673: 浮点精度问题
4+ messages / 2 participants
[nested] [flat]

* [pgvector/pgvector] issue #673: 浮点精度问题
@ 2024-09-14 05:59  "Onethought1 (@Onethought1)" <noreply+Onethought1@github.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Onethought1 (@Onethought1) @ 2024-09-14 05:59 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

使用ALTER TABLE vector_rule_data_detail
ADD COLUMN embedding numeric[];

ALTER TABLE vector_rule_data_detail ADD CHECK (vector_dims(embedding::vector) = 1024);创建embedding 字段时,embedding维度传递1024维度的内容时,前102维度可以显示,后面的维度都被...这个省略号代替了,请问该如何解决呢?
如果只用vector(1024)创建embedding字段时,维度正确,但是精度却减半了。

^ permalink  raw  [nested|flat] 4+ messages in thread

* Re: [pgvector/pgvector] issue #673: 浮点精度问题
@ 2024-09-14 06:05  "ankane (@ankane)" <noreply+ankane@github.com>
  2 siblings, 0 replies; 4+ messages in thread

From: ankane (@ankane) @ 2024-09-14 06:05 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

Hi @Onethought1, this sounds like something specific to your client. Please use other resources for help.

^ permalink  raw  [nested|flat] 4+ messages in thread

* Re: [pgvector/pgvector] issue #673: 浮点精度问题
@ 2024-09-14 06:05  "ankane (@ankane)" <noreply+ankane@github.com>
  2 siblings, 0 replies; 4+ messages in thread

From: ankane (@ankane) @ 2024-09-14 06:05 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

@ankane closed this.

^ permalink  raw  [nested|flat] 4+ messages in thread

* Re: [pgvector/pgvector] issue #673: 浮点精度问题
@ 2024-09-14 06:40  "Onethought1 (@Onethought1)" <noreply+Onethought1@github.com>
  2 siblings, 0 replies; 4+ messages in thread

From: Onethought1 (@Onethought1) @ 2024-09-14 06:40 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

HI,确实是服务器显示的问题,感谢您的解答,可是我又遇到了其他的问题:
SELECT * FROM embeddings WHERE model_id = 123 ORDER BY embedding::vector(3) <-> '[3,1,2]' LIMIT 5;
向量匹配的时候需要进行embedding::vector(3) 向量格式的转化,而经过向量格式转化,我的全精度内容,又变成了半精度内容,甚至连数据都变了之前是四舍五入,请问一下,这个该如何解决呢?
部分内容示例:
{0.01619569957256317,0.01705833524465561,-0.011137214489281178}
{0.016189575,0.017059326,-0.011138916}

^ permalink  raw  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2024-09-14 06:40 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-09-14 05:59 [pgvector/pgvector] issue #673: 浮点精度问题 "Onethought1 (@Onethought1)" <noreply+Onethought1@github.com>
2024-09-14 06:05 ` "ankane (@ankane)" <noreply+ankane@github.com>
2024-09-14 06:05 ` "ankane (@ankane)" <noreply+ankane@github.com>
2024-09-14 06:40 ` "Onethought1 (@Onethought1)" <noreply+Onethought1@github.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox