liveBook · Manning

Problem definition

As explained in Build Financial Software with Generative AI (From Scratch)

Problem formulation is the practice of specifying a problem's context, objective, constraints, and observable failure precisely.

Problem definition is the practice of clearly specifying what needs to be solved. In generative-AI work, precise input matters because unclear requests can produce unsuitable results; concise, specific wording helps turn a developer’s intent into usable code. section 1.5.2

A well-formed request benefits from:

  • Clear and specific requirements. section 1.5.2
  • Concise wording with correct grammar and spelling. section 1.5.2
  • Examples when they make the intended result easier to interpret. section 1.5.2
  • Explicit output behavior, such as returning a formatted string instead of printing it. section 1.5.2

Refining a balance-formatting request

A vague request can produce a script that reads a balance and prints it. A clearer request can require a function, type hints, and a returned formatted string, making the result easier to reuse and test.

How Build Financial Software with Generative AI (From Scratch) covers it

How deep it goes
Defines clarity, concision, correctness, and examples for prompts, but does not develop a formal requirements method.
Examples
Uses progressively refined Python balance-formatting examples, moving from direct printing to a typed function that returns a string.
What it assumes
Assumes software-development knowledge while showing that Python-specific knowledge can be learned or supplied through the request.
What you can do after
Apply it via prompt engineering to request clearer, more reusable generated code.
How it connects
Connects problem definition with prompt engineering, generative AI, software development, and code reuse.

Also explained in

Compare how 6 books explain problem definition →

Related concepts

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