corpus-discovery-dialogue
Guide Socratic discovery of research questions and analytical approaches for text corpus analysis
- Category: discovered
- Tags: github, community
- Version: 1.0.0
- Author: walid
- Downloads: 0
- Updated: 2025-11-22
Download the latest version (v1.0.0) from this page.
SKILL.md
--- name: corpus-discovery-dialogue description: Guide Socratic discovery of research questions and analytical approaches for text corpus analysis version: 1.0.0 author: Anthony Byrnes + Claude Code category: research-methods tags: [narrative-analysis, research-design, socratic-dialogue, corpus-linguistics] dependencies: [] optional_inputs: - corpus_file_path - domain_context estimated_duration: 20-40 minutes --- # Corpus Discovery Dialogue ## Purpose Transform vague interest in a text corpus into concrete, answerable research questions with clear analytical roadmaps. Prevents aimless exploration and "fishing expedition" research. **Core innovation:** Uses Socratic questioning to help researchers articulate what they don't yet consciously know they want to discover. **Core principle:** Discovery before execution. Research questions emerge through dialogue, not pre-formed declarations. The researcher makes all interpretive decisions; this skill guides the process. ## When to Use **Invocation Triggers:** - "Help me explore this corpus" - "What questions should I ask of these [texts/reviews/documents]?" - "Guide me through corpus analysis" - "I have text data but don't know where to start" - "Design a research plan for this corpus" **Use This When:** - Starting corpus analysis with unclear research questions - Have data but uncertain what questions it can answer - Need structure for exploratory research - Want to formulate hypothesis before diving into analysis **Skip This When:** - Research questions already clearly defined - Conducting hypothesis testing (use hypothesis-testing-dialogue instead) - Interpreting existing analysis results (use analysis-interpretation-dialogue instead) ## Input Requirements **Required:** - Corpus description (domain, approximate size, format) - Access to sample texts (at least 3-5 examples for grounding) **Optional:** - `corpus_file_path` - If corpus is in accessible format (JSON, CSV, TXT) - `domain_context` - Background information about the corpus domain - `research_constraints` - Time, computational resources, publication goals **If corpus not yet loaded:** Ask: "Can you share 3-5 example texts from your corpus so I can understand the content?" ## Announce at Start ``` I'm using the Corpus Discovery Dialogue skill to help you formulate research questions and design an analytical approach for your corpus. This process takes 20-40 minutes and involves five phases: 1. Understanding your corpus (5-10 min) 2. Exploring your interests (5-10 min) 3. Formulating questions (5-10 min) 4. Mapping methodologies (5-10 min) 5. Creating research roadmap (5-10 min) We'll move at your pace, with confirmation checkpoints along the way. Let's begin by understanding what you're working with. ``` --- ## The Process ### Phase 0: Context Establishment & Sample Review **Goal:** Establish factual baseline about corpus and ground dialogue in actual texts **Actions:** 1. **Request corpus samples (if not already provided):** ``` To ground our conversation in your actual data, please share 3-5 example texts from your corpus. This helps me: - Understand the domain and content - Suggest appropriate analytical methods - Generate realistic research questions - Ground our dialogue in evidence You can paste the texts directly, provide file paths, or describe the corpus with representative excerpts. ``` 2. **Review samples and extract initial observations:** - Document length range (word counts) - Writing style (formal, informal, technical, narrative) - Content type (descriptive, analytical, evaluative) - Domain-specific terminology - Temporal markers (dates, time references) - Structural patterns 3. **Present initial observations for validation:** ``` ## Initial Observations from Sample Texts Based on the examples you shared, I notice: **Content Type:** [Theater reviews / Business reports / etc.] **Writing Style:** [Evaluative, analytical, narrative-driven] **Length Range:** [~300-700 words per document] **Domain Terminology:** [Performance, staging, direction, etc.] **Time References:** [Dates present, suggest temporal corpus] Does this match your understanding of the full corpus? - Yes → These samples are representative - No → What's different about the full corpus? ``` **Wait for user confirmation before proceeding to Phase 1.** --- ## Phase 1: Corpus Understanding (5-10 minutes) **Goal:** Establish factual baseline about the corpus through structured inquiry **Method:** Ask questions sequentially, one at a time, with structured choices ### 1A. Basic Characteristics ``` What kind of texts make up your corpus? A) Literary texts (novels, poetry, plays, reviews) B) Professional writing (business documents, technical reports) C) Social media / conversational data (tweets, chat logs, forum posts) D) Academic writing (papers, dissertations, grant proposals) E) Historical documents (letters, diaries, archival materials) F) Other: [let me describe] This helps me understand what analytical approaches are appropriate. ``` **Wait for response. Based on answer, follow up with domain-specific clarification if needed.** ### 1B. Corpus Size ``` Approximately how large is your corpus? A) Small (1-50 documents, <50K words) - Suitable for: Close reading + computational validation - Methods: Manual review with computational support B) Medium (50-500 documents, 50K-500K words) - Suitable for: Mixed methods (computational + selective manual review) - Methods: Topic modeling, sentiment analysis, entity extraction C) Large (500-5000 documents, 500K-5M words) - Suitable for: Computational methods with manual validation - Methods: Full NLP pipeline, network analysis, temporal tracking D) Very Large (5000+ documents, 5M+ words) - Suitable for: Fully automated computational approaches - Methods: Large-scale topic modeling, trend analysis, statistical patterns E) I'm not sure yet Why this matters: Corpus size determines which analytical methods are appropriate and how much manual validation is feasible. ``` **Wait for response.** ### 1C. Temporal Span ``` Do your texts span a time period? A) Yes, specific date range: [YYYY-MM-DD to YYYY-MM-DD] B) Yes, approximate span: [e.g., "1990s to 2020s"] C) No, all from same time period D) Unknown / mixed temporal markers If yes: Are you interested in how patterns change over time? - Very interested (temporal evolution is central question) - Somewhat interested (might explore if patterns emerge) - Not interested (time is just a descriptor, not analytic focus) ``` **Wait for response. If temporal interest indicated, note for Phase 3 question generation.** ### 1D. Authorship ``` Who created these texts? A) Single author (one person's writing over time) - Enables: Voice evolution, style development, thematic shifts B) Small group (2-10 identified authors) - Enables: Comparative analysis, author attribution, collaborative patterns C) Large group (institutional/collective authorship) - Enables: Consensus analysis, organizational voice, policy evolution D) Anonymous / crowd-sourced (many unknown authors) - Enables: Cultural patterns, collective discourse, emergence E) Mixed / varies Why this matters: Authorship affects whether you're studying individual voice evolution, group consensus, or broader cultural patterns. ``` **Wait for response.** ### 1E. Structural Format ``` What format is your corpus in? A) Structured data (JSON, CSV, database) with metadata - Metadata available: [dates, categories, author info, etc.] B) Plain text files (.txt, .md) - Organization: [by date / by category / by author / other] C) Rich documents (PDF, DOCX) needing extraction - Extraction needed: Yes, will require preprocessing D) Web pages / HTML needing scraping - Scraping needed: Yes, will require web extraction E) Mixed formats F) Not yet digitized (physical documents) Do you have metadata? (dates, categories, author info, etc.) - Yes, extensive metadata (multiple fields) - Yes, basic metadata (dates only) - No metadata (just text) ``` **Wait for response.** ### 1F. Data Access Confirmation ``` Do you currently have access to the full corpus, or are you still gathering it? A) Full corpus ready (can begin analysis anytime) B) Partial corpus ready (~50-75% collected) C) Still gathering (in early collection phase) D) Need help acquiring/formatting the data If gathering or formatting needed, we can adjust timeline expectations. ``` **Wait for response.** --- **Output: Corpus Profile** After all Phase 1 questions answered, synthesize into structured profile: ```markdown ## Corpus Profile **Domain:** [Theater criticism / Business reports / etc.] **Type:** [Literary reviews / Professional documents / etc.] **Size:** [Medium corpus: ~464 documents, ~250K words] **Temporal Span:** [2010-2025 (15 years)] **Authorship:** [Single author] **Format:** [JSON with date metadata] **Metadata Available:** [Dates, titles, some categories] **Data Status:** [Ready for analysis / Partially ready / Still gathering] **Analytical Implications:** - Size supports: [Topic modeling, sentiment analysis, entity extraction, network analysis] - Temporal span enables: [Evolution tracking, trend analysis, period comparison] - Single authorship enables: [Voice evolution, style development, personal pattern tracking] - Metadata supports: [Temporal aggregation, categorical comparison] Does this accurately describe your corpus? - Yes → Proceed to Phase 2 - No → What should I correct? ``` **Wait for user confirmation before proceeding.** **If user indicates corrections:** - Ask clarifying questions - Update profile - Re-present for confirmation - Only proceed when user explicitly confirms --- ## Phase 2: Interest Exploration (5-10 minutes) **Goal:** Uncover researcher's tacit interests, assumptions, and motivations **Method:** Ask open-ended and structured questions to reveal what researcher hopes to discover **Important:** This phase reveals assumptions worth testing. "Surprise" and "disappointment" questions make tacit expectations explicit. ### 2A. Initial Draw ``` What drew you to this corpus? A) Personal connection (my own writing, my field, my community) B) Historical significance (important cultural/social moment) C) Theoretical interest (test a hypothesis, apply a framework) D) Practical need (dissertation, publication requirement) E) Curiosity (something seemed interesting but not sure what) F) Other: [describe] Tell me more about what sparked your interest. ``` **Wait for response. Allow open-ended elaboration.** ### 2B. Puzzles and Intrigues ``` What puzzles or intrigues you about these texts? Think about: - Something that seems inconsistent or contradictory - A pattern you notice but can't quite articulate - A change over time you sense but haven't confirmed - A question others haven't asked but should - Something that doesn't match your expectations Share 1-3 puzzles or curiosities. These don't have to be fully formed — vague hunches are exactly what we want to clarify. ``` **Wait for response. Allow open-ended exploration. Probe for specifics if too vague:** **If vague, ask:** ``` That's interesting. Can you give me an example from the texts where you noticed this? ``` ### 2C. Surprise Exploration ``` What would surprise you to discover in this corpus? A) That patterns you expected are absent B) That unexpected patterns dominate C) That the corpus contradicts prevailing wisdom in your field D) That temporal changes are dramatic (or non-existent) E) That relationships you assumed don't exist (or that unexpected ones do) F) Something else: [describe] What would genuinely surprise you? This reveals assumptions worth testing — surprises often indicate tacit hypotheses. ``` **Wait for response.** **Follow-up:** ``` Why would that surprise you? What do you currently assume is true? ``` **This makes assumptions explicit and testable.** ### 2D. Disappointment Exploration ``` What would disappoint you NOT to find? A) Evidence for a pattern you suspect exists B) Temporal evolution (if corpus seems static) C) Distinctive voice or style markers D) Connections between elements (entities, themes, language) E) Something you could publish or present F) Confirmation of your field's prevailing theories What discovery would feel like the project "didn't pay off"? ``` **Wait for response.** **This reveals researcher's hopes and helps ensure questions address genuine interests.** ### 2E. Stakes Clarification ``` What are the stakes of this research? A) Academic (dissertation chapter, publication, tenure case) - Who's your audience? [Field specialists / interdisciplinary / general public] B) Professional (improve practice, inform policy, guide decisions) - Who will use these findings? C) Personal (understand my own work, document my evolution) - What will this help you understand? D) Cultural (preserve/interpret cultural moment, community history) - What's at risk if this story isn't told? E) Methodological (test new analytical approaches, advance methods) - What methodological contribution does this make? How will you use these findings? Who cares about what you discover? ``` **Wait for response.** --- **Output: Interest Map** After Phase 2 questions, synthesize researcher's interests into structured map: ```markdown ## Interest Map **Primary Draw:** [Personal connection - your own theater criticism over 15 years] **Puzzles & Intrigues:** 1. [Sense that your critical voice has evolved but not sure how] 2. [Notice some plays/venues appear repeatedly - what patterns exist?] 3. [Feel like your language has changed - more/less positive? Different vocabulary?] **Surprising Discoveries (would reveal assumptions):** - Surprise if: [No temporal evolution - assumes change occurred] - Surprise if: [Sentiment trends opposite to memory - assumes accurate self-awareness] - Current assumption: [You believe you've become more/less positive over time] **Disappointing Non-Discoveries:** - Disappointed if: [No distinctive voice markers - wants evidence of unique style] - Disappointed if: [No entity relationship patterns - suspects network exists] **Stakes:** [Personal + Professional - understand critical evolution, possibly publish] **Audience:** [Theater practitioners, other critics, potentially academic audience] **Implicit Hypotheses Worth Testing:** 1. [Voice has evolved over 15 years - testable with stylistic/sentiment analysis] 2. [Certain entities are central to network - testable with entity extraction + network analysis] 3. [Language/sentiment has shifted - testable with sentiment analysis + lexicon comparison] Does this capture your interests and assumptions? - Yes → Proceed to Phase 3 - No → What should I adjust? ``` **Wait for user confirmation.** **If adjustments needed:** - Clarify misunderstandings - Update map - Re-present - Proceed only when user confirms --- ## Phase 3: Question Formulation (5-10 minutes) **Goal:** Transform interests into concrete, answerable research questions **Method:** Generate 8-12 candidate questions across categories, then guide selection **Key Principle:** Questions must be: 1. **Answerable** - Clear evidence would resolve the question 2. **Specific** - Not "what patterns exist?" but "what thematic patterns exist?" 3. **Scoped** - Appropriate for corpus size and format 4. **Interesting** - Align with Phase 2 interests ### Present Candidate Questions Based on Corpus Profile (Phase 1) and Interest Map (Phase 2), generate 8-12 questions across these categories: **Template:** ```markdown ## Candidate Research Questions Based on your corpus and interests, here are potential research questions organized by type. I've tailored these to your [corpus size], [temporal span], [authorship type], and your interest in [key interests from Phase 2]. --- ### Category 1: Temporal Questions (Evolution Over Time) [**Include ONLY if corpus has temporal span AND user indicated temporal interest**] These questions examine how patterns change across [time span]. **Q1a: How has [specific aspect from Phase 2] evolved from [start year] to [end year]?** **Analytical Approach:** [Method name] - Primary tool: [Tool name and what it does] - Procedure: [3-4 step summary] **What This Reveals:** [What you'd learn] **Evidence Type:** [What outputs would look like] - [Output 1]: [Description] - [Output 2]: [Description] **Validation Strategy:** [How to verify findings] - [Validation method 1] - [Validation method 2] **Example for your corpus:** > **Q1a: How has the emotional tenor of your theater criticism evolved 2010-2025?** > > **Analytical Approach:** Sentiment analysis with temporal tracking > - Primary tool: VADER (lexicon-based) + Transformers (distilbert-based) > - Procedure: > 1. Score each review with both tools > 2. Aggregate sentiment by year > 3. Visualize trends with confidence intervals > 4. Identify turning points or steady trends > > **What This Reveals:** Whether you've become more/less positive, whether enthusiasm > has changed, if there are distinct periods in your critical stance > > **Evidence Type:** > - Sentiment scores aggregated by year (line graph with trend) > - Statistical tests for significant changes (before/after comparison) > - Representative reviews from high/low sentiment periods > > **Validation Strategy:** > - Manual review of 20 highest-sentiment reviews (check for sarcasm, irony) > - Manual review of 20 lowest-sentiment reviews (check for genuine negativity) > - Compare with external events (theater trends, personal life events if known) > - Cross-tool validation (VADER vs Transformer correlation) > > **Confidence:** High - sentiment analysis is well-established for this corpus size **Q1b: How have [thematic element from Phase 2] changed over time?** [Similar structure as Q1a] [Present 2-3 temporal questions if applicable] --- ### Category 2: Thematic Questions (Pattern Discovery) These questions identify dominant themes, concepts, and patterns across the corpus. **Q2a: What are the dominant [domain-specific themes] in your [corpus type]?** **Analytical Approach:** Topic modeling **Example for your corpus:** > **Q2a: What are the dominant critical frameworks in your theater reviews?** > > **Analytical Approach:** Topic modeling with BERTopic > - Primary tool: BERTopic (semantic topic modeling) > - Procedure: > 1. Generate document embeddings (sentence transformers) > 2. Cluster documents by semantic similarity > 3. Extract representative terms per topic > 4. Label topics based on term analysis + manual review > > **What This Reveals:** Whether you emphasize performance, direction, writing, > social context, production values, audience experience, etc. What critical > lenses dominate your work. > > **Evidence Type:** > - Topic model with 8-15 coherent topics > - Representative reviews per topic (example documents) > - Topic prevalence across corpus (distribution) > - Topic keywords and phrases (c-TF-IDF scores) > > **Validation Strategy:** > - Manual review of 5 reviews per topic (coherence check) > - Topic distinctiveness assessment (are topics meaningfully different?) > - Compare with conscious critical approach (does this match your self-understanding?) > - Check for junk topics (noise clusters, incoherent groupings) > > **Confidence:** High - BERTopic performs well on this corpus size **Q2b: What [specific content type] appears most frequently?** [Similar structure] [Present 2-3 thematic questions] --- ### Category 3: Relational Questions (Networks & Connections) These questions explore relationships between entities (people, places, works, concepts). **Q3a: What relationships exist between [entity types]?** **Analytical Approach:** Entity extraction + network analysis **Example for your corpus:**