Circle V2 API Docs
    Preparing search index...

    V1-faithful session-note validation runner.

    Reproduces the legacy circlehealthai-web audit-chart edge function's prompt + response contract verbatim (compliance-auditor system prompt, pass | fail | needs_review status), instead of v2's tool-using AgentQuestionRunner agent prompt. Used only for session-note-triggered validations (selected via runnerVariant: 'session-note-v1').

    Deliberate deviations from v1 mechanics (the reviewer's concern was the PROMPT, not the retrieval mechanism):

    • The whole cleaned session note is injected directly as the context (this.sessionNoteContext); v1 embedded it and did a 3-chunk similaritySearch. Direct injection feeds the full note and is strictly better.
    • No transformQuestion / expandQuestionWithLLM — v1 ran the raw question.
    • The shared createChartReviewChatModel is reused (gpt-4.1 / temp 0.1; settings-driven maxTokens, defaulting ≥ v1's hard-coded 1000).
    • v1's reason: string[] is folded into the persisted answer; v1's question_ui is dropped; v1's fallback-status second LLM call is replaced by a schema-required status that defaults to needs_review.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    enableNoDocsBailout: boolean
    logger: BaseLogger
    model: ChatOpenAI
    sessionId?: SessionId
    sessionNoteContext?: string
    supabase: SupabaseClient<Database>
    treatmentEpisodeId?: string
    useFullEmrDocuments: boolean

    Methods