Package com.tnsai.intelligence.rag
Class RAGPipeline.Builder
java.lang.Object
com.tnsai.intelligence.rag.RAGPipeline.Builder
- Enclosing class:
RAGPipeline
Builder for
RAGPipeline.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the pipeline.defaultContext(RAGContext context) Sets the default retrieval context.queryPreprocessor(UnaryOperator<String> preprocessor) Sets a query preprocessor (e.g., query expansion, reformulation).reranker(UnaryOperator<List<RetrievedDocument>> reranker) Sets a reranker that can reorder or filter retrieved documents.
-
Method Details
-
defaultContext
Sets the default retrieval context.- Parameters:
context- the default context- Returns:
- this builder
-
queryPreprocessor
Sets a query preprocessor (e.g., query expansion, reformulation).- Parameters:
preprocessor- the query transformation function- Returns:
- this builder
-
reranker
Sets a reranker that can reorder or filter retrieved documents.- Parameters:
reranker- the reranking function- Returns:
- this builder
-
build
Builds the pipeline.- Returns:
- a new RAGPipeline
-