Interface TreeNavigator
Vectorless retrieval descends a document's structure instead of scoring its fragments: given the node it is standing on and that node's children, a model decides which branch is worth opening for this query. There is no embedding and no similarity score anywhere on the path, which is the point — the passage that answers a question often shares no vocabulary with it.
Providers advertise the model identifiers they serve through
supports(String) and are discovered with
ServiceLoader. TnsAI does not bundle or impersonate an
LLM: provider modules own inference, credentials, transport, lifecycle —
and the cost of a traversal, which is the reason this is an SPI rather than
something tnsai-intelligence calls directly. A traversal spends one
model call per level, so pricing belongs where the pricing is known.
The runtime keeps what a provider cannot be trusted to keep. It bounds
the traversal through TreeNavigator.Request.remainingVisits(), validates every
returned id against the index before moving, and tracks visited nodes so a
provider that loops terminates anyway. A navigator is asked for a judgement,
not given control of the walk.
- Since:
- 0.14.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordWhat the navigator decided to do at one node.static final recordOne node as the navigator sees it.static final recordImmutable input passed to aTreeNavigatorprovider. -
Method Summary
Modifier and TypeMethodDescriptionnavigate(TreeNavigator.Request request) Chooses the next node to open, or stops the descent.booleanReturns whether this provider serves the given model identifier.
-
Method Details
-
supports
Returns whether this provider serves the given model identifier.- Parameters:
model- exact, case-sensitive model identifier- Returns:
truewhen this provider can serve the request
-