Circle V2 API Docs
    Preparing search index...

    Function resolveFormFillingConfig

    • Resolves a (partial) override against the defaults, returning a fully-populated, validated config. Missing keys fall back to their default; invalid values throw.

      Parameters

      • Optionaloverrides: {
            settings?: {
                citationSimilarityThreshold?: number;
                confidenceThreshold?: number;
                enableCitationValidation?: boolean;
                enableConfidenceGate?: boolean;
                enableExclusiveChoiceModeling?: boolean;
                evidenceCharBudget?: number;
                fieldConcurrency?: number;
                fieldTimeoutMs?: number;
                maxCitationsPerField?: number;
                promptCacheKeyBuckets?: number;
                recursionLimit?: number;
                requireCitationForFilled?: boolean;
                requireRetrievalBeforeAnswer?: boolean;
                retryWhenOverBudget?: boolean;
                setupTimeoutMs?: number;
            };
            tools?: { enableListFormFields?: boolean; enableSearchChart?: boolean };
        }
        • Optionalsettings?: {
              citationSimilarityThreshold?: number;
              confidenceThreshold?: number;
              enableCitationValidation?: boolean;
              enableConfidenceGate?: boolean;
              enableExclusiveChoiceModeling?: boolean;
              evidenceCharBudget?: number;
              fieldConcurrency?: number;
              fieldTimeoutMs?: number;
              maxCitationsPerField?: number;
              promptCacheKeyBuckets?: number;
              recursionLimit?: number;
              requireCitationForFilled?: boolean;
              requireRetrievalBeforeAnswer?: boolean;
              retryWhenOverBudget?: boolean;
              setupTimeoutMs?: number;
          }
          • OptionalcitationSimilarityThreshold?: number

            Similarity bar for a quote that fails the exact-substring check. At 1 only an exact normalized match counts; below it a lightly reworded or re-punctuated quote can still verify.

          • OptionalconfidenceThreshold?: number

            Below this self-rated confidence an answered field is downgraded to no_answer.

          • OptionalenableCitationValidation?: boolean

            Verify every cited quote is present in what the agent was actually shown before the answer ships; unverifiable citations are dropped. Off only in tests that stub the transcript.

          • OptionalenableConfidenceGate?: boolean

            Whether confidenceThreshold is enforced at all.

          • OptionalenableExclusiveChoiceModeling?: boolean

            Model a checkbox group carrying v1's exclusivity sentence as a single one-of choice, and strip that sentence from the question shown to the model. When off, the group is answered as independent sub-fields and only the post-hoc exactly-one check applies.

          • OptionalevidenceCharBudget?: number

            Character budget for the evidence corpus retained per field from the tool transcript — the text citations are proven against. It bounds VERIFICATION memory/CPU, not the prompt, so it is set well above a long chart export: a document that overruns it is truncated (not dropped), but a citation quoting past the cut would still fail to verify.

          • OptionalfieldConcurrency?: number

            How many fields are answered at once. v1 ran an uncapped Promise.all over every annotation, so a 60-field form opened 60 concurrent model loops and rate-limited itself.

          • OptionalfieldTimeoutMs?: number

            Wall-clock bound on ONE field, after which it resolves as error and the run continues. A stuck field must not take the other 59 down with it.

          • OptionalmaxCitationsPerField?: number

            Upper bound on citations kept per field. Beyond this the extras are noise, not provenance.

          • OptionalpromptCacheKeyBuckets?: number

            How many promptCacheKey buckets to spread over; 1 is shipped behaviour. See promptCacheKey.ts.

          • OptionalrecursionLimit?: number

            Super-steps per field (a lookup costs two, the answer one). 32 is the most fieldTimeoutMs affords across both guard passes.

          • OptionalrequireCitationForFilled?: boolean

            Downgrade an answered field with no surviving citation to no_answer. This is the hallucination control: a value with nothing behind it is exactly the wrong thing to write onto a form nobody re-reads.

          • OptionalrequireRetrievalBeforeAnswer?: boolean

            Refuse a first pass that made no chart tool call and re-ask once, inside the same fieldTimeoutMs.

          • OptionalretryWhenOverBudget?: boolean

            Re-ask once, with its own fieldTimeoutMs, when a text answer runs past its box's character budget; the shorter answer replaces it only if it fits, else the first answer stands and is flagged.

          • OptionalsetupTimeoutMs?: number

            Wall-clock bound on the run's SETUP — patient context plus vector stores — before any field runs.

        • Optionaltools?: { enableListFormFields?: boolean; enableSearchChart?: boolean }

          Toolset selection. fetch_document is always on — it is how the agent reads anything.

          • OptionalenableListFormFields?: boolean

            Include list_form_fields, so the agent can see the neighbouring fields of the form it is filling. Costs a turn; pays for itself when a field's meaning depends on its siblings.

          • OptionalenableSearchChart?: boolean

            Include search_chart (semantic retrieval across the run's selected documents + EMR).

      Returns {
          settings: {
              citationSimilarityThreshold: number;
              confidenceThreshold: number;
              enableCitationValidation: boolean;
              enableConfidenceGate: boolean;
              enableExclusiveChoiceModeling: boolean;
              evidenceCharBudget: number;
              fieldConcurrency: number;
              fieldTimeoutMs: number;
              maxCitationsPerField: number;
              promptCacheKeyBuckets: number;
              recursionLimit: number;
              requireCitationForFilled: boolean;
              requireRetrievalBeforeAnswer: boolean;
              retryWhenOverBudget: boolean;
              setupTimeoutMs: number;
          };
          tools: { enableListFormFields: boolean; enableSearchChart: boolean };
      }

      • settings: {
            citationSimilarityThreshold: number;
            confidenceThreshold: number;
            enableCitationValidation: boolean;
            enableConfidenceGate: boolean;
            enableExclusiveChoiceModeling: boolean;
            evidenceCharBudget: number;
            fieldConcurrency: number;
            fieldTimeoutMs: number;
            maxCitationsPerField: number;
            promptCacheKeyBuckets: number;
            recursionLimit: number;
            requireCitationForFilled: boolean;
            requireRetrievalBeforeAnswer: boolean;
            retryWhenOverBudget: boolean;
            setupTimeoutMs: number;
        }
        • citationSimilarityThreshold: number

          Similarity bar for a quote that fails the exact-substring check. At 1 only an exact normalized match counts; below it a lightly reworded or re-punctuated quote can still verify.

        • confidenceThreshold: number

          Below this self-rated confidence an answered field is downgraded to no_answer.

        • enableCitationValidation: boolean

          Verify every cited quote is present in what the agent was actually shown before the answer ships; unverifiable citations are dropped. Off only in tests that stub the transcript.

        • enableConfidenceGate: boolean

          Whether confidenceThreshold is enforced at all.

        • enableExclusiveChoiceModeling: boolean

          Model a checkbox group carrying v1's exclusivity sentence as a single one-of choice, and strip that sentence from the question shown to the model. When off, the group is answered as independent sub-fields and only the post-hoc exactly-one check applies.

        • evidenceCharBudget: number

          Character budget for the evidence corpus retained per field from the tool transcript — the text citations are proven against. It bounds VERIFICATION memory/CPU, not the prompt, so it is set well above a long chart export: a document that overruns it is truncated (not dropped), but a citation quoting past the cut would still fail to verify.

        • fieldConcurrency: number

          How many fields are answered at once. v1 ran an uncapped Promise.all over every annotation, so a 60-field form opened 60 concurrent model loops and rate-limited itself.

        • fieldTimeoutMs: number

          Wall-clock bound on ONE field, after which it resolves as error and the run continues. A stuck field must not take the other 59 down with it.

        • maxCitationsPerField: number

          Upper bound on citations kept per field. Beyond this the extras are noise, not provenance.

        • promptCacheKeyBuckets: number

          How many promptCacheKey buckets to spread over; 1 is shipped behaviour. See promptCacheKey.ts.

        • recursionLimit: number

          Super-steps per field (a lookup costs two, the answer one). 32 is the most fieldTimeoutMs affords across both guard passes.

        • requireCitationForFilled: boolean

          Downgrade an answered field with no surviving citation to no_answer. This is the hallucination control: a value with nothing behind it is exactly the wrong thing to write onto a form nobody re-reads.

        • requireRetrievalBeforeAnswer: boolean

          Refuse a first pass that made no chart tool call and re-ask once, inside the same fieldTimeoutMs.

        • retryWhenOverBudget: boolean

          Re-ask once, with its own fieldTimeoutMs, when a text answer runs past its box's character budget; the shorter answer replaces it only if it fits, else the first answer stands and is flagged.

        • setupTimeoutMs: number

          Wall-clock bound on the run's SETUP — patient context plus vector stores — before any field runs.

      • tools: { enableListFormFields: boolean; enableSearchChart: boolean }

        Toolset selection. fetch_document is always on — it is how the agent reads anything.

        • enableListFormFields: boolean

          Include list_form_fields, so the agent can see the neighbouring fields of the form it is filling. Costs a turn; pays for itself when a field's meaning depends on its siblings.

        • enableSearchChart: boolean

          Include search_chart (semantic retrieval across the run's selected documents + EMR).