"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parser = void 0;
const output_parsers_1 = require("langchain/output_parsers");
const zod_1 = require("zod");
/**
 * Structured Output Parser
 * Ensures LLM response follows the format:
 * {
 *   matched_category: string  // One of the provided categories or "None"
 *   match_explanation: string // Brief explanation of the categorization
 * }
 */
const categorizeSchema = zod_1.z.object({
    matched_category: zod_1.z.string().optional().default('None'),
    match_explanation: zod_1.z.string(),
});
exports.parser = output_parsers_1.StructuredOutputParser.fromZodSchema(categorizeSchema);
//# sourceMappingURL=parser.js.map