pub struct AdaptiveLlmOperatorProvider { /* private fields */ }Expand description
Adaptive LLM Operator Provider
AdaptiveOperatorProvider をベースに、LLM による戦略レビューを組み合わせる。
§動作
- 通常: AdaptiveOperatorProvider のルールベース判断
- レビュー条件を満たした時: LLM に問い合わせ(同期ブロック、~100ms)
- LLM が変更を推奨 + 信頼度が閾値以上: 戦略を切り替え
- LLM エラー時: AdaptiveOperatorProvider にフォールバック
Implementations§
Source§impl AdaptiveLlmOperatorProvider
impl AdaptiveLlmOperatorProvider
Sourcepub fn new(advisor: Box<dyn StrategyAdvisor>) -> AdaptiveLlmOperatorProvider
pub fn new(advisor: Box<dyn StrategyAdvisor>) -> AdaptiveLlmOperatorProvider
新しい AdaptiveLlmOperatorProvider を作成
Sourcepub fn with_policy(self, policy: ReviewPolicy) -> AdaptiveLlmOperatorProvider
pub fn with_policy(self, policy: ReviewPolicy) -> AdaptiveLlmOperatorProvider
レビューポリシーを設定
Sourcepub fn with_adaptive(
self,
adaptive: AdaptiveOperatorProvider,
) -> AdaptiveLlmOperatorProvider
pub fn with_adaptive( self, adaptive: AdaptiveOperatorProvider, ) -> AdaptiveLlmOperatorProvider
ベースの AdaptiveOperatorProvider を設定
Sourcepub fn with_ucb1_c(self, c: f64) -> AdaptiveLlmOperatorProvider
pub fn with_ucb1_c(self, c: f64) -> AdaptiveLlmOperatorProvider
UCB1 の探索係数を設定
Sourcepub fn llm_override(&self) -> Option<SelectionKind>
pub fn llm_override(&self) -> Option<SelectionKind>
現在の LLM override を取得
Trait Implementations§
Source§impl<R> OperatorProvider<R> for AdaptiveLlmOperatorProviderwhere
R: Rules + 'static,
impl<R> OperatorProvider<R> for AdaptiveLlmOperatorProviderwhere
R: Rules + 'static,
Source§fn provide(
&self,
rules: R,
context: Option<&ProviderContext<'_, ActionNodeData, String, MapNodeState>>,
) -> Operator<RulesBasedMutation, AnySelection, ActionNodeData, String, MapNodeState, R>
fn provide( &self, rules: R, context: Option<&ProviderContext<'_, ActionNodeData, String, MapNodeState>>, ) -> Operator<RulesBasedMutation, AnySelection, ActionNodeData, String, MapNodeState, R>
Operator を構築
Source§fn reevaluate(
&self,
operator: &mut Operator<RulesBasedMutation, AnySelection, ActionNodeData, String, MapNodeState, R>,
context: &ProviderContext<'_, ActionNodeData, String, MapNodeState>,
)
fn reevaluate( &self, operator: &mut Operator<RulesBasedMutation, AnySelection, ActionNodeData, String, MapNodeState, R>, context: &ProviderContext<'_, ActionNodeData, String, MapNodeState>, )
Selection を再評価して切り替え
Auto Trait Implementations§
impl !Freeze for AdaptiveLlmOperatorProvider
impl !RefUnwindSafe for AdaptiveLlmOperatorProvider
impl Send for AdaptiveLlmOperatorProvider
impl Sync for AdaptiveLlmOperatorProvider
impl Unpin for AdaptiveLlmOperatorProvider
impl !UnwindSafe for AdaptiveLlmOperatorProvider
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more