liveBook · Manning

Task description

As explained in Data Analysis with LLMs

A textual specification of the operation that a model should perform.

A task description tells a language model what operation to perform. It is one part of a prompt, alongside the input and any needed context or output requirements. section 1.3.2 section 4.2.1

A useful task description can specify:

Listing 1.1 Prompt for classifying a laptop review
We are considering product reviews for laptops.  #1
For each review, output "satisfied" or "dissatisfied", 
depending on whether the customer is satisfied 
with the product or not.  #2
Examples:
This is a great laptop! I recommend everyone to buy it! 
satisfied  #3
This laptop did not work. I had to return it.
dissatisfied  #4
The screen is too small and it takes too long to start.  #5

This laptop-review prompt pairs the classification instruction with product context, example reviews, and the review to classify. section 1.3.2

Database:                                          #1
CREATE TABLE games(rank int, name text, platform text,
year int, genre text, publisher text, americasales numeric,
eusales numeric, japansales numeric, othersales numeric,
globalsales numeric);
Translate this question into SQL query:  #2
[Question]                          #3

This SQL prompt pairs a translation instruction with a database schema and a question to translate. section 5.2.4

How Data Analysis with LLMs covers it

How deep it goes
Shows task instructions in worked prompts and Python templates, without explaining model internals.
Examples
Uses laptop and movie-review classification, SQL translation, and property extraction from source text as examples.
What you can do after
Apply it via Python prompt templates that combine task instructions with a question, review, or source text.
How it connects
Connects prompt design with input text, output formats, context, examples, sentiment classification, text-to-SQL, and information extraction.

Also explained in

Compare how 2 books explain task description →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Data Analysis with LLMs. The section links point to the parts of the book it draws on.