|
|
Gemini API Text Summarisation at Scale
Author: Venkata Sudhakar
Text summarisation is one of the most immediately useful applications of large language models. The Gemini API can condense long supplier contracts, customer feedback threads, support ticket histories, and market research reports into concise summaries - with the key difference from simple extraction being that it understands context and synthesises insights rather than just selecting sentences.
ShopMax India receives lengthy supplier performance reports, legal contract amendments, and customer feedback digests weekly. The operations team used to spend Monday mornings reading through these documents. Now a Gemini summarisation pipeline processes all incoming documents overnight and delivers a structured briefing pack by 8am - turning 4 hours of reading into 20 minutes of reviewing summaries with highlighted action items.
The below example shows how to summarise a long supplier performance report into an executive briefing with action items.
It gives the following output,
ONE LINE: Samsung breached delivery SLA and price notice clause in Q1 2024,
requiring formal notice and renegotiation before April price increase takes effect.
Urgency: high, Decision needed: True
Action items:
- Issue formal SLA breach notice to Samsung within 5 business days
- Accept Rs 4,20,000 credit offer for defective display units
- Negotiate Galaxy S25 exclusivity in exchange for Q1 penalty waiver
- Escalate price increase violation to legal team for contract review
The below example shows how to process a folder of documents and generate a consolidated briefing pack.
It gives the following output,
Briefing pack: 2 docs, 1 urgent
Decisions needed: ['Samsung Q1 Review']
The document text is truncated to 12,000 characters before being passed to Gemini - this handles large documents gracefully while staying well within context limits. For very long documents, a chunking and rolling summary approach works well: summarise each section, then summarise the summaries. ShopMax India processes an average of 15 documents per day through this pipeline, delivering a briefing pack that the operations team reviews in a single 20-minute slot rather than spending the morning buried in reports.
|
|