You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The DocumentPostProcessor is one of the modular RAG components introduce in M8. You can now use this API from within the RetrievalAugmentationAdvisor to post-process the retrieved documents before passing them to the model. For example, you can use such an interface to perform re-ranking of the retrieved documents based on their relevance to the query, remove irrelevant or redundant documents, or compress the content of each document to reduce noise and redundancy.
Signed-off-by: Thomas Vitale <[email protected]>
You can also use the `DocumentPostProcessor` API to post-process the retrieved documents before passing them to the model. For example, you can use such an interface to perform re-ranking of the retrieved documents based on their relevance to the query, remove irrelevant or redundant documents, or compress the content of each document to reduce noise and redundancy.
Copy file name to clipboardExpand all lines: spring-ai-integration-tests/src/test/java/org/springframework/ai/integration/tests/client/advisor/RetrievalAugmentationAdvisorIT.java
+26Lines changed: 26 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -261,6 +261,32 @@ void ragWithMultiQuery() {
261
261
evaluateRelevancy(question, chatResponse);
262
262
}
263
263
264
+
@Test
265
+
voidragWithDocumentPostProcessor() {
266
+
Stringquestion = "Where does the adventure of Anacletus and Birba take place?";
0 commit comments