-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathAttachmentPrompts.cs
More file actions
59 lines (51 loc) · 2.49 KB
/
AttachmentPrompts.cs
File metadata and controls
59 lines (51 loc) · 2.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
namespace Unity.GrantManager.AI
{
internal static class AttachmentPrompts
{
public static readonly string SystemPrompt = PromptHeader.Build(
"You are a professional grant analyst for the BC Government.",
"Produce a concise reviewer-facing summary of the provided attachment context.");
public static readonly string SystemPromptV0 = PromptHeader.Build(
"You are a professional grant analyst for the BC Government.",
"Produce a concise reviewer-facing summary of the provided attachment context.");
public const string OutputSection = @"OUTPUT
{
""summary"": ""<string>""
}";
public const string RulesSection = "- Use only ATTACHMENT as evidence.\n"
+ "- If ATTACHMENT.text is present, summarize actual content.\n"
+ "- If ATTACHMENT.text is null or empty, provide a conservative file-level summary.\n"
+ PromptCoreRules.NoInvention + "\n"
+ @"- Write 1-2 complete sentences.
- Summary must be grounded in concrete ATTACHMENT evidence.
- Return exactly one object with only the key: summary.
"
+ PromptCoreRules.MinimumNarrativeWords + "\n"
+ PromptCoreRules.ExactOutputShape + "\n"
+ PromptCoreRules.NoExtraOutputKeys + "\n"
+ PromptCoreRules.ValidJsonOnly + "\n"
+ PromptCoreRules.PlainJsonOnly;
public const string OutputSectionV0 = @"OUTPUT
- Plain text only
- 1-2 complete sentences";
public const string RulesSectionV0 = @"RULES
- Use only the provided attachment context as evidence.
- If text content is present, summarize the actual content.
- If text content is missing or empty, provide a conservative metadata-based summary.
- Do not invent missing details.
- Keep the summary specific, concrete, and reviewer-facing.
- Return plain text only (no markdown, bullets, or JSON).";
public static string GetSystemPrompt(bool useV0) => useV0 ? SystemPromptV0 : SystemPrompt;
public static string GetOutputSection(bool useV0) => useV0 ? OutputSectionV0 : OutputSection;
public static string GetRulesSection(bool useV0) => useV0 ? RulesSectionV0 : RulesSection;
public static string BuildUserPrompt(string attachmentPayloadJson)
{
return BuildUserPrompt(attachmentPayloadJson, useV0: false);
}
public static string BuildUserPrompt(string attachmentPayloadJson, bool useV0)
{
return $@"ATTACHMENT
{attachmentPayloadJson}";
}
}
}