Text summarization generates a shorter text while preserving essential information. In finance, it reduces the burden of extracting investment-relevant insights from lengthy analyst reports. section 2.5
Generic summarization may compress prose, but financial summarization must separate boilerplate from an analyst’s thesis and background from actionable insights. Domain adaptation improves this specialized filtering. section 2.5
A practical fine-tuning workflow uses:
- A pretrained model that understands financial report conventions, metrics, and logical structure. section 2.5.3
- Report-summary pairs formatted with a consistent instruction template, using the report as input and a verified summary as the target. section 2.5.3
- LoRA applied to projection layers, enabling efficient adaptation to report-summarization nuances. section 2.5.3
- Training settings for sequence length, batching, learning rate, gradient accumulation, and convergence. section 2.5.3
Investment research workflow
An investment firm converts each lengthy analyst report into a prompt containing the instruction “Summarize the following analyst report,” then trains on its verified internal summary. The resulting model targets concise outputs that retain financial reasoning and actionable insights. section 2.5 section 2.5.3
Listing 2.30 Define the prompt template
chat_prompt = """
### Instruction:
Summarize the following analyst report.
### Input:
{}
### Response:
{}"""
EOS_TOKEN = tokenizer.eos_token
def formatting_prompts_func(examples):
inputs = examples["report"]
outputs = examples["summary"]
texts = []
for input, output in zip(inputs, outputs):
text = chat_prompt.format(input, output) + EOS_TOKEN
texts.append(text)
return {"text": texts}Inspect the prompt template that standardizes report inputs, summary targets, and end-of-sequence formatting. section 2.5.3
















