Refactor the dnd scene_map prompt to use the common cached system message and transcript
This commit is contained in:
@@ -2,6 +2,6 @@ id: claude-fable-latest
|
||||
endpoint: https://openrouter.ai/api/v1
|
||||
model: "~anthropic/claude-fable-latest"
|
||||
reasoning_effort: high
|
||||
timeout_seconds: 360
|
||||
timeout_seconds: 600
|
||||
api_key_env: OPENROUTER_API_KEY
|
||||
service_tier: flex
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
TASK: Based upon the provided transcript, produce a polished D&D gameplay meta-analysis that evaluates how {{ .character_name }} was played in this session compared to how an experienced optimization-minded player might have approached the same situations.
|
||||
TASK: Based upon the provided transcript, produce a polished D&D gameplay meta-analysis that evaluates how {{ .character_name }} was played in this session compared to how an experienced, optimization-minded player might have approached the same situations.
|
||||
|
||||
Use the following player list and party roster to resolve speakers and character references in the transcript:
|
||||
|
||||
{{ input "players" }}
|
||||
|
||||
{{ input "party" }}
|
||||
|
||||
A summary of the previous D&D session may also be provided for context. If present, use it to understand the party’s starting situation, ongoing plot threads, recurring NPCs, and target recap style. Do not treat the previous recap as evidence of what happened in the current session.
|
||||
A summary of the previous D&D session may also be provided for context. If present, use it to understand the party’s starting situation, ongoing plot threads, recurring NPCs, and whether the player may have already depleted their resources (such as spells, class features, or hitpoints) prior to the start of the current session.
|
||||
|
||||
Next, you will be provided with detailed instructions with respect to preparation of the meta-analysis.
|
||||
@@ -1,7 +1,11 @@
|
||||
You are an expert in Dungeons & Dragons gameplay, writing, and analysis. You will be provided with an audio transcript of a D&D gameplay session. Then, the user will ask you to perform a task based upon the transcript.
|
||||
|
||||
You may be asked to analyze the transcript from either an in-universe perspective or a real-world/metagame perspective. Your assigned task may involve careful analysis, highly creative writing, or a combination thereof.
|
||||
Note that the transcript may contain transcription errors, repeated lines, incomplete sentences, and occasional misheard proper nouns. You may assume that speaker identity is accurate.
|
||||
|
||||
Pay careful attention to the task assigned to you by the user, and follow the provided instructions precisely.
|
||||
Use the following player list and party roster to resolve speakers and character references:
|
||||
|
||||
Note that the transcript may contain transcription errors, repeated lines, incomplete sentences, and occasional misheard proper nouns. You may assume that speaker identity is accurate.
|
||||
{{ input "players" }}
|
||||
|
||||
{{ input "party" }}
|
||||
|
||||
Pay careful attention to the task assigned to you by the user, and follow the provided instructions precisely.
|
||||
@@ -1,22 +1,4 @@
|
||||
Generate a structured scene map for the provided D&D session transcript.
|
||||
|
||||
This is an intermediate artifact for an automated analysis pipeline. Your task is only to divide the transcript into coherent scenes. Do not produce a session recap, character analysis, tactical analysis, continuity analysis, or recommendations.
|
||||
|
||||
Use the transcript as the source of truth. Optional metadata, character roster, and glossary are provided only to help identify speakers, characters, places, factions, spells, items, and proper nouns.
|
||||
|
||||
Return only valid JSON matching the provided JSON Schema.
|
||||
|
||||
Use the following party roster to resolve speakers and character references:
|
||||
|
||||
- Mike Brown: DM
|
||||
- Eric Rakestraw: Player (Hrank Greenfield, Nature Cleric of Chauntea)
|
||||
- Adam Rakestraw: Player (Alan Hohey, Druid)
|
||||
- Zach Anthony: Player (Svend Balderk, Barbarian)
|
||||
- Clint Twellman: Player (Popov, Paladin)
|
||||
|
||||
Task:
|
||||
|
||||
Divide the transcript into sequential, contiguous, non-overlapping scenes.
|
||||
INSTRUCTIONS: Your task is to divide the provided transcript into sequential, contiguous, non-overlapping scenes.
|
||||
|
||||
A scene is a coherent unit of play. A new scene should usually begin when there is a meaningful change in location, objective, threat, activity, encounter, or mode of play.
|
||||
|
||||
@@ -61,44 +43,16 @@ For each scene:
|
||||
|
||||
Primary mode guidance:
|
||||
|
||||
Use Recap for opening recap, initiative setup, session framing, or immediate continuation from prior events.
|
||||
|
||||
Use Combat when active combat or combat-resolution mechanics dominate.
|
||||
|
||||
Use Social when conversation, negotiation, persuasion, interrogation, or NPC interaction dominates.
|
||||
|
||||
Use Exploration when the party is investigating, scouting, navigating, searching, or probing the environment.
|
||||
|
||||
Use Travel when movement between locations is the main activity.
|
||||
|
||||
Use Planning when the party is primarily discussing options or choosing a course of action.
|
||||
|
||||
Use Preparation when the party is actively preparing for an upcoming combat, journey, encounter, or other event.
|
||||
|
||||
Use Downtime when the party is engaged in downtime activities.
|
||||
|
||||
Use Rest when resting, healing, resource recovery, or post-encounter recovery dominates.
|
||||
|
||||
Use Rules only when table-level rules, mechanics, or adjudication dominate enough to form their own scene.
|
||||
|
||||
Use Mixed only when no single mode clearly dominates.
|
||||
- Use Recap for opening recap, initiative setup, session framing, or immediate continuation from prior events.
|
||||
- Use Discussion when the party is primarily discussing options or choosing a course of action.
|
||||
- Use Combat when active combat or combat-resolution mechanics dominate.
|
||||
- Use Narrative for all other types of non-combat gameplay, including exploration, social interactions, shopping, preparing for battle, downtime, and so on.
|
||||
|
||||
Session scope requirements:
|
||||
|
||||
In session_scope.source_description, briefly describe the transcript reviewed.
|
||||
|
||||
In session_scope.first_segment_id, provide the first segment ID covered by the scene map.
|
||||
|
||||
In session_scope.last_segment_id, provide the last segment ID covered by the scene map.
|
||||
|
||||
In session_scope.limitations, list any limitations that affect scene segmentation, such as:
|
||||
- missing prior-session context
|
||||
- unclear speaker attribution
|
||||
- overlapping speech
|
||||
- map-dependent positioning
|
||||
- visual tabletop references not visible in the transcript
|
||||
- ambiguous transitions
|
||||
- uncertain proper nouns
|
||||
- In session_scope.source_description, briefly describe the transcript reviewed.
|
||||
- In session_scope.first_segment_id, provide the first segment ID covered by the scene map.
|
||||
- In session_scope.last_segment_id, provide the last segment ID covered by the scene map.
|
||||
|
||||
Boundary caveats:
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
You are a careful transcript segmentation assistant.
|
||||
|
||||
Your job is to divide a D&D session transcript into coherent scenes for downstream analysis.
|
||||
|
||||
Follow the user’s instructions exactly. Use only the provided transcript and metadata. Do not invent facts, infer campaign history, analyze character performance, or produce a narrative recap.
|
||||
|
||||
Return only valid JSON that conforms to the requested schema. Do not include Markdown, comments, explanations, or text outside the JSON object.
|
||||
7
prompts/pipeline-dnd/analyze/scene_map/scene_map.task.md
Normal file
7
prompts/pipeline-dnd/analyze/scene_map/scene_map.task.md
Normal file
@@ -0,0 +1,7 @@
|
||||
TASK: Generate a structured JSON scene map for the provided D&D session transcript.
|
||||
|
||||
This is an intermediate artifact for an automated analysis pipeline. Your task is to divide the transcript into sequential, contiguous, non-overlapping scenes.
|
||||
|
||||
Return only valid JSON matching the provided JSON Schema.
|
||||
|
||||
Next, you will be provided with detailed instructions with respect to preparation of the strucured JSON scene map.
|
||||
@@ -1,6 +1,6 @@
|
||||
id: dnd.scene_map
|
||||
version: "1.0.0"
|
||||
default_profile: gemma-4-31b
|
||||
default_profile: nemotron-3-ultra
|
||||
description: Generates a D&D session scene map, using a transcript as input.
|
||||
inputs:
|
||||
- name: transcript
|
||||
@@ -9,18 +9,18 @@ inputs:
|
||||
description: Structured recap source transcript
|
||||
messages:
|
||||
- role: system
|
||||
content_file: ./scene_map.system.md
|
||||
- role: user
|
||||
content_file: ./scene_map.user.md
|
||||
content_file: ../common/transcript.system.md
|
||||
- role: user
|
||||
content: |
|
||||
<<<CURRENT_SESSION_TRANSCRIPT
|
||||
|
||||
{{input "transcript"}}
|
||||
|
||||
CURRENT_SESSION_TRANSCRIPT>>>
|
||||
- role: user
|
||||
content_file: ./scene_map.task.md
|
||||
- role: user
|
||||
content_file: ./scene_map.instructions.md
|
||||
output:
|
||||
format: json
|
||||
validation_mode: json_schema
|
||||
schema_path: automation-pipeline-dnd/analyze/scene_map.schema.json
|
||||
repair_attempts: 0
|
||||
repair_attempts: 2
|
||||
@@ -1,11 +1,5 @@
|
||||
TASK: Produce a polished in-universe recap of the provided Dungeons & Dragons session transcript.
|
||||
|
||||
Use the following player list and party roster to resolve speakers and character references:
|
||||
|
||||
{{ input "players" }}
|
||||
|
||||
{{ input "party" }}
|
||||
|
||||
A summary of the previous D&D session may also be provided for context. If present, use it to understand the party’s starting situation, ongoing plot threads, recurring NPCs, and target recap style. Do not treat the previous recap as evidence of what happened in the current session.
|
||||
|
||||
Next, you will be provided with detailed instructions with respect to preparation of the polished in-universe recap.
|
||||
@@ -36,13 +36,6 @@
|
||||
"last_segment_id": {
|
||||
"type": "integer",
|
||||
"description": "The final transcript segment covered by the scene map."
|
||||
},
|
||||
"limitations": {
|
||||
"type": "array",
|
||||
"description": "Known limitations affecting scene segmentation.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -86,16 +79,9 @@
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Recap",
|
||||
"Combat",
|
||||
"Social",
|
||||
"Exploration",
|
||||
"Downtime",
|
||||
"Travel",
|
||||
"Planning",
|
||||
"Preparation",
|
||||
"Rest",
|
||||
"Rules",
|
||||
"Mixed"
|
||||
"Combat",
|
||||
"Narrative"
|
||||
],
|
||||
"description": "The dominant mode of play in the scene."
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user