Keep retrieval score after reranking
diff --git a/llama_index/postprocessor/sbert_rerank.py b/llama_index/postprocessor/sbert_rerank.py
index 4f5ac79052a5a..dce2ef5474295 100644
--- a/llama_index/postprocessor/sbert_rerank.py
+++ b/llama_index/postprocessor/sbert_rerank.py
@@ -19,6 +19,7 @@ def __init__(
         top_n: int = 2,
         model: str = "cross-encoder/stsb-distilroberta-base",
         device: Optional[str] = None,
+        keep_retrieval_score: Optional[bool] = False,
     ):
         try:
             from sentence_transformers import CrossEncoder
@@ -31,7 +32,12 @@ def __init__(
         self._model = CrossEncoder(
             model, max_length=DEFAULT_SENTENCE_TRANSFORMER_MAX_LENGTH, device=device
         )
-        super().__init__(top_n=top_n, model=model, device=device)
+        super().__init__(
+            top_n=top_n,
+            model=model,
+            device=device,
+            keep_retrieval_score=keep_retrieval_score,
+        )
 
     @classmethod
     def class_name(cls) -> str:
@@ -69,6 +75,9 @@ def _postprocess_nodes(
             assert len(scores) == len(nodes)
 
             for node, score in zip(nodes, scores):
+                if self.keep_retrieval_score:
+                    # keep the retrieval score in metadata
+                    node.node.metadata["retrieval_score"] = node.score
                 node.score = score
 
             new_nodes = sorted(nodes, key=lambda x: -x.score if x.score else 0)[

# Description
for some reranker, the score will be overwritten by reranker.
this way will keep the original retrieval score for downstream purpose for better ranking

Fixes # (issue)

## Type of Change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

# How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

- [ ] Added new unit/integration tests
- [ ] Added new notebook (that tests end-to-end)
- [ ] I stared at the code and made sure it makes sense

# Suggested Checklist:

- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] I have added Google Colab support for the newly added notebooks.
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] I ran `make format; make lint` to appease the lint gods
