Centralize NPC LLM assets
This commit is contained in:
42
assets/dnd/npcs/extract/prompts/dnd.npcs.yaml
Normal file
42
assets/dnd/npcs/extract/prompts/dnd.npcs.yaml
Normal file
@@ -0,0 +1,42 @@
|
||||
id: dnd.npcs
|
||||
version: "v1"
|
||||
default_profile: dnd-extraction
|
||||
inputs:
|
||||
- name: transcript
|
||||
required: true
|
||||
content_type: application/json
|
||||
- name: players
|
||||
required: false
|
||||
content_type: text/plain
|
||||
- name: party
|
||||
required: false
|
||||
content_type: text/plain
|
||||
- name: glossary
|
||||
required: false
|
||||
content_type: text/plain
|
||||
messages:
|
||||
- role: system
|
||||
content_file: ./sharedassets/common-dnd-system.md
|
||||
- role: user
|
||||
content_file: ./sharedassets/common-dnd-identity.md
|
||||
- role: user
|
||||
content_file: ./sharedassets/common-dnd-references.md
|
||||
cache_control:
|
||||
type: ephemeral
|
||||
- role: user
|
||||
content_file: ./sharedassets/common-dnd-transcript.md
|
||||
cache_control:
|
||||
type: ephemeral
|
||||
- role: user
|
||||
content_file: ./sharedassets/common-dnd-extraction-evidence.md
|
||||
- role: user
|
||||
content_file: ./task.md
|
||||
- role: user
|
||||
content_file: ./instructions.md
|
||||
cache_control:
|
||||
type: ephemeral
|
||||
output:
|
||||
format: json
|
||||
validation_mode: json_schema
|
||||
schema_path: dnd_npcs_llm.v1.json
|
||||
repair_attempts: 0
|
||||
8
assets/dnd/npcs/extract/prompts/instructions.md
Normal file
8
assets/dnd/npcs/extract/prompts/instructions.md
Normal file
@@ -0,0 +1,8 @@
|
||||
For every NPC record, return only the observed display name and transcript
|
||||
units that support that identity.
|
||||
|
||||
Return no other details or lore inferred from general D&D knowledge. Do not
|
||||
invent a label for an anonymous creature, crowd, or generic role.
|
||||
|
||||
Preserve observed display spelling. Return at least one narrow source range for
|
||||
every record.
|
||||
12
assets/dnd/npcs/extract/prompts/task.md
Normal file
12
assets/dnd/npcs/extract/prompts/task.md
Normal file
@@ -0,0 +1,12 @@
|
||||
Extract the individually identifiable Dungeons & Dragons non-player characters
|
||||
established by the provided transcript and cite where each identity appears.
|
||||
|
||||
Include an in-world non-PC participant only when the transcript gives it a
|
||||
proper name or a stable, individually distinguishing title or alias.
|
||||
|
||||
Exclude human players, transcript speakers, and the GM as out-of-world people,
|
||||
player characters identified by the player or party references, incidental or
|
||||
hypothetical name drops, corrected transcription mistakes, anonymous or
|
||||
generic roles, indistinguishable crowds or groups, invented descriptive labels,
|
||||
and temporary summoned creatures or spell effects without a persistent
|
||||
individual identity.
|
||||
41
assets/dnd/npcs/extract/schemas/dnd_npcs_llm.v1.json
Normal file
41
assets/dnd/npcs/extract/schemas/dnd_npcs_llm.v1.json
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "notarius.dnd.npcs.llm",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["npcs"],
|
||||
"properties": {
|
||||
"npcs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"name",
|
||||
"source_refs"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"source_refs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["start_unit_id", "end_unit_id"],
|
||||
"properties": {
|
||||
"start_unit_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"end_unit_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user