liveBook · Manning

Prompt engineering

As explained in Investing for Programmers

Prompt engineering is the practice of designing and refining instructions and contextual inputs to obtain more useful outputs from an AI system.

Prompt engineering improves AI outputs by designing clearer questions and supplying relevant context. In financial research, it shifts LLM use from generic stock recommendations toward structured due diligence, such as examining a company’s management style and building a personal investment scorecard. section 8.0 section 8.4

A stronger prompt can specify:

  • The investor’s goals, risk tolerance, and tax residency. section 8.5
  • The company, decision, or research question being investigated. section 8.0
  • Reference examples and enough surrounding context to avoid a generic answer. section 8.4 section 8.5

From recommendation to due diligence

Instead of asking, “Recommend me three stocks,” ask an LLM to describe the management style of a named company, while providing the investor’s goals and risk profile. Compare the resulting details with other research before using them in a personal scorecard. section 8.0 section 8.5

Prompt engineering refines research; it does not replace judgment. LLMs can hallucinate, provide outdated information, or make mistakes, so their outputs require due diligence rather than automatic acceptance. section 8.0 section 8.5

How Investing for Programmers covers it

How deep it goes
Defines specificity, context, examples, and investor profiles but stops short of a formal optimization workflow.
Examples
Uses investor profiles, company-management questions, and detailed investment inquiries instead of generic stock recommendations.
What it assumes
Assumes no engineering degree, while requiring users to clarify goals and investment context.
What you can do after
Apply it via detailed prompts that include goals, risk tolerance, tax residency, context, and reference examples.
How it connects
Connects LLMs, generative AI, due diligence, investment scorecards, hallucinations, and risk tolerance.

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 Investing for Programmers. The section links point to the parts of the book it draws on.