### Checked other resources

- [X] I added a very descriptive title to this issue.
- [X] I searched the LangChain documentation with the integrated search.
- [X] I used the GitHub search to find a similar question and didn't find it.
- [X] I am sure that this is a bug in LangChain rather than my code.
- [X] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

### Example Code

I used notebook in official faiss page for reference. Here is the reference code.
https://python.langchain.com/v0.1/docs/integrations/vectorstores/faiss/

To show the issue, I modified it to use max_inner_product distance strategy. Here is the modified code section.
db = FAISS.from_documents(docs, embeddings, distance_strategy=DistanceStrategy.MAX_INNER_PRODUCT)

### Error Message and Stack Trace (if applicable)

_No response_

### Description

Reference code which uses l2 distance by default generates following output:

![image](https://github.com/langchain-ai/langchain/assets/6825980/658d80a1-9657-453a-a119-dff29a2c5b04)

Modified code which uses max_inner_product distance generates the following output:

![image](https://github.com/langchain-ai/langchain/assets/6825980/75fee62b-97e2-4b38-8dff-4e866790de93)

Relevance score by definition is between 0-1. 0 is dissimilar, 1 is most similar. See reference 1.

Reference code output produces valid relevance score, in which most similar document have relevant score closest to 1.

Modified code using MAX_INNER_PRODUCT, produces invalid relevance score, in which most similar document have relevant score most distant to 1. This contradicts with the definition of relevance score. 

References:
1- https://api.python.langchain.com/en/latest/vectorstores/langchain_core.vectorstores.VectorStore.html  

### System Info

langchain==0.2.1
langchain-community==0.2.1
langchain-core==0.2.1
langchain-openai==0.1.7
langchain-text-splitters==0.2.0
faiss-cpu==1.8.0
FAISS - Incorrect relevance score with MAX_INNER_PRODUCT distance metric.
This is a GitHub Issue
repo:langchain
owner:hwchase17
Title : FAISS - Incorrect relevance score with MAX_INNER_PRODUCT distance metric.
Issue date:

--- start body ---
### Checked other resources

- [X] I added a very descriptive title to this issue.
- [X] I searched the LangChain documentation with the integrated search.
- [X] I used the GitHub search to find a similar question and didn't find it.
- [X] I am sure that this is a bug in LangChain rather than my code.
- [X] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

### Example Code

I used notebook in official faiss page for reference. Here is the reference code.
https://python.langchain.com/v0.1/docs/integrations/vectorstores/faiss/

To show the issue, I modified it to use max_inner_product distance strategy. Here is the modified code section.
db = FAISS.from_documents(docs, embeddings, distance_strategy=DistanceStrategy.MAX_INNER_PRODUCT)

### Error Message and Stack Trace (if applicable)

_No response_

### Description

Reference code which uses l2 distance by default generates following output:

![image](https://github.com/langchain-ai/langchain/assets/6825980/658d80a1-9657-453a-a119-dff29a2c5b04)

Modified code which uses max_inner_product distance generates the following output:

![image](https://github.com/langchain-ai/langchain/assets/6825980/75fee62b-97e2-4b38-8dff-4e866790de93)

Relevance score by definition is between 0-1. 0 is dissimilar, 1 is most similar. See reference 1.

Reference code output produces valid relevance score, in which most similar document have relevant score closest to 1.

Modified code using MAX_INNER_PRODUCT, produces invalid relevance score, in which most similar document have relevant score most distant to 1. This contradicts with the definition of relevance score. 

References:
1- https://api.python.langchain.com/en/latest/vectorstores/langchain_core.vectorstores.VectorStore.html  

### System Info

langchain==0.2.1
langchain-community==0.2.1
langchain-core==0.2.1
langchain-openai==0.1.7
langchain-text-splitters==0.2.0
faiss-cpu==1.8.0
--- end body ---
