langchain-ai / langchain

🦜🔗 Build context-aware reasoning applications
https://python.langchain.com
MIT License
92.11k stars 14.67k forks source link

Enhance retrieval callback hooks to capture retrieved document IDs and embeddings #8569

Closed axiomofjoy closed 6 months ago

axiomofjoy commented 1 year ago

Feature request

Enhance the retrieval callback hooks to include:

Motivation

I want to build a callback handler that enables LangChain users to visualize their data in Phoenix, an open-source tool that provides debugging workflows for retrieval-augmented generation. At the moment, I am only able to get retrieved document text from the callback system, not the IDs or embeddings of the retrieved documents.

Your contribution

I am willing to implement, test, and document this feature with guidance from the LangChain team. I am also happy to provide feedback on an implementation by the LangChain team by building an example callback handler using the enhancement retrieval hook functionality.

dosubot[bot] commented 1 year ago

Answer generated by a 🤖

Answer

Thank you for your interest in contributing to LangChain! Your proposed enhancement to the retrieval callback hooks sounds very useful.

It's great to hear that you are willing to implement, test, and document this feature. Your example callback handler using the enhanced retrieval hook functionality will be a valuable addition to LangChain.

Please go ahead and create a pull request with your proposed changes. The LangChain team will review your contribution and provide any necessary guidance or feedback.

Thank you for your contribution and for helping to improve LangChain!


This response is meant to be useful, save you time, and share context. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

dosubot[bot] commented 10 months ago

Hi, @axiomofjoy! 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.

From what I understand, you requested an enhancement to the retrieval callback hooks in order to capture document IDs and embeddings. Dosubot responded and encouraged you to create a pull request with your proposed changes. They also offered support and feedback from the LangChain team.

Before we close this issue, we wanted to check if it is still relevant to the latest version of the LangChain repository. If it is, please let us 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 and we look forward to hearing from you!

axiomofjoy commented 10 months ago

This issue is still relevant.

dosubot[bot] commented 7 months ago

Hi, @axiomofjoy,

I'm helping the LangChain team manage their backlog and am marking this issue as stale. From what I understand, you requested an enhancement to the retrieval callback hooks to include document IDs and embeddings from the underlying vector store, in order to enable visualization of data in Phoenix for debugging workflows. Dosubot has encouraged you to create a pull request with the proposed changes, and you have confirmed that the issue is still relevant and are willing to implement, test, and document the feature with guidance from the LangChain team.

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!