1b8d7bd4de
- Introduced a new function `cleanPassageForRerank` to strip markdown and structural noise from text, enhancing semantic clarity for rerank models. - Implemented comprehensive regex patterns to remove images, links, code blocks, LaTeX, HTML tags, and other formatting elements. - Added unit tests to validate the cleaning process across various input scenarios, ensuring expected output consistency. - Updated the `getEnrichedPassage` function to utilize the new cleaning method, improving the quality of text passed to the rerank model. These changes significantly enhance the preprocessing of text data, leading to better performance in reranking tasks.