Microsoft Certified: Azure AI Engineer AssociateImplement generative AI solutionsMedium

A financial analyst is using Azure OpenAI Service to generate market commentary based on real-time stock data. They need the commentary to be concise and directly address the provided data without verbose explanations or tangential information. Which combination of prompt engineering and parameter tuning would be most effective for achieving this goal?

  1. ALow 'presence_penalty' and a prompt asking for 'diverse explanations'.
  2. BHigh 'top_p' (e.g., 0.95) and a prompt asking for 'detailed analysis'.
  3. CLow 'temperature' (e.g., 0.2) and a clear instruction to 'be concise and data-driven'.
  4. DHigh 'temperature' and a prompt asking for 'creative insights'.
Show answer & explanation

Correct answer: C. Low 'temperature' (e.g., 0.2) and a clear instruction to 'be concise and data-driven'.

A low 'temperature' makes the output more deterministic and focused, reducing verbosity and tangential information. Coupled with explicit instructions to 'be concise and data-driven', this approach directly addresses the requirement for concise, factual commentary.

Why the other options are wrong

  • A. Low 'presence_penalty' would encourage repetition, and 'diverse explanations' contradicts conciseness and directness.
  • B. High 'top_p' allows for more diversity, which contradicts the goal of conciseness and directness, and 'detailed analysis' contradicts conciseness.
  • D. High temperature and 'creative insights' would lead to imaginative, less factual, and potentially verbose output.

Concise & Data-Driven Prompting

A prompt engineering strategy that combines explicit instructions for brevity and factual adherence with low-randomness generation parameters.

  • Uses low 'temperature' or 'top_p' for deterministic output.
  • Includes direct instructions like 'be concise', 'focus only on data', 'no fluff'.
  • Ideal for factual summaries, data interpretation, and report generation.

Memory trick: Low Temp + Clear Instructions = Concise Data Power: Keep the 'temperature low' and 'instructions clear' for 'powerful, concise data'.

More Implement generative AI solutions questions