Find answers from the community

Updated 2 months ago

Does the order of postprocessors matter?

Does the order of postprocessors matter?

i.e.

Plain Text
node_postprocessors=[
            MetadataReplacementPostProcessor(target_metadata_key="window"),
            cohere_rerank
 ]


vs

Plain Text
node_postprocessors=[
            cohere_rerank,
            MetadataReplacementPostProcessor(target_metadata_key="window")
]


would it make a difference?
W
L
S
4 comments
Yes, the are applied in order

So here, you'd be either applying reranking on a single sentence, or on the window, depending if the rerank is first or last
Thank you!

In this specific case, do you see any advantage of using one order over the other?
I think it really depends πŸ˜… personally I'd lean towards using the reranker last
Add a reply
Sign up and join the conversation on Discord