Android-Document-QA
Android-Document-QA copied to clipboard
Question about the distance function
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.