langchain/langchain
Sidchat95 c5e50c40c9
Fix Document Similarity Check with passed Threshold (#6845)
Converting the Similarity obtained in the
similarity_search_with_score_by_vector method whilst comparing to the
passed
threshold. This is because the passed threshold is a number between 0 to
1 and is already in the relevance_score_fn format.
As of now, the function is comparing two different scoring parameters
and that wouldn't work.

Dependencies
None

Issue:
Different scores being compared in
similarity_search_with_score_by_vector method in FAISS.

Tag maintainer
@hwchase17



<!-- Thank you for contributing to LangChain!

Replace this comment with:
  - Description: a description of the change, 
  - Issue: the issue # it fixes (if applicable),
  - Dependencies: any dependencies required for this change,
- Tag maintainer: for a quicker response, tag the relevant maintainer
(see below),
- Twitter handle: we announce bigger features on Twitter. If your PR
gets announced and you'd like a mention, we'll gladly shout you out!

If you're adding a new integration, please include:
1. a test for the integration, preferably unit tests that do not rely on
network access,
  2. an example notebook showing its use.

Maintainer responsibilities:
  - General / Misc / if you don't know who to tag: @dev2049
  - DataLoaders / VectorStores / Retrievers: @rlancemartin, @eyurtsev
  - Models / Prompts: @hwchase17, @dev2049
  - Memory: @hwchase17
  - Agents / Tools / Toolkits: @vowelparrot
  - Tracing / Callbacks: @agola11
  - Async: @agola11

If no one reviews your PR within a few days, feel free to @-mention the
same people again.

See contribution guidelines for more information on how to write/run
tests, lint, etc:
https://github.com/hwchase17/langchain/blob/master/.github/CONTRIBUTING.md
 -->

---------

Co-authored-by: Bagatur <baskaryan@gmail.com>
2023-07-13 01:30:47 -04:00
..
agents codespell: workflow, config + some (quite a few) typos fixed (#6785) 2023-07-12 16:20:08 -04:00
callbacks WhyLabsCallbackHandler updates (#7621) 2023-07-12 23:46:56 -04:00
chains Adds OpenAI functions powered document metadata tagger (#7521) 2023-07-13 01:12:41 -04:00
chat_models codespell: workflow, config + some (quite a few) typos fixed (#6785) 2023-07-12 16:20:08 -04:00
client codespell: workflow, config + some (quite a few) typos fixed (#6785) 2023-07-12 16:20:08 -04:00
docstore docstrings: docstore and client (#6783) 2023-07-09 01:34:28 -04:00
document_loaders codespell: workflow, config + some (quite a few) typos fixed (#6785) 2023-07-12 16:20:08 -04:00
document_transformers Adds OpenAI functions powered document metadata tagger (#7521) 2023-07-13 01:12:41 -04:00
embeddings Use modern OpenAI endpoints for embeddings (#6573) 2023-07-13 01:23:17 -04:00
evaluation codespell: workflow, config + some (quite a few) typos fixed (#6785) 2023-07-12 16:20:08 -04:00
experimental codespell: workflow, config + some (quite a few) typos fixed (#6785) 2023-07-12 16:20:08 -04:00
graphs CPAL (#6255) 2023-07-11 10:11:21 -04:00
indexes Allow passing custom prompts to GraphIndexCreator (#7381) 2023-07-08 01:47:53 -04:00
llms codespell: workflow, config + some (quite a few) typos fixed (#6785) 2023-07-12 16:20:08 -04:00
load docstrings top level update (#7173) 2023-07-07 02:42:28 -04:00
memory Add ZepMemory; improve ZepChatMessageHistory handling of metadata; Fix bugs (#7444) 2023-07-10 01:53:49 -04:00
output_parsers Added param to return only a structured json from the get_format_instructions method (#5848) 2023-07-08 02:57:26 -04:00
prompts Jinja2 validation changed to issue warnings rather than issuing exceptions. (#7161) 2023-07-05 14:04:29 -04:00
retrievers Add new types of document transformers (#7379) 2023-07-12 23:53:30 -04:00
schema Load Run Evaluator (#7101) 2023-07-07 19:57:59 -07:00
tools codespell: workflow, config + some (quite a few) typos fixed (#6785) 2023-07-12 16:20:08 -04:00
utilities codespell: workflow, config + some (quite a few) typos fixed (#6785) 2023-07-12 16:20:08 -04:00
vectorstores Fix Document Similarity Check with passed Threshold (#6845) 2023-07-13 01:30:47 -04:00
__init__.py move base prompt to schema (#6995) 2023-07-02 22:38:59 -04:00
base_language.py Base language model docstrings (#7104) 2023-07-07 16:09:10 -04:00
cache.py Page per class-style api reference (#6560) 2023-06-30 09:23:32 -07:00
docker-compose.yaml
env.py
example_generator.py Base language model docstrings (#7104) 2023-07-07 16:09:10 -04:00
formatting.py
input.py
math_utils.py
model_laboratory.py
py.typed
python.py
requests.py fix: missing parameter in POST/PUT/PATCH HTTP requests (#7194) 2023-07-05 12:47:30 -04:00
serpapi.py codespell: workflow, config + some (quite a few) typos fixed (#6785) 2023-07-12 16:20:08 -04:00
server.py
sql_database.py docs : add cnosdb to Ecosystem Integrations (#7316) 2023-07-07 01:35:22 -04:00
text_splitter.py codespell: workflow, config + some (quite a few) typos fixed (#6785) 2023-07-12 16:20:08 -04:00
utils.py docstrings top level update (#7173) 2023-07-07 02:42:28 -04:00