Circle V2 API Docs
    Preparing search index...

    Type Alias QuestionRunnerOptions

    type QuestionRunnerOptions = {
        enableCalendarAwareness?: boolean;
        enableEpisodePatientBlock?: boolean;
        enableExpandedStatuses?: boolean;
        enableIntentAwarePlanning?: boolean;
        enableMetadataAwareGate?: boolean;
        enableQueryHydration?: boolean;
        enableReviewCriteriaInDocumentSelection?: boolean;
        enableStatusReconciliation?: boolean;
        enableThinRetrievalBailout?: boolean;
        enableTimeFilteringInChartReview?: boolean;
        enableUnlockedRetrieval?: boolean;
        logger?: Logger;
        model: ChatOpenAI;
        patientChartIds?: number[];
        referenceInstant?: Date;
        sessionId?: SessionId;
        sessionNoteContext?: string;
        supabase: SupabaseClient<Database>;
        treatmentEpisodeId?: string;
        useEvalNamespaces?: boolean;
    }
    Index

    Properties

    enableCalendarAwareness?: boolean
    enableEpisodePatientBlock?: boolean
    enableExpandedStatuses?: boolean
    enableIntentAwarePlanning?: boolean

    Feed the classified date intent into the question planner (advisory) and compute that classification ONCE per question, threaded into the answer stage. AND-gated on enableCalendarAwareness at the runner — no effect unless calendar awareness is also on.

    enableMetadataAwareGate?: boolean

    Enrich the document-selection listing with each chart's circle_metadata (level-of-care / program-stay window) so the LLM picks documents with clinical context in view. Pure enrichment — never narrows the candidate set, so it can't starve retrieval of the document holding the answer.

    enableQueryHydration?: boolean

    Hydrate the retrieval query with clinical synonyms ('synonym' mode) instead of the raw question ('none'), so chart phrasings that differ from the question (e.g. "denies SI/HI" vs "suicide risk") still match.

    enableReviewCriteriaInDocumentSelection?: boolean

    Append the template's review criteria to the document-selection prompt so the LLM picks documents relevant to the rubric, not just the question text.

    enableStatusReconciliation?: boolean

    After the answer agent emits a pass/fail status, run a cheap single-shot reconciler (reconcileStatus) over the question + answer prose + citations and OVERWRITE status with the value the answer actually supports. Guards against the answer LLM stamping a label that contradicts its own prose. Off = the emitted status is returned verbatim (today's behavior).

    enableThinRetrievalBailout?: boolean

    Abstain ("insufficient evidence") instead of invoking the answer agent when retrieval returns no usable context — bounds the damage of a recall miss rather than letting the agent fabricate.

    enableTimeFilteringInChartReview?: boolean
    enableUnlockedRetrieval?: boolean

    Drop the hard file_name $in Pinecone filter so semantic retrieval isn't blinded by a wrong/narrow title-based document pick.

    logger?: Logger
    model: ChatOpenAI
    patientChartIds?: number[]

    Reviewer-selected charts; when set they are the entire candidate set.

    referenceInstant?: Date

    Shared reference instant for all date reasoning (prod = now, eval = frozen).

    sessionId?: SessionId

    The id of the session whose note triggered this run. Used by SessionNoteAuditRunner to attribute sources/citations to the session so the UI can deep-link to it.

    sessionNoteContext?: string

    When set, the runner skips EMR/patient_charts + Pinecone retrieval and uses ONLY this (already HTML-cleaned) session-note text as the agent context. Set by the session-note trigger path; unset for patient-level.

    supabase: SupabaseClient<Database>
    treatmentEpisodeId?: string

    When set, scope the run to a single treatment episode: the candidate charts the EMR runner considers are filtered to this episode, so charts from other episodes (and unassigned charts) are never reviewed. Unset for unscoped patient-level reviews.

    useEvalNamespaces?: boolean