Home / Companies / Vectara / Blog / Post Details
Content Deep Dive

RAG with User-Defined Functions Based Reranking

Blog post from Vectara

Post Details
Company
Date Published
Author
David Oplatka and Ofer Mendelevitch
Word Count
1,492
Language
English
Hacker News Points
-
Summary

User-defined functions (UDFs) in Vectara allow users to customize the reranking of search results by applying their own logic based on metadata from retrieved documents, offering an alternative to the existing Maximal Marginal Relevance (MMR) and Multilingual Reranker v1. This feature enables users to prioritize search results according to specific criteria, such as recency or proximity, and supports various functions and operators to enhance flexibility. UDFs can be incorporated into chain reranking, allowing multiple reranking methods to be used sequentially, thereby leveraging the strengths of different approaches. The blog provides practical examples, such as ranking Airbnb listings based on location or recent reviews, to demonstrate the application of UDFs and highlights the importance of ensuring non-negative scores and handling NULL values. Users are encouraged to explore these capabilities further using the Vectara API playground and to share feedback or suggest new functionalities through community platforms.