liveBook · Manning

Time-to-think tactic

As explained in Software Testing with Generative AI

A prompting technique that asks a generative model to check or reason about an output before producing it.

The time-to-think tactic asks a generative model to check its proposed output before returning it. It adds a validation step to a focused prompt rather than relying on generation alone. section 8.2.2

Validating generated SQL

For Room API seed data, a prompt instructs the model to create ten MySQL records, handle ARRAY values, and then: “Check that each new entry matches the correct data types and uses valid MySQL before outputting it.” The rule helped correct malformed array data, although the prompt still required adjustment for the specific requirements. section 8.2.2

If the keyword ARRAY is used, use the MySQL ARRAY function to create related data type

The ARRAY-handling rule shows how a time-to-think instruction works alongside concrete formatting and data-generation constraints. section 8.2.2

How Software Testing with Generative AI covers it

How deep it goes
Defines the validation instruction and demonstrates it in a prompt, but stops short of a general verification procedure.
Examples
Demonstrates room INSERT statements, ARRAY values, and seed.sql data for a Room API.
What it assumes
Assumes familiarity with prompts, MySQL INSERT statements, and seed data.
What you can do after
Apply it by adding explicit validation instructions to prompts that generate structured test data.
How it connects
Connects prompt engineering with delimiter tactics, SQL data generation, and exploratory testing.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Software Testing with Generative AI. The section links point to the parts of the book it draws on.