liveBook · Manning

Prompt

As explained in Microsoft Azure in Action

A prompt is text or other input instructions supplied to a generative model to guide its output.

A prompt is the input you give a generative model to guide its response. In Azure OpenAI Service, it can pair source material with a specific request: not just a customer review, but what to do with it. section 7.1

Turn a review into recommendations

A customer says they loved *1984* for its dystopian setting and social commentary. A useful prompt includes that review and asks for three similar books, each with a brief description. section 7.1

C:/> az rest --method post --url "${ENDPOINT}openai/deployments/${DEPLOYMENT_NAME}/completions?
api-version=${API_VERSION}" --headers "api-key=${API_KEY}" 
"Content-Type=application/json" --body "{\"prompt\": \"${PROMPT}\",
\"max_tokens\": 150, \"temperature\": 0.7, \"n\": 1}"

The request sends the prompt in a JSON `prompt` field to a deployed model. It also sets response options such as `max_tokens` and `temperature`. section 7.1

How Microsoft Azure in Action covers it

How deep it goes
Shows a worked prompt and its request field, but does not develop a general prompt-writing procedure.
Examples
Uses a customer review of *1984* to request three book recommendations with brief descriptions.
What it assumes
Requires a deployed Azure OpenAI model to process the request; shows the prompt without assuming a prior prompt-writing method.
What you can do after
Apply it via an Azure OpenAI REST request to ask a deployed model for tailored recommendations.
How it connects
Connects prompts to deployed models, retrieval, text generation, and response options.

Also explained in

Compare how 50 books explain prompt →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Microsoft Azure in Action. The section links point to the parts of the book it draws on.