run_investigation#
- scikitplot.corpus.run_investigation(session, retrieve, *, plan=None, min_evidence=2, required_entities=())[source]#
Run the bounded retrieve/evaluate/refine loop (autonomy level A2).
- Parameters:
- sessionAgenticRetrievalSession
- retrievecallable
str -> RetrievalResponse. Supplied by the caller, so this loop performs no I/O of its own.- planRoutePlan or None, optional
Defaults to
route.- min_evidenceint, optional
Distinct documents required for sufficiency.
- required_entitiesiterable of str, optional
- Returns:
- InvestigationOutcome
Always carrying a
StopReason.
- Parameters:
- Return type:
Notes
Developer. No-progress detection compares the
doc_idset between rounds – free, becausedoc_idis stable and content-derived, and it gives a provable upper bound on iterations independent of budget exhaustion. A loop whose stopping condition depends on a model call is one whose termination cannot be proven.