liveBook · Manning

Language model

As explained in Microsoft Azure in Action

A large language model is a machine-learning model trained on large text corpora to generate or transform natural-language content.

A language model can turn a customer’s review into book recommendations, summarize a new arrival, or produce conversational text. Azure OpenAI Service makes these models available to applications through a deployed endpoint. The practical question is not simply which model is most powerful, but which one fits the job. section 7.1 section 7.6

Choose and test a model against the work it will actually do:

  • Balance quality, cost, and speed. A smaller model may suit quick recommendations from short reviews; a larger one may produce a more nuanced, polished summary at greater expense. section 7.1 section 7.4.3
  • Respect the limit on text the model can view at once. Summarize long inputs, split them into chunks, or retrieve only relevant passages. section 7.1
  • Compare candidates in the AI Foundry Model catalog using capabilities, versions, pricing, and benchmarks. Prototype with review data, check quality and fairness, then consider a different model or fine-tuning if needed. section 7.4.3

Recommendations from a review

A customer praises the dystopian setting and social commentary in *1984* and asks for similar books. A prompt asks the deployed model for three recommendations, each with a brief description. This is a small, immediate task; a long summary of a rare technical book calls for a different quality–cost decision. 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}"

An Azure CLI REST call sends the prompt to a named deployment. The request also sets output parameters, including a 150-token maximum. section 7.1

How Microsoft Azure in Action covers it

How deep it goes
Explains selection trade-offs and input limits, then shows deployment and invocation rather than model internals.
Examples
Uses customer-review recommendations, technical-book summaries, an AI Foundry model comparison, and an Azure CLI completions request.
What it assumes
Introduces model size and input limits through everyday analogies; uses Azure resources and review data in its workflow.
What you can do after
Apply it via Azure AI Foundry and Azure CLI to select, deploy, test, and invoke a model for text tasks.
How it connects
Connects language models to natural language processing, prompts, retrieval, chunking, fine-tuning, and inference endpoints.

Also explained in

Compare how 67 books explain language model →

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.