Skip to content

Commit

Permalink
Reduce number of documents to return for Pinecone (langchain-ai#2299)
Browse files Browse the repository at this point in the history
Minor change: Currently, Pinecone is returning 5 documents instead of
the 4 seen in other vectorstores, and the comments this Pinecone script
itself. Adjusted it from 5 to 4.
  • Loading branch information
kennethleungty committed Apr 2, 2023
1 parent fe572a5 commit 00d3ec5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions langchain/vectorstores/pinecone.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def add_texts(
def similarity_search_with_score(
self,
query: str,
k: int = 5,
k: int = 4,
filter: Optional[dict] = None,
namespace: Optional[str] = None,
) -> List[Tuple[Document, float]]:
Expand Down Expand Up @@ -125,7 +125,7 @@ def similarity_search_with_score(
def similarity_search(
self,
query: str,
k: int = 5,
k: int = 4,
filter: Optional[dict] = None,
namespace: Optional[str] = None,
**kwargs: Any,
Expand Down

0 comments on commit 00d3ec5

Please sign in to comment.