Class ArrayStrategy.Builder
- java.lang.Object
-
- ai.extend.types.ArrayStrategy.Builder
-
- All Implemented Interfaces:
ArrayStrategy._FinalStage,ArrayStrategy.TypeStage
- Enclosing class:
- ArrayStrategy
public static final class ArrayStrategy.Builder extends java.lang.Object implements ArrayStrategy.TypeStage, ArrayStrategy._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArrayStrategybuild()ArrayStrategy.Builderfrom(ArrayStrategy other)ArrayStrategy._FinalStagetype(ArrayStrategyType type)The strategy type for handling large array use cases.
-
-
-
Method Detail
-
from
public ArrayStrategy.Builder from(ArrayStrategy other)
- Specified by:
fromin interfaceArrayStrategy.TypeStage
-
type
public ArrayStrategy._FinalStage type(@NotNull ArrayStrategyType type)
The strategy type for handling large array use cases. For most use cases this should be left null, or should be set to
large_array_heuristics. If you're unsure of what your use case needs, reach out to the Extend team for help.-
large_array_heuristics: Optimized for documents with very large arrays, but where latency matters.This strategy uses specialized heuristics around chunking, tables, and merging to handle large arrays efficiently over large documents.
-
large_array_max_context: Optimizes for accuracy over latency in documents with very large arrays.This strategy will do multiple passes through the entire document to ensure there is no context loss across any chunks/pages, maximizing accuracy for complex array extraction, but adding material latency. This strategy incurs additional extraction credits when enabled.
-
large_array_overlap_context: Balances accuracy and latency in documents with very large arrays.This strategy will always maintain surrounding/overlapping page context for every chunk/page that is extracted, eliminating array failure modes from context loss across page boundaries.
The strategy type for handling large array use cases. For most use cases this should be left null, or should be set to
large_array_heuristics. If you're unsure of what your use case needs, reach out to the Extend team for help.-
large_array_heuristics: Optimized for documents with very large arrays, but where latency matters.This strategy uses specialized heuristics around chunking, tables, and merging to handle large arrays efficiently over large documents.
-
large_array_max_context: Optimizes for accuracy over latency in documents with very large arrays.This strategy will do multiple passes through the entire document to ensure there is no context loss across any chunks/pages, maximizing accuracy for complex array extraction, but adding material latency. This strategy incurs additional extraction credits when enabled.
-
large_array_overlap_context: Balances accuracy and latency in documents with very large arrays.This strategy will always maintain surrounding/overlapping page context for every chunk/page that is extracted, eliminating array failure modes from context loss across page boundaries.
- Specified by:
typein interfaceArrayStrategy.TypeStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
-
build
public ArrayStrategy build()
- Specified by:
buildin interfaceArrayStrategy._FinalStage
-
-