GenkitG
Genkitโ€ข15mo agoโ€ข
5 replies
managerial-maroon

Firestore Retriever

I have another question please: Is it possible to limit the results of a RAG Firestore retriever to only the Firestore documents that are "similar to a certain level" to the query passed to the retriever. To be more precise: I'm developing a "recipe advice" demo application and I have tens of recipes vector indexed in the Firestore database. When I query for a specific ingredient through the retrieve() method, if I don't put any limit in the options, I get back the entire set of Firestore documents, even the ones that are not at all "linked" to the input ingredient. Is there any out-of-the-box solution to get only the documents/recipes "really" corresponding to the ingredients (e.g. Recipes using the ingredients or using other similar ingredients)? Is writing my own Custom retriever an option? Thanks!
Was this page helpful?