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

[Feature] Add prompt to RetreivalQAChain #3702

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

JJK801
Copy link
Contributor

@JJK801 JJK801 commented Dec 13, 2024

Hi Flowise,

This PR adds the ability to link a prompt template to RetrievalQAChain (it's also achievable for MultiRetrievalQAChain but this one targets PromptTemplate instead of BasePromptTemplate, so it would implies a lot on refacto)

  • Add prompt input (optional to prevent breaking changes and fit langchain behavior)
  • Allow return source documents for RetrievalQAChain

@HenryHengZJ BTW it would be great to update RetrievalQAChain logic as RetrievalQAChain is deprecated by langchain. (will be removed on 1.0.0)

@HenryHengZJ
Copy link
Contributor

Hi Flowise,

This PR adds the ability to link a prompt template to RetrievalQAChain (it's also achievable for MultiRetrievalQAChain but this one targets PromptTemplate instead of BasePromptTemplate, so it would implies a lot on refacto)

  • Add prompt input (optional to prevent breaking changes and fit langchain behavior)
  • Allow return source documents for RetrievalQAChain

@HenryHengZJ BTW it would be great to update RetrievalQAChain logic as RetrievalQAChain is deprecated by langchain. (will be removed on 1.0.0)

would you like to take an attempt to do it in this PR? using the new way via createRetrievalQAChain:
image

@JJK801
Copy link
Contributor Author

JJK801 commented Dec 18, 2024

@HenryHengZJ sure i can, i'll do it by the end of week.

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.

2 participants