Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pinecone_hybrid_search doesn't work by following the documents. #3043

Closed
ccccherrie opened this issue Apr 18, 2023 · 2 comments
Closed

pinecone_hybrid_search doesn't work by following the documents. #3043

ccccherrie opened this issue Apr 18, 2023 · 2 comments

Comments

@ccccherrie
Copy link

retriever = PineconeHybridSearchRetriever(embeddings=embeddings, index=index, tokenizer=CharacterTextSplitter)
result = retriever.get_relevant_documents(given_str)

gives TypeError: init() got an unexpected keyword argument 'padding'

with bm25_encoder
retriever = PineconeHybridSearchRetriever(embeddings=embeddings, index=index, tokenizer=CharacterTextSplitter , sparse_encoder=bm25_encoder)

it gives

ValidationError: 1 validation error for PineconeHybridSearchRetriever
sparse_encoder
extra fields not permitted (type=value_error.extra)

dev2049 pushed a commit that referenced this issue May 22, 2023
)

# Improve pinecone hybrid search retriever adding metadata support

I simply remove the hardwiring of metadata to the existing
implementation allowing one to pass `metadatas` attribute to the
constructors and in `get_relevant_documents`. I also add one missing pip
install to the accompanying notebook (I am not adding dependencies, they
were pre-existing).

First contribution, just hoping to help, feel free to critique :) 
my twitter username is `@andreliebschner`

While looking at hybrid search I noticed #3043 and #1743. I think the
former can be closed as following the example right now (even prior to
my improvements) works just fine, the latter I think can be also closed
safely, maybe pointing out the relevant classes and example. Should I
reply those issues mentioning someone?

@dev2049, @hwchase17

---------

Co-authored-by: Andreas Liebschner <[email protected]>
@Santiagowwi
Copy link

@lbsnrs I saw that you fixed it, but
is there a solution for langchain version==0.0.134 ??

@dosubot
Copy link

dosubot bot commented Sep 5, 2023

Hi, @ccccherrie! I'm Dosu, and I'm here to help the LangChain team manage their backlog. I wanted to let you know that we are marking this issue as stale.

Based on my understanding, you reported an issue related to the PineconeHybridSearchRetriever class not functioning correctly according to the provided documentation. It seems that the code examples in the documentation lead to a TypeError and a ValidationError.

I noticed that @Santiagowwi commented on the issue, asking if there is a solution for langchain version==0.0.134. Could you please confirm if this issue is still relevant to the latest version of the LangChain repository? If it is, please let the LangChain team know by commenting on the issue. Otherwise, feel free to close the issue yourself or it will be automatically closed in 7 days.

Thank you for your contribution to the LangChain repository!

@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Sep 5, 2023
@dosubot dosubot bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 18, 2023
@dosubot dosubot bot removed the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants