pub struct FileKnowledgeBase { /* private fields */ }Expand description
JSONL-backed KnowledgeBase (one ExperimentRecord per line).
Default location: .soma/experiments.jsonl.
Implementations§
Source§impl FileKnowledgeBase
impl FileKnowledgeBase
Trait Implementations§
Source§impl KnowledgeBase for FileKnowledgeBase
impl KnowledgeBase for FileKnowledgeBase
Source§fn record(&mut self, experiment: ExperimentRecord) -> Result<()>
fn record(&mut self, experiment: ExperimentRecord) -> Result<()>
Store a new experiment record.
Source§fn all(&self) -> Result<Vec<ExperimentRecord>>
fn all(&self) -> Result<Vec<ExperimentRecord>>
Every record this base holds, in insertion order.
Source§fn refresh(&mut self) -> Result<usize>
fn refresh(&mut self) -> Result<usize>
Pick up records another process appended since this handle was
opened. Returns how many were newly loaded. Read more
Source§fn search(
&self,
query: &str,
max_results: usize,
) -> Result<Vec<ExperimentRecord>>
fn search( &self, query: &str, max_results: usize, ) -> Result<Vec<ExperimentRecord>>
Substring search over name, hypothesis, notes, tags and pipeline. Read more
Source§fn retrieve(&self, query: &RetrievalQuery) -> Result<Vec<ScoredRecord>>
fn retrieve(&self, query: &RetrievalQuery) -> Result<Vec<ScoredRecord>>
Rank records against a query by relevance, structure, recency
and importance. See
crate::retrieval for the formula.Source§fn lineage(&self, id: &str) -> Result<Option<Lineage>>
fn lineage(&self, id: &str) -> Result<Option<Lineage>>
An experiment with its ancestors and descendants.
Source§fn experiments_in_line(&self, line: &str) -> Result<Vec<ExperimentRecord>>
fn experiments_in_line(&self, line: &str) -> Result<Vec<ExperimentRecord>>
List experiments in a research line, ordered chronologically.
Source§fn research_lines(&self) -> Result<Vec<ResearchLine>>
fn research_lines(&self) -> Result<Vec<ResearchLine>>
Get all research lines with trend analysis.
Source§fn promising_lines(&self, metric: &str) -> Result<Vec<ResearchLine>>
fn promising_lines(&self, metric: &str) -> Result<Vec<ResearchLine>>
Find promising research lines (improving trend, high metric values).
Source§fn trajectory(&self, line: &str, metric: &str) -> Result<Vec<(String, f64)>>
fn trajectory(&self, line: &str, metric: &str) -> Result<Vec<(String, f64)>>
Get the metric trajectory for a research line.
Source§fn change_points(
&self,
line: &str,
metric: &str,
threshold: f64,
) -> Result<Vec<ChangePoint>>
fn change_points( &self, line: &str, metric: &str, threshold: f64, ) -> Result<Vec<ChangePoint>>
Detect change points where metrics shifted significantly.
Auto Trait Implementations§
impl Freeze for FileKnowledgeBase
impl RefUnwindSafe for FileKnowledgeBase
impl Send for FileKnowledgeBase
impl Sync for FileKnowledgeBase
impl Unpin for FileKnowledgeBase
impl UnsafeUnpin for FileKnowledgeBase
impl UnwindSafe for FileKnowledgeBase
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