f8b21af4be
10_Wiki/Topics 대규모 정리: - 오류 캡처/미완성 stub 문서 227개 제거 - 교차폴더 중복 43클러스터 병합 (63파일 → redirect) - 링크명 정규화: 깨진 링크 수정·redirect 직결·개념 매핑 ~2,400건 - 카테고리 MOC 6개 신규 생성 - Graph 섹션 미해결 related-keyword 링크 10,058건 제거 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
471 lines
13 KiB
Markdown
471 lines
13 KiB
Markdown
---
|
|
id: wiki-2026-0508-ai-and-narrative
|
|
title: AI and Narrative
|
|
category: 10_Wiki/Topics
|
|
status: verified
|
|
canonical_id: self
|
|
aliases: [AI 서사, AI storytelling, generative narrative, interactive fiction, dynamic story, LLM-driven storytelling]
|
|
duplicate_of: none
|
|
source_trust_level: B
|
|
confidence_score: 0.85
|
|
verification_status: conceptual
|
|
tags: [storytelling, narrative, generative-ai, interactive-fiction, game-narrative, screenwriting, llm-creative]
|
|
raw_sources: []
|
|
last_reinforced: 2026-05-09
|
|
github_commit: pending
|
|
inferred_by: Claude Opus 4.7 (manual cleanup 2026-05-09)
|
|
tech_stack:
|
|
language: TS / Python
|
|
framework: LLM API / AI Dungeon-style / Inworld AI / Convai
|
|
---
|
|
|
|
# AI and Narrative
|
|
|
|
## 📌 한 줄 통찰 (The Karpathy Summary)
|
|
> **LLM 의 long-context + creative generation 이 narrative 의 고전 framework (Hero's journey, 3-act structure) + interactive (player choice) 의 결합 의 가능 하게**. AI Dungeon → Inworld → modern LLM narrative game. **Author 의 replacement X, 매 author 의 toolkit ↑**.
|
|
|
|
## 📖 구조화된 지식 (Synthesized Content)
|
|
|
|
### AI 의 narrative 의 role
|
|
|
|
#### 1. Generative author
|
|
- 매 prompt 의 short story / scene / dialogue.
|
|
- Genre adherence (fantasy, romance, sci-fi).
|
|
- Style transfer (매 author 의 voice mimic).
|
|
- 매 chapter 의 outline + draft.
|
|
|
|
#### 2. Structure analyzer
|
|
- 매 thousand book 의 pattern.
|
|
- "Hero's Journey" (Campbell) / "Save the Cat" (Snyder) / 3-act / Pixar 22 rules.
|
|
- 매 plot 의 structural critique.
|
|
- 매 weak point 의 detect.
|
|
|
|
#### 3. Dynamic storyteller (interactive)
|
|
- 매 player choice 의 real-time response.
|
|
- Branching narrative.
|
|
- NPC 의 dynamic dialogue.
|
|
- Persistent world (player action 의 long-term effect).
|
|
|
|
#### 4. World-building assistant
|
|
- Lore generation.
|
|
- 매 character 의 backstory.
|
|
- 매 location 의 description.
|
|
- Naming (character, place).
|
|
|
|
#### 5. Editor / co-author
|
|
- 매 draft 의 critique.
|
|
- Continuity check.
|
|
- Consistency (매 character 의 voice).
|
|
- Pacing analysis.
|
|
|
|
### Narrative theory 의 reference
|
|
|
|
#### Hero's Journey (Campbell)
|
|
1. Ordinary world.
|
|
2. Call to adventure.
|
|
3. Refusal.
|
|
4. Mentor.
|
|
5. Crossing threshold.
|
|
6. Tests.
|
|
7. Approach.
|
|
8. Ordeal.
|
|
9. Reward.
|
|
10. Road back.
|
|
11. Resurrection.
|
|
12. Return with elixir.
|
|
|
|
→ 매 LLM 의 prompt 의 reference.
|
|
|
|
#### 3-Act Structure
|
|
- Act 1: Setup (25%).
|
|
- Act 2: Confrontation (50%).
|
|
- Act 3: Resolution (25%).
|
|
|
|
#### Save the Cat (Snyder, screenwriting)
|
|
- 15 beat structure.
|
|
- Opening Image, Theme Stated, Setup, Catalyst, Debate, Break into Two, ...
|
|
|
|
#### Pixar 22 Rules of Storytelling
|
|
- Emma Coats.
|
|
- 매 rule 의 modern principle.
|
|
|
|
→ 매 framework 의 LLM 의 system prompt.
|
|
|
|
### 매 application
|
|
|
|
#### Game (RPG / interactive)
|
|
- AI Dungeon (옛 GPT-2/3 era).
|
|
- Modern: 매 game 의 LLM-driven NPC dialogue.
|
|
- Inworld AI / Convai (game 의 production).
|
|
- Ubisoft Sam, Roblox AI characters.
|
|
|
|
#### Screenwriting / scriptwriting
|
|
- ChatGPT / Claude 의 plot ideation.
|
|
- Sudowrite (novelist tool).
|
|
- Final Draft AI.
|
|
- 매 writers' strike (2023) 의 AI 의 limit 의 contract.
|
|
|
|
#### Novel / literary
|
|
- NovelAI (long-form fiction).
|
|
- Sudowrite.
|
|
- 매 self-publish 의 AI assist.
|
|
|
|
#### Education / training
|
|
- 매 historical scenario 의 simulation.
|
|
- 매 medical patient interview practice.
|
|
- 매 language learning context.
|
|
|
|
#### Marketing / advertising
|
|
- 매 brand story.
|
|
- 매 customer journey 의 narrative.
|
|
|
|
### 매 technical challenge
|
|
|
|
#### 1. Long context / consistency
|
|
- 매 100k+ token 의 narrative 의 maintain.
|
|
- 매 character 의 voice 의 consistency.
|
|
- 매 timeline / continuity.
|
|
|
|
→ Modern: Claude Opus 200k context 의 도움. 매 plot seed 의 system prompt.
|
|
|
|
#### 2. Branching state
|
|
- 매 player choice 의 effect 의 track.
|
|
- 매 world state 의 mutation.
|
|
- 매 cycle 의 manageable.
|
|
|
|
→ State machine + LLM 의 hybrid.
|
|
|
|
#### 3. Quality vs creativity
|
|
- 매 LLM 의 generic / cliche.
|
|
- 매 author 의 voice 의 unique.
|
|
- 매 fine-tune / prompting 의 distinct.
|
|
|
|
#### 4. Conflict / tension
|
|
- 매 narrative 의 conflict 의 essential.
|
|
- 매 LLM 의 default 의 conflict-avoidant (helpful, harmless).
|
|
- 매 prompt 의 explicit conflict instruction.
|
|
|
|
#### 5. Hallucination 의 narrative 의 fit
|
|
- 매 fact-based (history) = bug.
|
|
- 매 fiction = feature.
|
|
|
|
### Modern tools
|
|
|
|
#### Inworld AI
|
|
- 매 game NPC 의 dialogue.
|
|
- 매 character 의 personality + memory.
|
|
- Unity / Unreal 통합.
|
|
|
|
#### Convai
|
|
- 매 NPC 의 voice + animation.
|
|
- Real-time conversation.
|
|
|
|
#### Sudowrite
|
|
- Novelist 의 collaboration tool.
|
|
- Style 의 maintain.
|
|
- Beat sheet generation.
|
|
|
|
#### NovelCrafter
|
|
- 매 novel 의 long-form structure.
|
|
- Character / world tracking.
|
|
|
|
#### Charisma.ai
|
|
- Interactive narrative scripting.
|
|
|
|
### 매 author 의 perspective
|
|
|
|
#### "AI 의 author replace" 의 myth
|
|
- 매 generic LLM output 의 cliche.
|
|
- 매 unique voice / experience 의 human.
|
|
- 매 emotional truth 의 lived experience.
|
|
|
|
#### "AI 의 author augment" 의 reality
|
|
- 매 brainstorm 의 speed.
|
|
- 매 draft 의 boilerplate.
|
|
- 매 research / world-building.
|
|
- 매 tedious continuity check.
|
|
|
|
→ Mollick "Co-Intelligence" 식.
|
|
|
|
### 매 ethical question
|
|
|
|
#### 저작권 / IP
|
|
- 매 LLM 의 training 의 copyrighted text.
|
|
- 매 generated text 의 attribution.
|
|
- 매 country 의 different (US human authorship requirement).
|
|
|
|
#### 노동 / displacement
|
|
- WGA strike (2023) 의 contract.
|
|
- 매 freelance writer 의 market change.
|
|
|
|
#### Authenticity / disclosure
|
|
- 매 AI-generated 의 label.
|
|
- 매 reader 의 informed.
|
|
|
|
#### Bias 의 narrative
|
|
- 매 LLM 의 training data 의 bias.
|
|
- 매 stereotype 의 perpetuate.
|
|
- 매 underrepresented voice 의 absence.
|
|
|
|
## 💻 패턴 (Code + Prompts)
|
|
|
|
### Beat sheet generator
|
|
```python
|
|
def generate_beat_sheet(genre, premise):
|
|
prompt = f"""
|
|
Generate a 15-beat sheet for a {genre} story.
|
|
Premise: {premise}
|
|
|
|
Use Save the Cat structure:
|
|
1. Opening Image
|
|
2. Theme Stated
|
|
3. Setup (3 character, world)
|
|
4. Catalyst (inciting incident)
|
|
5. Debate
|
|
6. Break into Two
|
|
7. B Story
|
|
8. Fun and Games
|
|
9. Midpoint
|
|
10. Bad Guys Close In
|
|
11. All Is Lost
|
|
12. Dark Night of the Soul
|
|
13. Break into Three
|
|
14. Finale
|
|
15. Final Image
|
|
|
|
Format: numbered list, 1-2 sentences each.
|
|
"""
|
|
return llm.complete(prompt)
|
|
```
|
|
|
|
### NPC dynamic dialogue
|
|
```typescript
|
|
class NPC {
|
|
personality: string;
|
|
memory: string[] = [];
|
|
relationships: Map<string, number> = new Map();
|
|
|
|
async respond(playerInput: string, context: GameState): Promise<string> {
|
|
const systemPrompt = `
|
|
You are ${this.name}, a ${this.personality} character in ${context.location}.
|
|
Your memories: ${this.memory.slice(-10).join('. ')}
|
|
Your feeling toward player: ${this.relationships.get('player') ?? 0}/100.
|
|
|
|
Reply in 1-3 sentences. Stay in character. React to player tone.
|
|
`;
|
|
|
|
const response = await llm.complete({
|
|
system: systemPrompt,
|
|
user: playerInput,
|
|
});
|
|
|
|
// Update memory
|
|
this.memory.push(`Player said: ${playerInput}. I replied: ${response}`);
|
|
this.updateRelationship(playerInput, response);
|
|
|
|
return response;
|
|
}
|
|
}
|
|
```
|
|
|
|
### Branching narrative state machine
|
|
```ts
|
|
interface StoryNode {
|
|
id: string;
|
|
text: string;
|
|
choices: Choice[];
|
|
state_changes: Partial<WorldState>;
|
|
}
|
|
|
|
interface Choice {
|
|
text: string;
|
|
next: string;
|
|
requires?: (state: WorldState) => boolean;
|
|
}
|
|
|
|
class StoryEngine {
|
|
private currentNode: StoryNode;
|
|
private state: WorldState = {};
|
|
|
|
async advance(choice: Choice) {
|
|
Object.assign(this.state, this.currentNode.state_changes);
|
|
|
|
// 매 dynamic = LLM 가 choose 미리 정의 X 의 case
|
|
if (choice.dynamic) {
|
|
const next = await this.generateDynamicNode(choice);
|
|
this.currentNode = next;
|
|
} else {
|
|
this.currentNode = this.nodes[choice.next];
|
|
}
|
|
}
|
|
|
|
async generateDynamicNode(choice: Choice): Promise<StoryNode> {
|
|
const prompt = `
|
|
Continue this story.
|
|
Current state: ${JSON.stringify(this.state)}
|
|
Player chose: ${choice.text}
|
|
|
|
Generate next scene (200 words) + 3 player choices.
|
|
Format: JSON { text, choices: [{ text, next }] }
|
|
`;
|
|
return JSON.parse(await llm.complete(prompt));
|
|
}
|
|
}
|
|
```
|
|
|
|
### Long-context consistency (RAG)
|
|
```ts
|
|
// 매 chapter 의 vector embed
|
|
const chapters = await Promise.all(
|
|
chapters.map(async c => ({
|
|
id: c.id,
|
|
summary: await llm.summarize(c.text),
|
|
embedding: await embed(c.summary),
|
|
}))
|
|
);
|
|
|
|
// 매 새 chapter 의 generation 시 relevant 매 retrieval
|
|
async function generateNextChapter(prompt: string) {
|
|
const relevant = await vectorSearch(prompt, chapters, k=5);
|
|
const context = relevant.map(c => c.summary).join('\n\n');
|
|
|
|
return llm.complete({
|
|
system: `Continue the novel. Relevant prior chapters:\n${context}`,
|
|
user: prompt,
|
|
});
|
|
}
|
|
```
|
|
|
|
### Character voice consistency
|
|
```ts
|
|
const characterVoices = {
|
|
alice: {
|
|
style: 'verbose, academic, uses Latin phrases',
|
|
examples: ['Nevertheless, I posit that...', 'Mutatis mutandis, ...'],
|
|
},
|
|
bob: {
|
|
style: 'terse, sarcastic, working-class',
|
|
examples: ['Yeah, sure, whatever.', 'Tell me something I don't know.'],
|
|
},
|
|
};
|
|
|
|
function generateDialogue(character: string, situation: string) {
|
|
const voice = characterVoices[character];
|
|
return llm.complete({
|
|
system: `${character} speaks: ${voice.style}. Examples: ${voice.examples.join(' / ')}`,
|
|
user: `Situation: ${situation}. ${character}'s response:`,
|
|
});
|
|
}
|
|
```
|
|
|
|
### Conflict injection
|
|
```python
|
|
def inject_conflict(scene_description):
|
|
prompt = f"""
|
|
Scene: {scene_description}
|
|
|
|
This scene is too peaceful. Add ONE concrete conflict:
|
|
- Internal (character doubt)
|
|
- Interpersonal (disagreement)
|
|
- External (threat, obstacle)
|
|
|
|
Rewrite the scene with the conflict integrated naturally.
|
|
"""
|
|
return llm.complete(prompt)
|
|
```
|
|
|
|
→ LLM 의 default 의 conflict-avoidance 의 fix.
|
|
|
|
### Style transfer (author voice)
|
|
```python
|
|
def write_in_style(content, style_examples):
|
|
prompt = f"""
|
|
Style examples (mimic the voice):
|
|
{chr(10).join(style_examples)}
|
|
|
|
Now rewrite this in the same style:
|
|
{content}
|
|
"""
|
|
return llm.complete(prompt)
|
|
```
|
|
|
|
### Plot hole detector
|
|
```python
|
|
def detect_plot_holes(synopsis):
|
|
prompt = f"""
|
|
Read this story synopsis and identify plot holes / inconsistencies.
|
|
{synopsis}
|
|
|
|
Format: numbered list of issues.
|
|
For each: Where? What's the issue? How to fix?
|
|
"""
|
|
return llm.complete(prompt)
|
|
```
|
|
|
|
## 🤔 의사결정 기준 (Decision Criteria)
|
|
|
|
| 작업 | 추천 |
|
|
|---|---|
|
|
| Game NPC dialogue | Inworld / Convai / custom LLM |
|
|
| Novel writing | Sudowrite / NovelCrafter |
|
|
| Screenwriting | ChatGPT / Claude (with structure prompt) |
|
|
| Branching narrative | State machine + LLM hybrid |
|
|
| Long story consistency | RAG + chapter summaries |
|
|
| Character voice | Few-shot example + style transfer |
|
|
| Worldbuilding | LLM ideation + human curation |
|
|
|
|
**기본값**: Author 의 brainstorm + draft + edit 의 round-trip. 매 final = human.
|
|
|
|
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
|
|
- **AI 의 narrative 의 cliche tendency**: 매 default 가 generic. 매 prompt engineering + curation 필요.
|
|
- **Long context 의 consistency**: 매 model 의 context window 의 한계. RAG / summary 의 essential.
|
|
- **Branching의 explosion**: 매 choice = 2x state. 매 manageable design 필요.
|
|
- **Author 의 voice vs efficiency**: 매 unique 의 ↑ = manual ↑.
|
|
- **Copyright / training data**: 매 LLM 의 training 의 lawsuit.
|
|
- **WGA / writer 의 contract**: 매 industry change.
|
|
|
|
## 🔗 지식 연결 (Graph)
|
|
- 부모: [[Generative-AI]]
|
|
- 변형: [[Interactive-Fiction]]
|
|
|
|
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
|
|
|
|
**언제 이 지식을 쓰는가:**
|
|
- 매 game 의 narrative system design.
|
|
- 매 author 의 LLM-augmented workflow.
|
|
- 매 interactive fiction 의 architecture.
|
|
- 매 NPC dialogue system.
|
|
- 매 worldbuilding pipeline.
|
|
|
|
**언제 쓰면 안 되는가:**
|
|
- 매 author 의 full replacement (cliche risk).
|
|
- Specific copyright / legal advice.
|
|
- 매 highly specific (ghost writing for celebrity).
|
|
- 매 sensitive topic (trauma, mental health) 의 AI-only.
|
|
|
|
## ❌ 안티패턴 (Anti-Patterns)
|
|
- **AI generate 의 raw publish**: cliche / quality ↓.
|
|
- **No human edit**: voice 의 generic.
|
|
- **Long context 의 raw dump**: 매 token 폭발 + quality ↓. RAG / summary.
|
|
- **Branching 의 unmanaged explosion**: 매 path 의 unmanageable.
|
|
- **Character voice 의 inconsistent**: 매 reader 의 immersion break.
|
|
- **No conflict / tension**: 매 LLM default 의 boring story.
|
|
- **Plot hole 의 review skip**: 매 inconsistency 의 reader confusion.
|
|
- **Disclosure 부족**: 매 AI use 의 transparency.
|
|
|
|
## 🧪 검증 상태 (Validation)
|
|
- **정보 상태:** verified (concept-level).
|
|
- **출처 신뢰도:** B (Joseph Campbell, Blake Snyder, Brandon Sanderson 의 lectures, OpenAI / Anthropic creative writing docs).
|
|
- **검토 이유:** Manual cleanup. Narrative theory 가 안정. AI tool 가 evolving.
|
|
|
|
## 🧬 중복 검사 (Duplicate Check)
|
|
- **기존 유사 문서:** [[Storytelling]] (parent), [[Game-Narrative]] (related), [[Generative-AI]] (parent).
|
|
- **처리 방식:** KEEP (specific intersection 의 AI + narrative).
|
|
- **처리 이유:** Distinct intersection.
|
|
|
|
## 🕓 변경 이력 (Changelog)
|
|
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|
|
|------|-----------|-----------|--------|
|
|
| 2026-05-08 | P-Reinforce Phase 1 정규화 | UPDATE | A |
|
|
| 2026-05-09 | Manual cleanup — narrative framework + code + tools + 윤리 + 안티패턴 추가 | UPDATE | B |
|