Hey guys using phonix for tracing and evals; my question is does it works with KNNretriever only am using pathway as a retriever in langchain; it doesnt get picked up
Hey Sarim A. this might be because we leverage langchain鈥檚 built in tracer which might not be getting called in this particular retriever. Here's a relevant thread that might help! https://arize-ai.slack.com/archives/C04R3GXC8HK/p1716249296638639?thread_ts=1716248614.485509&cid=C04R3GXC8HK
Hey Sarim, could you check if the pathway retriever you have properly calls the callback manager like this?
callback_manager.on_retriever_start(
dumpd(self),
query,
name=run_name,
run_id=kwargs.pop("run_id", None),
)If it doesn't, adding this should make the retriever show up
nope it doesn't; am figuring out how to add this..
not working even after adding that
running hjere <langchain_core.callbacks.manager.CallbackManagerForRetrieverRun object at 0x7e29d1f26a10>
https://arize-ai.slack.com/archives/C04R3GXC8HK/p1716973317224439?thread_ts=1716921145.650749&cid=C04R3GXC8HK have shared my snippet and issues
Catching up Sarim. Just FYI it looks like LangChain does have a guide on this which I think is what Xander pulled from (https://python.langchain.com/v0.1/docs/modules/data_connection/retrievers/custom_retriever/)
Sarim A. it looks like the PathwayVectorClient has a as_retriever helper. Have you tried this? https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.pathway.PathwayVectorClient.html#langchain_c[鈥as_retriever
# Retrieve more documents with higher diversity
# Useful if your dataset has many similar documents
docsearch.as_retriever(
search_type="mmr",
search_kwargs={'k': 6, 'lambda_mult': 0.25}
)
# Fetch more documents for the MMR algorithm to consider
# But only return the top 5
docsearch.as_retriever(
search_type="mmr",
search_kwargs={'k': 5, 'fetch_k': 50}
)
# Only retrieve documents that have a relevance score
# Above a certain threshold
docsearch.as_retriever(
search_type="similarity_score_threshold",
search_kwargs={'score_threshold': 0.8}
)
# Only get the single most similar document from the dataset
docsearch.as_retriever(search_kwargs={'k': 1})
# Use a filter to only retrieve documents from a specific paper
docsearch.as_retriever(
search_kwargs={'filter': {'paper_title':'GPT-4 Technical Report'}}
)yup; have used pathway as_retriever thats am getting so confused
https://arize-ai.slack.com/archives/C04R3GXC8HK/p1716973317224439?thread_ts=1716921145.650749&cid=C04R3GXC8HK even if u see here; when I use pathway to get docs; it doesnt get logged
