13

Classroom Activity: Guiding AI Through an EvoX Task via Dialogue

AI999第7课:AI Native 科研范式与 EvoX 实战切入
00:00

This page is a hands-on classroom activity: use a short conversational prompt to drive AI to generate and run a basic EvoX optimization task, then inspect the results the way an engineer would during acceptance testing. The point is not just getting it to "run"—it's validating"humans set direction, AI delivers the implementation, humans do the acceptance testing"as an AI Native workflow loop.

Classroom Activity: Guiding AI Through an EvoX Task via DialogueUse a short conversational prompt to drive AI to generate, run, and validate a basic EvoX optimization taskLesson 7 · AI Native1PromptHumans set directionProblem & objective functionSearch space & dimensionsAlgorithm, population, iterationsCompute backend & expected output2GenerateAI delivers implementationSelect APIs & librariesOrganize code structureDebug and executeReturn run results3RunActual executionEvoX optimization taskTerminal iteration logConvergence curve plotRuntime record4AcceptanceHumans make the callCheck against the checklistDoes the value magnitude matchIs the configuration reproducibleAdd constraints and iterateAdd constraints · Iterate & refineDivision of laborHumanDefine the problem, metric criteria, and result judgmentProvides direction and is the final judge of resultsAISelect APIs, organize code, debug and executeDelivers the implementation and returns run resultsRun Results Checklist1Was it actually executedCheck terminal logsand runtime records2Is the convergence curve reasonableCurve should improve steadilyNo abnormal oscillations3Does the optimal value magnitude matchCompare with known optimumRastrigin optimum is 04Is the configuration reproducibleFix the seed and rerunResults should stay consistent

Activity Goal

Complete the minimal "prompt → generate → run → validate" loop in a real EvoX environment, rather than just producing readable code. You'll experience firsthand how to guide AI through a basic optimization task via dialogue, then inspect its output like an engineer.

Prompt Building Blocks (All Required)

  • Optimization problem & objective function: e.g., minimizing the Rastrigin function.
  • Search space & dimensions: e.g., 10 dimensions, with value ranges for each dimension.
  • Algorithm/operator selection: e.g., DE algorithm with crossover and mutation operators.
  • Population size & generations: e.g., population 128, 200 generations.
  • Compute backend: CPU or GPU tensorization.
  • Expected output: optimal value, convergence curve, run log.

Choosing Prompt Granularity

Prompts that are too vague trigger AI defaults, making it hard to judge whether your intent is met; prompts that are too detailed reduce the task to manual coding. We recommend specifying"constraints and acceptance criteria"and leaving implementation details to the AI. For example, specify the problem, algorithm, population size, and iteration count, but no need to dictate how exactly to call the API.

Run Results Checklist

  • Was it actually executed rather than just returning code? — Check the terminal logs and runtime.
  • Does the convergence curve trend monotonically better without abnormal oscillations? — The curve should decline steadily.
  • Does the optimal value match the known magnitude for the problem? — For example, the Rastrigin function's global optimum is 0.
  • Are the random seed and configuration reproducible? — Rerunning with a fixed seed should yield identical or similar results.

Follow-up Questions from an Acceptance Perspective

When results fall short, add constraints through dialogue—for example, "fix seed=42, rerun, and report the mean and variance across three repetitions." Observe whether the AI can iterate and refine rather than rewriting from scratch. This sharpens your ability to describe problems and acceptance criteria precisely.

Division of labor

Humans handle problem definition, metric criteria, and result judgment; AI handles API selection, code organization, and debugging execution. Through this activity, you'll gain a clearer sense of your role in the AI Native workflow.

Scope Boundaries

This page focuses only on validating the workflow for a basic task; it does not cover follow-up topics such as MetaDE bi-level evolution, multi-objective trade-offs, or Genesis multi-agent systems.

Sample Prompt

"Use EvoX to minimize the Rastrigin function (10 dimensions) with the DE algorithm, population 128, 200 generations, GPU tensorized backend, fixed seed=42; please run it directly and return the best fitness, convergence curve plot, and run log."

During acceptance, check four things: Was it actually executed? Is the shape of the convergence curve reasonable? Is the optimal value close to 0? Are repeated run results consistent?