# LLM Text Summarization

The data files required for this tutorial are available in the following files.

{% file src="/files/JYnbVQcw2jmccRJ6iO9y" %}
Summarization Tutorial files
{% endfile %}

{% file src="/files/1OzX94VHxAf3TBlaLFPd" %}
Prompt Engineering files
{% endfile %}

### Applications

While summarization is the focus of this tutorial, the same principles can be applied to any task involving text generation. The goal is to evaluate the consistency of the generated text with the input text. Other tasks involving text generation are entity recognition, question answering, and machine translation.

### Prerequisites

This tutorial assumes that you have already the following tutorials: [Quickstart](/v0.23.x/quickstart.md) and ideally [Trading Strategy](/v0.23.x/tutorials/trading-strategy.md).

### Organization

This tutorial requires a good deal of preparation, so it has been divided into the following four sections:

* Defining the text summarization problem of interest, including the data source and the metrics,
* Creating a constrained optimization problem to govern the development of a text summarization app in dbnl,
* Managing the integration testing process for consistent testing after such an app has been created,
* Practical considerations which would arise when actually building an LLM summarization tool.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dbnl.com/v0.23.x/tutorials/llm-text-summarization.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
