Similarity Measure between two feature vectors
So, thank you for clarifying the question. Just to confirm that the question is asking how to set an appropriate threshold for face feature vectors (represented a a and b, for example).
What I would recommend is to look at either cosine similarity or euclidean distance, which you have implemented. From here, I would then look the distribution fo the similarity metric over all face vector pairings. Here, this can give you an idea of general level of similarity over all face vector pairings (e.g. if most of the distribution is skewed towards lowers facial similarities, then this could indicate overall lack of similarity between face vector pairings).
If the distribution is skewed to higher similarity values, then you could take, say, the 90th percentile over this distribution as the threshold for determining whether a == b.
Another idea would be to use the idea of softmax in the following way. This method would allow for others to replicate your methodology precisely:
For each face $f_i \in F$, you compute the softmax over the face vector pairings between $f_i$ and $f_j \in F, i \neq j$. Then, from this, you select the index $j$ which has the highest value, which can then be assumed to be such that $f_i$ == $f_j$ (a == b)