Package org.springframework.ai.rag.postretrieval.document
@NullMarked
package org.springframework.ai.rag.postretrieval.document
-
ClassDescriptionScreens retrieved documents before they reach the prompt, by asking a
DecisionModelfour yes/no questions about each one.Builder forDecisionDocumentFilter.What the filter decided about a document.The four thresholds, kept in one place so that changing the policy means changing a number, not rewording a question.Reorders retrieved documents by asking aDecisionModel, one document at a time, whether each one answers the query.Builder forDecisionDocumentReranker.A component for post-processing retrieved documents based on a query, addressing challenges such as "lost-in-the-middle", context length restrictions from the model, and the need to reduce noise and redundancy in the retrieved information.