03 — Verify
Source:
callytics-infrastructure/lambda/ai-analysis-processor/src/core/stages/verify.ts:39-52(verified 2026-06-01) Stage in pipeline: Stage 2.5 (boundary check, runs only when Stage 2'ssubcategoryis in the known-confusable set; the callerpipeline.ts:resolveVerifyDecisiondecides whether to adopt the verify call — verify is treated as authoritative only when it disagrees with classify AND clears a confidence bar) — see unified-pipeline-final.md Input: Candidate subcategories (predicted + confusion-pair siblings), contrastive boundary examples for each pair, and the actual transcript (first 3000 chars). User-message builder lives in the same file (buildVerifyUserMessage). Output: JSON{subcategory, confidence, reasoning}wheresubcategoryMUST be one of the provided candidates. Writes to schema: When adopted, overridescalls.primarySubcategory(and downstreamprimaryCategoryif the new subcategory implies a different parent category) — see ../../calls-feature/calls-schema.md
Full system prompt
Output schema
Defined as a Zod schema in verify.ts:19-35:
Field semantics (from Zod .describe()):
subcategory: "The subcategory YOU believe is correct based on transcript evidence. Must be one of the candidates provided."confidence: "How confident you are in your classification. >0.8 = strong signal."reasoning: "Key transcript evidence that led to your conclusion. Reference specific phrases or signals. Keep under 200 words."
User-message shape (from buildVerifyUserMessage)
Confusion pairs and contrastive examples are sourced from confusion-pairs.ts and contrastive-examples.ts respectively.
Cross-references
- Calls schema: ../../calls-feature/calls-schema.md
- Stage 2 (Classify) prompt: 02-classify.md
- Pipeline overview: ../unified-pipeline-final.md