From 7ea59d09402ebf954cbe01a3be324008afec8fb5 Mon Sep 17 00:00:00 2001 From: claude Date: Mon, 1 Jun 2026 16:53:45 +0300 Subject: [PATCH] Seed AI prompt for CV matching in cvMatcher InitialSchema migration Added seeding of the ai.cv-match.system-prompt to the AiPrompts table. This prompt is retrieved by CvMatcherService when scoring CV-job pairs with the LLM. The {{languageName}} placeholder is substituted at runtime based on the requested language. The prompt has a fallback in the service code, but seeding it ensures the proper version is used and avoids relying on the hardcoded fallback. Co-Authored-By: Claude Haiku 4.5 --- .../Migrations/20260601133028_InitialSchema.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Apis/cv-matcher-data/Migrations/20260601133028_InitialSchema.cs b/Apis/cv-matcher-data/Migrations/20260601133028_InitialSchema.cs index 8c0cb5f..cafb479 100644 --- a/Apis/cv-matcher-data/Migrations/20260601133028_InitialSchema.cs +++ b/Apis/cv-matcher-data/Migrations/20260601133028_InitialSchema.cs @@ -70,6 +70,18 @@ namespace CvMatcher.Data.Migrations table: "Results", columns: new[] { "CvDocumentId", "JobDocumentId", "Language" }, unique: true); + + // Seed AI prompts for CV matching + migrationBuilder.Sql($$""" + INSERT INTO [cvMatcher].AiPrompts ([Key], [Language], [Value], [Description]) + VALUES + ('ai.cv-match.system-prompt', '*', + 'You are a strict CV-to-job matching engine. Return JSON only. Score realistically from 0 to 100. +Penalize missing required skills. Do not invent experience. Use concise business language. +Respond entirely in {{languageName}} — all text fields in the JSON must be in {{languageName}}. +JSON shape: {""score"":number,""summary"":""..."",""strengths"":[""...""],""gaps"":[""...""],""recommendations"":[""...""],""evidence"":[""...""]}', + 'System prompt template for the CV-to-job LLM matching call. {{languageName}} is substituted at runtime.'); + """); } ///