Skip to content

Graphorin API reference v0.4.0


Graphorin API reference / @graphorin/memory / / runIterativeRetrieval

Function: runIterativeRetrieval()

ts
function runIterativeRetrieval<H>(
   query, 
   deps, 
options?): Promise<IterativeRetrievalResult<H>>;

Defined in: packages/memory/src/search/iterative.ts:393

Run the gated grade-then-reformulate loop.

Flow: assess difficulty → retrieve (pass 1) → if not hard or no grader, return single-shot → else grade; if sufficient, return; if weak and a reformulation is offered and the cap is not hit, retrieve again (widened) and re-grade; otherwise abstain.

Type Parameters

Type Parameter
H

Parameters

ParameterType
querystring
depsIterativeRetrievalDeps&lt;H&gt;
optionsIterativeRetrievalOptions

Returns

Promise<IterativeRetrievalResult&lt;H&gt;>

Stable