Use Case Taxonomy

A systematic classification of generative AI patterns for software development and content creation

Framework Production Ready
🎯

Basic Patterns

Foundational generation patterns: creation, transformation, and synthesis

🔄

Advanced Patterns

Incremental, hierarchical, and iterative generation strategies

🔧

Combined Workflows

Real-world pipelines combining multiple patterns

📦 Basic Generative Use Cases

0 → 1

Content Creation

Foundational

Generate new content from scratch based on descriptions or prompts.

Description "Create a REST API for user management"
LLM
Generated File UserController.kt

Examples

  • Generate file from description
  • Generate images from text prompts
  • Create boilerplate code from specifications
  • Generate documentation from requirements
1 → 1

Content Transformation

Transform

Transform existing content while preserving its essential meaning or structure.

Input Original Content
Transform
Output Transformed Content

Examples

  • Summarization of articles
  • Translation between languages
  • Edit / feature addition to existing code files
  • Code refactoring and optimization
(A + B + ...) → C

Synthesis

Combine

Combine multiple inputs to create unified, coherent output.

A
B
C
Synthesize
Result

Examples

  • Synthesis by Example: Generate new content based on multiple input examples
  • Pattern Extraction: Identify common patterns from multiple inputs
  • Mass Summarization: Summarize multiple documents into a single cohesive summary
(A − B + C) → D

Analogical Generation

Advanced

Create new content by combining and modifying existing pieces through analogy.

A
B
+
C
D

Concept

Transfer features from one class/file to another — a sort of "transgenic" content generation.

UserService (A) - BasicCRUD (B) + CachingLayer (C) → CachedUserService (D)

🚀 Advanced Generative Use Cases

A → A + δ

Incremental Generation

Extend

Generate additions to existing content, continuing from where it left off.

Existing A
Continue
Extended A + δ

💡 Key Insight

Essentially telling the model to "continue" from where it left off, useful for long-form content generation.

A → (B,C); B → (D,E); ...

Hierarchical Generation

Scale

Generate complex content through multiple stages of refinement and transformation.

Spec
Module A
Module B
Module C
File 1
File 2
File 3
File 4
File 5
File 6

💡 Key Insight

Allows for exponential growth in content volume. LLM output is generally constrained by input size, but hierarchical generation bypasses this limitation.

Applications

  • Spec-driven development
  • Large codebase generation
  • Documentation hierarchies
for(1..n) A → A

Iterative Editing

Refine

Repeatedly refine content through multiple editing passes.

A₀
→ Edit →
A₁
→ Edit →
A₂
→ ... →
Aₙ

⚠️ Considerations

  • Patching Strategy: Full replacement vs. modification of existing content
  • Convergence: Monitor for stability and diminishing returns
  • Quality Gates: Define stopping criteria
while(failure) A --fix→ A

Error Correction

Fix

Identify and correct errors using a feedback loop with external validation.

Code
Validator Tests / Linter

⚠️ Considerations

  • May require many iterations to achieve desired quality
  • Periodic human interventions may be necessary
  • Set maximum iteration limits to prevent infinite loops

🔗 Combined Workflows

Real-world workflows often combine multiple patterns to achieve complex goals. Here's an example of a spec-driven development pipeline:

Spec-Driven Development Pipeline

1
Hierarchical
Spec → (Modules)
2
0→1 Creation
Each Module → Code
3
1→1 Transformation
Code → Tests
4
Error Correction
while(tests fail) → Fix
pseudocode
Spec → (Modules)           [Hierarchical]
  ↓
Each Module → Code         [0→1 Creation]
  ↓
Code → Tests               [1→1 Transformation]
  ↓
while(tests fail) → Fix    [Error Correction]

📋 Quick Reference

Pattern Notation Use Case Cognotik Task
Content Creation 0 → 1 Generate new files from descriptions FileTask
Transformation 1 → 1 Edit, refactor, translate EditTask
Synthesis (A+B+...) → C Combine multiple inputs InquiryTask
Analogical (A−B+C) → D Feature transfer EditTask
Incremental A → A+δ Continue/extend content FileTask
Hierarchical A → (B,C); ... Multi-stage generation TaskPlanningTask
Iterative for(1..n) A → A Repeated refinement EditTask
Error Correction while(fail) fix Validation-driven fixes RunShellCommandTask

Ready to Apply These Patterns?

Explore how Cognotik implements these use case patterns through its task planning system.