langflow icon indicating copy to clipboard operation
langflow copied to clipboard

retrievalQAWithSourcesChain not returning sources

Open sampratha28 opened this issue 1 year ago β€’ 1 comments

sources are not returned by the chain.

i am using RetrievalQAWithSourcesChain to retrieve answers from my knowledge base, i want the sources to be returned along with the answer.

Components in the flow: Directory loader Character text splitter Huggingface Embedding Chroma vector store multi query retriever Custom LLM component RetrievalQAWithSourcesChain

sampratha28 avatar Jan 08 '24 16:01 sampratha28

πŸ€–

Hello @sampratha28! πŸ‘‹ I'm Dosu, a friendly bot here to assist you while we wait for a human maintainer. I'm here to help you solve bugs, answer your questions, and make your experience as a contributor as smooth as possible. Let's get to work! πŸš€

Based on the information you've provided, it seems like you're having trouble getting the RetrievalQAWithSourcesChain to return sources along with the answer. I found a similar issue in the langflow repository: RetrievalQAWithSourcesChain Not showing sources of the information. This issue was resolved, so it might be helpful to look at the discussion and solution there.

Unfortunately, I wasn't able to find specific details about how the RetrievalQAWithSourcesChain component works within the langflow codebase, its expected inputs and outputs, or its dependencies within the codebase. This information might be available elsewhere or I could have missed it.

However, I did find information about the parameters required by a similar component, the VectaraSelfQueryRetrieverComponent. This component requires an instance of VectorStore, a string describing the content of the document, an instance of BaseLanguageModel, and a list of strings representing additional search metadata. You can see the relevant code in the VectaraSelfQueryRetriever.py file.

If the RetrievalQAWithSourcesChain component works similarly, it might also require these parameters. If you're not providing all of these parameters correctly, that could be why you're not getting the expected output.

If you're still having trouble, could you provide more information about how you're using the RetrievalQAWithSourcesChain component? Specifically, it would be helpful to know what parameters you're passing to it and what output you're getting. This will help me better understand the issue and provide a more accurate solution.

-Dosu

Sources


This response is meant to be useful and save you time. 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.

If you want to continue the conversation, start your reply with @dosu-bot.

dosubot[bot] avatar Jan 08 '24 16:01 dosubot[bot]