Files
langchain/libs/core/langchain_core
Azhagammal 4d9c0b0883 fix[core]: added error message if the query vector or embedding contains NaN values (#31822)
**Description:**  
Added an explicit validation step in
`langchain_core.vectorstores.utils._cosine_similarity` to raise a
`ValueError` if the input query or any embedding contains `NaN` values.
This prevents silent failures or unstable behavior during similarity
calculations, especially when using maximal_marginal_relevance.

**Issue**:
Fixes #31806 

**Dependencies:**  
None

---------

Co-authored-by: Azhagammal S C <azhagammal@kofluence.com>
Co-authored-by: Mason Daugherty <mason@langchain.dev>
2025-07-09 18:30:26 -04:00
..
2025-07-07 13:02:40 -04:00
2025-07-07 13:02:40 -04:00
2025-07-07 13:02:40 -04:00
2025-07-07 13:02:40 -04:00
2025-07-07 13:02:40 -04:00
2025-07-07 13:02:40 -04:00
2025-07-07 13:02:40 -04:00
2025-04-11 16:35:13 -04:00
2025-05-15 15:43:57 -04:00
2025-07-07 13:02:40 -04:00
2025-07-07 13:02:40 -04:00
2025-07-03 12:36:25 -04:00