PersuasiveEssayTask

Generates compelling, multi-phase persuasive essays using structured arguments, rhetorical devices (ethos, pathos, logos), and iterative refinement.

Category: Writing Side-Effect Safe GPT-4 Preferred
ExecutionConfig.json JSON
{
  "thesis": "AI should be integrated into 
             primary education",
  "target_audience": "educators and parents",
  "tone": "analytical yet passionate",
  "target_word_count": 1200,
  "num_arguments": 3,
  "include_counterarguments": true,
  "use_rhetorical_devices": true,
  "call_to_action": "strong",
  "revision_passes": 2
}
SessionTask UI Rendered
Overview Outline Introduction Complete Essay

The Silicon Socratic: AI in the Classroom

Cover Mock

Introduction: Imagine a classroom where every student has a personal tutor available 24/7...

Argument 1: Personalized learning paths allow students to progress at their own pace...

Live Results Showcase

Explore actual artifacts (Markdown, HTML, Images) generated by the PersuasiveEssayTask in the test workspace.

Runtime Configuration (ExecutionConfig)

Field Type Description
thesis * String The central argument or position to be defended.
target_audience String Default: "general public". Tailors vocabulary and examples.
tone String Default: "formal". Options: formal, conversational, passionate, analytical.
target_word_count Int Default: 1500. Target length for the final output.
num_arguments Int Number of main claims to develop (1-10).
include_counterarguments Boolean Default: true. Whether to address and rebut opposing views.
use_rhetorical_devices Boolean Enables explicit use of Ethos, Pathos, and Logos.
include_evidence Boolean Default: true. Includes statistical evidence and citations.
use_analogies Boolean Default: true. Incorporates analogies and examples for clarity.
call_to_action String Options: strong, moderate, reflective, none.
revision_passes Int Default: 1. Number of iterative refinement passes (0-5).
input_files List<String> Optional glob patterns for research context.
related_files List<String> Optional list of specific files to use as research context.

Task Lifecycle

  1. Research & Context: Aggregates data from input_files and related_files.
  2. Outline Generation: Creates a structured EssayOutline with hooks and claims.
  3. Visual Asset Creation: (Optional) Generates cover and outline visualization images.
  4. Phase-Based Writing: Sequentially writes Introduction, Body Arguments, and Counterarguments.
  5. Revision: Performs revision_passes to polish logic, flow, and tone.
  6. Assembly: Compiles final Markdown, HTML, and PDF versions.

Static Configuration (TypeConfig)

Field Default Description
generate_images true Whether to generate illustrative images for arguments.
generate_cover_image true Whether to generate a professional cover image.

Embedded Execution (Headless)

Use the UnifiedHarness to run this task programmatically in CI/CD or CLI tools.

EmbeddedInvoke.kt
import com.simiacryptus.cognotik.apps.general.UnifiedHarness
import com.simiacryptus.cognotik.plan.tools.social.PersuasiveEssayTask
import com.simiacryptus.cognotik.plan.tools.social.PersuasiveEssayTask.*

val harness = UnifiedHarness(serverless = true, openBrowser = false).apply { start() }

val config = PersuasiveEssayTaskExecutionConfigData(
    thesis = "AI should be integrated into primary education",
    target_audience = "educators and parents",
    tone = "analytical yet passionate",
    target_word_count = 1200,
    revision_passes = 2
)

harness.runTask(
    taskType = PersuasiveEssayTask.PersuasiveEssay,
    typeConfig = PersuasiveEssayTaskTypeConfig(generate_images = true),
    executionConfig = config,
    workspace = File("./my-essay-project"),
    autoFix = true
)

Gradle Dependency

dependencies {
    implementation("com.cognotik:webapp:2.0.39")
}

CLI Usage

Invoke via the Cognotik CLI for automated document generation.

java -jar cognotik-cli.jar \
  --task PersuasiveEssay \
  --thesis "The case for universal basic income" \
  --target_audience "policymakers" \
  --workspace ./output

Prompt Segment

The following logic is injected into the LLM context:

PersuasiveEssay - Generate compelling persuasive essays with structured arguments
  ** Specify the thesis statement or position to argue
  ** Optionally provide input files (supports glob patterns) to incorporate as research
  ** Define target audience and tone
  ** Set target word count and number of main arguments
  ** Enable counterarguments and rebuttals for balanced perspective
  ** Use rhetorical devices (ethos, pathos, logos) for persuasive impact
  ** Include statistical evidence and citations
  ** Incorporate analogies and examples for clarity
  ** Configure call to action strength
  ** Performs outline creation, argument development, and iterative writing
  ** Produces complete, well-structured persuasive essay