How do you change the source field in RetrievalQAWithSourcesChain #2076
Replies: 1 comment
-
I ran into this issue when trying to switch over some code I had written to use langchain instead of my custom scripts. Specifically, My workaround for this was to create a custom RetrievalQAWithSourcesChain which modifies the _get_docs() to do this step.
I would love to know if there is a better more langchainy way to add this step into the process (rather than a custom class). Or does this functionality need to be added? |
Beta Was this translation helpful? Give feedback.
-
I have a VectorDB with sources saved as
doucment_id
. How do I use thedocument_id
as the source instead of using asource
key in the RetrievalQAWithSourcesChain?Beta Was this translation helpful? Give feedback.
All reactions