diff --git a/rag/nlp/__init__.py b/rag/nlp/__init__.py index 2aaf98aab0..eb529f68b5 100644 --- a/rag/nlp/__init__.py +++ b/rag/nlp/__init__.py @@ -466,7 +466,7 @@ def binary_search(arr, target): jj = binary_search(levels[ii], j) if jj < 0: continue - if jj > cks[-1][-1]: + if levels[ii][jj] > cks[-1][-1]: cks[-1].pop(-1) cks[-1].append(levels[ii][jj]) for ii in cks[-1]: