mod lookup#
- module lookup#
Prediction trie lookup with three-level fallback chain.
Structs and Unions
- struct PredictionTrieLookup<'a>#
Looks up predictions in a prediction trie with graceful fallback.
Fallback chain:
Exact path + exact call_index
Exact path + predictions_any_index
Deepest ancestor + exact call_index
Deepest ancestor + predictions_any_index
… continue to root …
None (no predictions available)
Implementations
- impl<'a> PredictionTrieLookup<'a>#
Functions
- fn find(&self, path: &[String], call_index: u32) -> Option<&'a LlmCallPrediction>#
Find the best matching prediction for the given path and call index.
Walks the trie following
pathelements, tracking the deepest node that has a prediction. At each node, preferspredictions_by_call_index[call_index]overpredictions_any_index.
- fn new(root: &'a PredictionTrieNode) -> Self#
Create a new lookup over the given trie root.