2.1.1. Summarization

LLMs like ChatGPT are really good at summarizing information for us. To get the most out of having LLMs summarize large volumes of text, you can provide a template that not only details your desired formatting, but also includes placeholders for the types of information you want included.

Let's take a look at a simple example regarding the Securities Act of 1933 starting with your basic prompt asking for a summary:

Basic Prompt W/O Template:
Summarize the Securities Act of 1933

When given this prompt, ChatGPT will do an okay job at producing at a summary that is legible and informational. Take a look at the response we received here. How can we get ChatGPT to generate a better summary? We can use a prompt template that better instructs the AI on the specific types of information you're interested in (dates, persons, etc.), formatting preferences, desired length, and more. Take a look at the following prompt:

Detailed Summary Prompt Template:
As a legal professional, analyze the securities act of 1933 and generate a 
detailed summary with 3-4 highlights for each of the most important sections 
with important keywords, people, numbers, and facts in this format:

 

 {section title here}


{summary of the section with important keywords, people, numbers, and facts}

- {first point}: {short explanation with important keywords, people, and facts}
- {second point}: {same as above}
- {third point}: {same as above}



### {second section here}

{START_DETAILS_SECTION}
{summary of the section with important keywords, people, numbers, and facts}

- {first point}: {short explanation with important keywords, people, and facts}
- {second point}: {same as above}
- {third point}: {same as above}
<!-- a fourth point if warranted, and so on -->
{END_DETAILS_SECTION}

### {third section here}
<!-- and so on, as many sections and details/summary subpoints as warranted -->

End with other questions that the user might want answered based on this source:

### Further information
- {question + answer 1}
- {question + answer 2}
- {question + answer 3}

All words in brackets must replaced by the summary of the content.


Only output the response in the prescribed format with NO additional commentary. 
Answer the questions included in the "Further information" section and display 
the answer alongside the question.

Follow along with us as we prompt ChatGPT using this template here. There is a lot to digest in this prompt template, but for starters don't shy away from the weird syntax being used. This syntax is called Markdown and can be used to format raw text using headings, lists, and other elements you are used to seeing in Microsoft Word and Google Docs. It's great at helping guide the AI model towards producing a response in a prescribed format, but also allows you to embed instructions within as well, a good example being the list of important keywords, people, and facts we want generated for each section as illustrated:

...
- {first point}: {short explanation with important keywords, people, and facts}
...

Hover over the annotated sections of our improved prompt template above to learn more about the specific characteristics we included in this prompt and how they work together. We encourage you to tinker with this template to see if you can get even more precise summaries based on your particular use case. For example, if your law firm prefers to have case files, or legal analysis drafted in a desired format with specific criteria regarding the information that should be included, go ahead and modify the prompt template and see how ChatGPT responds. Remember, prompt engineering is an iterative process.

Last updated