pub struct GroundingEngine<'g> { /* private fields */ }Expand description
Engine that verifies code claims against a CodeGraph.
Wraps a reference to the code graph and implements the Grounded trait
to provide anti-hallucination checks.
§Examples
ⓘ
let engine = GroundingEngine::new(&graph);
match engine.ground_claim("process_payment validates the Decimal amount") {
GroundingResult::Verified { evidence, confidence } => { /* all good */ }
GroundingResult::Partial { unsupported, .. } => { /* some unknown refs */ }
GroundingResult::Ungrounded { claim, suggestions } => { /* hallucination */ }
}Implementations§
Trait Implementations§
Source§impl<'g> Grounded for GroundingEngine<'g>
impl<'g> Grounded for GroundingEngine<'g>
Source§fn ground_claim(&self, claim: &str) -> GroundingResult
fn ground_claim(&self, claim: &str) -> GroundingResult
Verify a natural-language claim about code. Read more
Auto Trait Implementations§
impl<'g> Freeze for GroundingEngine<'g>
impl<'g> RefUnwindSafe for GroundingEngine<'g>
impl<'g> Send for GroundingEngine<'g>
impl<'g> Sync for GroundingEngine<'g>
impl<'g> Unpin for GroundingEngine<'g>
impl<'g> UnsafeUnpin for GroundingEngine<'g>
impl<'g> UnwindSafe for GroundingEngine<'g>
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