langchain/libs/community/tests/unit_tests/retrievers
Jan Heimes 60f58df5b3
community: add top_k as param to Needle Retriever (#29821)
Thank you for contributing to LangChain!

- [X] **PR title**: "package: description"
- Where "package" is whichever of langchain, community, core, etc. is
being modified. Use "docs: ..." for purely docs changes, "infra: ..."
for CI changes.
  - Example: "community: add foobar LLM"


- [x] **PR message**: 
This PR adds top_k as a param to the Needle Retriever. By default we use
top 10.



- [X] **Add tests and docs**: 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. It lives in
`docs/docs/integrations` directory.


- [X] **Lint and test**: Run `make format`, `make lint` and `make test`
from the root of the package(s) you've modified. See contribution
guidelines for more: https://python.langchain.com/docs/contributing/

Additional guidelines:
- Make sure optional dependencies are imported within a function.
- Please do not add dependencies to pyproject.toml files (even optional
ones) unless they are required for unit tests.
- Most PRs should not touch more than one package.
- Changes should be backwards compatible.
- If you are adding something to community, do not re-import it in
langchain.

If no one reviews your PR within a few days, please @-mention one of
baskaryan, efriis, eyurtsev, ccurme, vbarda, hwchase17.
2025-02-16 08:30:52 -05:00
..
document_compressors infra: update mypy 1.10, ruff 0.5 (#23721) 2024-07-03 10:33:27 -07:00
__init__.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
test_base.py core[patch]: add standard tracing params for retrievers (#25240) 2024-08-12 14:51:59 +00:00
test_bedrock.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
test_bm25.py community: BM25Retriever preservation of document id (#27019) 2024-12-04 00:36:00 +00:00
test_ensemble.py langchain[patch],community[patch]: Move unit tests that depend on community to community (#21685) 2024-05-16 17:24:27 -04:00
test_imports.py community: add Needle retriever and document loader integration (#28157) 2024-12-03 22:06:25 +00:00
test_knn.py community[patch]: Added missing from_documents method to KNNRetriever. (#18411) 2024-03-28 23:18:50 +00:00
test_nanopq.py community: retrievers: added capability for using Product Quantization as one of the retriever. (#22424) 2024-07-24 13:52:15 +00:00
test_needle.py community: add top_k as param to Needle Retriever (#29821) 2025-02-16 08:30:52 -05:00
test_remote_retriever.py patch: deprecate (a)get_relevant_documents (#20477) 2024-04-22 11:14:53 -04:00
test_svm.py patch: deprecate (a)get_relevant_documents (#20477) 2024-04-22 11:14:53 -04:00
test_tfidf.py community[patch]: Patch tdidf retriever (CVE-2024-2057) (#18695) 2024-03-06 15:49:04 -05:00
test_web_research.py multiple: langchain 0.2 in master (#21191) 2024-05-08 16:46:52 -04:00
test_you.py multiple: rely on asyncio_mode auto in tests (#27200) 2024-10-15 16:26:38 +00:00