Add NPC normalization prompt context

This commit is contained in:
2026-07-26 01:27:34 +00:00
parent 8a12c56971
commit 6bd781d344
13 changed files with 619 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
The supplied NPC candidates are below. Use only these display names in the
response.
{{ input "candidates" }}

View File

@@ -0,0 +1,32 @@
id: dnd.npcs.normalize
version: "v1"
default_profile: gemini-2-flash
inputs:
- name: candidates
required: true
content_type: application/json
- name: transcript
required: true
content_type: application/json
messages:
- role: system
content_file: ./sharedassets/common-dnd-system.md
- role: user
content_file: ./sharedassets/common-dnd-identity.md
cache_control:
type: ephemeral
- role: user
content_file: ./task.md
- role: user
content_file: ./instructions.md
cache_control:
type: ephemeral
- role: user
content_file: ./candidates.md
- role: user
content_file: ./sharedassets/common-dnd-transcript.md
output:
format: json
validation_mode: json_schema
schema_path: dnd_npcs_normalize_llm.v1.json
repair_attempts: 0

View File

@@ -0,0 +1,10 @@
Return duplicate groups only when the transcript context clearly establishes a
single individual. Prefer no group when identity is ambiguous.
Copy supplied display names into each group's members. Choose canonical_name
from that same group's supplied members. Prefer a complete stable proper name
over an abbreviation, but prefer an unadorned proper name over that name plus a
contextual class, role, title, or relationship descriptor unless the descriptor
is established as part of the name.
Do not invent names, source references, replacement records, or explanations.

View File

@@ -0,0 +1,2 @@
Identify only supplied NPC display names that clearly refer to the same
individual in the supplied transcript context.

View File

@@ -0,0 +1,24 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "notarius.dnd.npcs.normalize.llm",
"type": "object",
"additionalProperties": false,
"required": ["duplicate_groups"],
"properties": {
"duplicate_groups": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["members", "canonical_name"],
"properties": {
"members": {
"type": "array",
"items": {"type": "string"}
},
"canonical_name": {"type": "string"}
}
}
}
}
}