Open pa-t opened 7 months ago
Thanks for the deepdive! Pinecone is an external contribution, it might be outdated. So it’s very possible that you’re right about some challanges that require some improvements to it
The issue hasn't been fixed yet. Better to implement your own retriever: https://dspy-docs.vercel.app/docs/deep-dive/retrieval_models_clients/custom-rm-client#the-dspythonic-way
Overview
I wanted to test out this library for a project, but I have hit so many roadblocks that I do not think this library is even functional. Here is my code I have been testing with, built following documentation in this repo (I have replaced sensitive information throughout with
...
)Shortlist of errors encountered
Improper check
Filename:
dspy/retrieve/pinecone_rm.py
Function name:_get_embeddings()
Description: Before checking if the user has setself.use_local_model
, the function is checking iftorch
is installed. This dependency is not needed if the user is using OpenAI embeddings, however with this current logic DSPy is forcing users to have it installed no matter what. Reordering this function like below solves this problemParameters being passed incorrectly
Filename:
dspy/retrieve/pinecone_rm.py
Function name:forward()
Description: Somewhere up the chain of calls (i believe indsp/primitives/search.py
->retrieveEnsemble()
)k
is being passed to theforward()
function ofPineconeRM
. I remedied this by adding an unusedk
to the function definitionBut this was just a short term fix as I was trying to get this script functional for testing.
Passages has no value
long_text
Filename:
dsp/primitives/search.py
Function name:retrieve()
Description: This line was encountering issues accessing the attribute.long_text
If the passages in this list are dictionaries, shouldn't we be using
.get("long_text")
? Either way, at this point each passage was a string in this list and I am no longer sure if my debugging is making things better or worse.Looking for some guidance if I am wildly off base or if this
PineconeRM
is not operational. ThanksAdditional Info
My environment is using
python 3.10.13
and i havedspy-ai==2.1.6
installed