liveBook · Manning

Prompt engineering

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

Prompt engineering is the practice of designing clear, specific inputs that guide a language model toward useful responses.

Prompt engineering is the practice of crafting meaningful input that helps a language model produce useful responses. Effective prompts are clear, specific, concise, grammatically correct, and supported by examples when appropriate. Poorly specified input increases the risk of poor output. section 1.5.2

Treat prompting as an iterative development skill rather than a one-shot request. A financial-balance example progresses from generated code to a function, type hints, and a function that returns a formatted string instead of printing it. Each refinement states a more precise software requirement. section 1.5.2

A practical prompt should:

  • State the desired behavior clearly and specifically. section 1.5.2
  • Keep the request concise and use correct grammar and spelling. section 1.5.2
  • Include examples when they clarify the expected response. section 1.5.2

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

How deep it goes
Defines core prompt qualities and demonstrates iterative code refinement, but does not detail individual prompting techniques.
Examples
Uses ChatGPT-generated Python for reading, formatting, and returning a financial balance.
What it assumes
Builds on software development knowledge while showing that detailed Python knowledge is not always required.
What you can do after
Apply it via ChatGPT to express software requirements and iteratively improve generated code.
How it connects
Connects prompt engineering with problem formulation, generative AI, language models, and software development.

Also explained in

Compare how 38 books explain prompt engineering →

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.