Android-Document-QA icon indicating copy to clipboard operation
Android-Document-QA copied to clipboard

Question about the distance function

Open greenrobot opened this issue 1 year ago • 0 comments

I'm seeing you are using the default distance function (Euclidean), as it is not specified: @HnswIndex(dimensions = 100) var chunkEmbedding: FloatArray = floatArrayOf()

I'm not sure which embedding model you are using. In RAG, often Cosine is preferable. Or, if you know that vectors are normalized, you could use the faster DotProduct.

greenrobot avatar May 29 '24 12:05 greenrobot