Skip to content

Update samples: Import PebbloRetrievalQA from langchain_community #364

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

Merged
merged 3 commits into from
May 2, 2024

Conversation

Raj725
Copy link
Collaborator

@Raj725 Raj725 commented Apr 30, 2024

  • Import PebbloRetrievalQA from langchain_community
  • update auth context key username -> user_id

@Raj725 Raj725 requested review from srics and shreyas-damle April 30, 2024 11:47
@Raj725 Raj725 changed the title Import PebbloRetrievalQA from langchain_community Samples: Import PebbloRetrievalQA from langchain_community Apr 30, 2024
@Raj725
Copy link
Collaborator Author

Raj725 commented Apr 30, 2024

NOTE:
Install both langchain-community and langchain-core from the following branch:
https://github.com/daxa-ai/langchain/tree/pebblo_0.1.15

@@ -80,6 +80,9 @@ def init_retrieval_chain(self):
"""
return PebbloRetrievalQA.from_chain_type(
llm=self.llm,
app_name=self.app_name,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With safe retrieval details on Local UI, we now have two different types of apps - loader and retriever. The discover call from PebbloSafeLoader would create loader type app where as discover call from PebbloRetrievalQA would create retriever type app. If we use same app name at both places, it will show only one app which is retriever, because discover from PebbloRetrievalQA was made later.
@srics This is exact corner case that we were talking while deciding approach for loader and retriever type applications.

TLDR - Either we should use separate names as app_name parameter to PebbloRetrievalQA.from_chain_type() and PebbloSafeLoader or we should have two separate applications one of loader type and other of retrieval type with separate names.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can adjust the naming in our sample apps, but we cannot prevent users from naming them the same.
Logically, it's one app that loads data from documents and allows users to query them.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shreyas-damle @Raj725 one data ingestion app could potentially serve multiple retrieval/chatbot apps. It is reasonable to let the app owners provide unique names across pebblo. We can relax this requirement based on user feedback and/or when we switch over to using sqlite.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shreyas-damle Updated

@Raj725 Raj725 requested a review from shreyas-damle April 30, 2024 16:08
@Raj725 Raj725 force-pushed the rel-0.1.15-samples branch from 7eb766c to fc30287 Compare May 2, 2024 07:03
@Raj725 Raj725 changed the title Samples: Import PebbloRetrievalQA from langchain_community Update samples: Import PebbloRetrievalQA from langchain_community May 2, 2024
@Raj725 Raj725 requested a review from dristysrivastava May 2, 2024 08:46
@Raj725 Raj725 merged commit 81ce7c0 into daxa-ai:main May 2, 2024
3 checks passed
@Raj725 Raj725 deleted the rel-0.1.15-samples branch May 2, 2024 10:44
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

Successfully merging this pull request may close these issues.

3 participants