fix
This commit is contained in:
@@ -56,7 +56,7 @@ type DefaultTemplate struct {
|
||||
// Used by local A1/Demo prompt repair and seed-a1 overlays.
|
||||
const CategoryEnhanceUserTemplate = `Your reply is parsed as JSON {"name":"string","description":"string"} only (system schema). Write name and description in {{language}} (do not hardcode a language).
|
||||
- name: short retail title; follow any Title formula constraints that follow; use Attrs
|
||||
- description: prefer 1-3 factual paragraphs as ONE string; limited HTML (<h2><p><ul><li>) is allowed if needed — do NOT emit a competing full HTML document, <name>/<metaDescription> blocks, or separate schema
|
||||
- description: when a Description formula follows, emit ONE HTML string covering each section in order (tags matching type: h1/h2/h3/h4, p, ul); otherwise prefer 1-3 factual paragraphs as ONE string with limited HTML (<h2><p><ul><li>) — do NOT emit a competing full HTML document, <name>/<metaDescription> blocks, or separate schema
|
||||
|
||||
Category: {{category}}
|
||||
Name: {{name}}
|
||||
@@ -84,8 +84,8 @@ Rules:
|
||||
- Reply with ONLY JSON (no markdown)
|
||||
- Schema: {"name":"string","description":"string"}
|
||||
- name: short retail title
|
||||
- description: 1-2 factual sentences; never copy name as description
|
||||
- When Desc is empty or the same as Name, write 1-2 factual sentences from Category and Attrs only (do not invent specs)
|
||||
- description: follow any Description formula in the user message (structured HTML sections); otherwise 1-3 factual paragraphs; never copy name as description
|
||||
- When Desc is empty or the same as Name, write from Category and Attrs only (do not invent specs); still obey a Description formula when present
|
||||
- Write name and description in {{language}}
|
||||
Example:
|
||||
{"name":"Acme Widget Pro","description":"Durable widget for everyday use. Clear specs, ready to ship."}
|
||||
|
||||
@@ -56,4 +56,10 @@ func TestBuiltInProductEnhanceUsesSharedUserTemplate(t *testing.T) {
|
||||
if def.UserTemplate != CategoryEnhanceUserTemplate {
|
||||
t.Fatalf("UserTemplate must be CategoryEnhanceUserTemplate")
|
||||
}
|
||||
if strings.Contains(def.SystemTemplate, "1-2 factual sentences") {
|
||||
t.Fatal("system template must not force 1-2 sentences over category Description formulas")
|
||||
}
|
||||
if !strings.Contains(strings.ToLower(def.SystemTemplate), "description formula") {
|
||||
t.Fatal("system template should defer to Description formula when present")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user