HomeGuidesRecipesAPI EndpointsRelease NotesCommunity
Log In
Guides

Utilizing Map-Reduce Summarization

Introduction

This guide goes over how to make use of the summarization features that Certara AI provides when using the /layar/gpt/generate endpoint.

When To Use

Map-Reduce summarization should be used when you are trying to summarize a document or set of documents that is too large to fit in the model's context length.

Request Payload

Here is a simple payload that can be used to summarize a document.

{
  "task": "summarize",
  "sources": [
		"documentId" : "123456ABCDEF"
  ],
  "prompts" :{
    "summarization": "Please summarize the attached document",
    "combine": "These are summaries of other pieces of this document or corpus, combine them into a final answer. When combining the summaries, make sure to include the document name associated with the summary before moving on to the next document"
	     }
}

task (required)

The task must be summarizeif you want to use the map-reduce summarization pipeline.

sources (required)

You must provide a list of documentIds or setIdsthat you wish to summarize.

prompts (required)

A nested json dictionary that includes summarizationand combine.

summarization (required)

A string that includes the prompt that will be used when summarizing each document.

combine (optional)

A string that includes the prompt that will be used when combining the summaries to create the final response. This is only required if you are summarizing multiple documents.

🚧

Combine parameter version requirement

In order to use the combineparameter your Certara environment must be on version 1.16 or higher.