Skip to content

How to change FAISS distance_strategy ? #16224

Answered by eyurtsev
stepkurniawan asked this question in Q&A
Discussion options

You must be logged in to vote

from_documents calls from_texts and from_text calls __from. I think @dosu-bot got this one correctly. Pass in the distance strategy

vs.,from_documents(...., distance_strategy=DistanceStrategy.INNER_PRODUCT)

FWIW changing the distance strategy is unlikely to make a dramatic improvement in the quality of RAG.

Replies: 5 comments 11 replies

Comment options

You must be logged in to vote
2 replies
@stepkurniawan
Comment options

@stepkurniawan
Comment options

Comment options

You must be logged in to vote
6 replies
@stepkurniawan
Comment options

@eyurtsev
Comment options

Answer selected by stepkurniawan
@stepkurniawan
Comment options

@eyurtsev
Comment options

@stepkurniawan
Comment options

@mingjun1120
Comment options

Comment options

You must be logged in to vote
1 reply
@eyurtsev
Comment options

Comment options

You must be logged in to vote
2 replies
@Leewaldoe
Comment options

@morancium
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants