Skip to content

armgit / dspy

Public Imported from GitHub
0

DSPy: The framework for programming—not prompting—language models

Python

clarify comment

Jasper Xianc5e7c6014674
diff --git a/dsp/modules/pyserini.py b/dsp/modules/pyserini.py
index 34d4bc31c..b858da254 100644
--- a/dsp/modules/pyserini.py
+++ b/dsp/modules/pyserini.py
@@ -49,7 +49,7 @@ class PyseriniRetriever:
topk = []
for rank, hit in enumerate(hits, start=1):
if self.dataset is not None:
- # Search through user's dataset for the document
+ # Linearly search through user's dataset for the document, maybe some room for future improvement here
row = self.dataset[self.id_field].index(hit.docid)
text = ' '.join(self.dataset[field][row] for field in self.text_fields)
pid = self.dataset[self.id_field][row]