Generative AI Summarization: Exploring Techniques

Data Mastery Series — Episode 24: The Chat with Document and Langchain Series (Part 5)

Donato_TH
Donato Story
21 min readJun 8, 2024

--

Connect with me and follow our journey: Linkedin, Facebook

Welcome back to our Data Mastery Series, where we delve into advanced applications of Large Language Models (LLMs) within the Chat with Document and Langchain framework. In this fifth installment, we explore various summarization techniques, illustrating how to leverage LLMs to generate concise and insightful summaries from extensive texts. This approach not only enhances the efficiency of information processing but also ensures that critical details are captured effectively.

If you’re catching up, make sure to explore our previous episodes for foundational insights:

The data we will use consists of 5 sets:

  • 1. Tortoise and the Hare Story (ENG_S, 2,559 characters)
  • 2. Text Captioning from YouTube: Introducing GPT-4o (ENG_M, 19,418 characters, ~26 min) Link Here
  • 3. Text Captioning from YouTube: Google Keynote (Google I/O ’24) (ENG_L, 90,256 characters, ~113 min) Link Here
  • 4. Text Captioning from YouTube: เคน นครินทร์ แนวคิดจากอาร์เซน่อล​ กับศรัทธาที่ไม่มีเงื่อนไข | MainStand Talk EP61 (THA_M, 55,523 characters, ~86 min) Link Here
  • 5. Text Captioning from YouTube: หนังสือเสียง กินกบตัวนั้นซะ ตอนเดียวจบ(รวมทุกไฟล์) (THA_L, 123,183 characters, ~196 min) Link Here

1. Basic Summarization Chain

We start with the most straightforward method. The Basic Summarization Chain uses a simple model, load_summarize_chain, to generate summaries. This method is used for quickly summarizing smaller documents or during initial testing phases where simplicity and speed are essential.

### Input Code (Example for ENG_S) ###
chain = load_summarize_chain(llm, chain_type="stuff", verbose=False)
eng_summary_short = chain.run(clip_1_doc_ENG_S)
eng_summary_short
### Output from 6 Clips (LLMs Model = text-bison@001) ###
File 1 (ENG_S): A hare challenged a tortoise to a race. The hare was very fast, but he got distracted by a patch of wildflowers and took a nap. The tortoise, though slow, kept going and won the race.
File 2 (ENG_M): OpenAI announced the general availability of GPT-4o, its new flagship language model. GPT-4o is faster, cheaper, and more powerful than previous models, and it is now available to all users for free. GPT-4o can understand and generate text, translate languages, write different kinds of creative content, and answer your questions in an informative way. GPT-4o can also see the world around it and interact with code. Over the next few weeks, OpenAI will be rolling out these capabilities to everyone.
File 3 (ENG_L): Error: 400 Unable to submit request because the input token count likely exceeds the model's input token limit. Reduce the number of input tokens and try again. You can also use the CountTokens API to calculate prompt token count and billable characters. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models
File 4 (THA_M): Error: 400 Unable to submit request because the input token count likely exceeds the model's input token limit. Reduce the number of input tokens and try again. You can also use the CountTokens API to calculate prompt token count and billable characters. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models
File 5 (THA_L): Error: 400 Unable to submit request because the input token count likely exceeds the model's input token limit. Reduce the number of input tokens and try again. You can also use the CountTokens API to calculate prompt token count and billable characters. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models

The load_summarize_chain can summarize only 2 files due to the limitation of token counts.

2. TextSplitter and Map-Reduce Summarization Chain

To address token limit issues, the TextSplitter and Map-Reduce Summarization Chain technique is used. This method splits large documents into smaller parts. Each part is summarized separately (map phase), and then these summaries are combined into one comprehensive summary (reduce phase). This approach helps summarize large documents without performance or memory problems.

### Input Code (Example for ENG_L) ###
text_splitter = RecursiveCharacterTextSplitter(chunk_size=2000, chunk_overlap=200)
clip_3_doc_ENG_L_text_splitter = text_splitter.split_documents(clip_3_doc_ENG_L)

chain = load_summarize_chain(llm, chain_type="map_reduce", verbose=True)
clip_3_doc_ENG_L_text_splitter_summary = chain.run(clip_3_doc_ENG_L_text_splitter)
### Output from 6 Clips (LLMs Model = text-bison@001) ###
File 1 (ENG_S): The Tortoise and the Hare is a fable that teaches the importance of being humble and never giving up. The tortoise wins the race because he keeps going.
File 2 (ENG_M): GPT-4o is a new language model from OpenAI that has real-time conversational speech capabilities. It can be used for a variety of tasks, including providing customer service, writing different kinds of creative content, and translating languages.
File 3 (ENG_L): Google announced the Gemini era at its developer conference, I/O. This new era is focused on artificial intelligence, and Google is investing in AI research, products, and infrastructure to make AI more accessible to developers and creators. Google has released new AI models, Gemini 1.5 Pro and Flash, as well as AI Studio and Vertex AI, which are tools designed to help developers build and deploy AI applications.
File 4 (THA_M): The Standard Sport is a new media platform that focuses on sports and lifestyle. It is aimed at people who are interested in sports, fashion, and pop culture. The platform will feature content on athletes, icons, and inspiration.
File 5 (THA_L): The key to success is to focus on the most important tasks, do them well, and complete them. Set goals in each aspect of your life and make a plan to achieve them. Identify the key weaknesses that are holding you or your company back and work to address them. Create pressure for yourself to achieve your goals by setting deadlines and sticking to them. Take care of yourself by getting enough sleep, exercising regularly, and eating healthy. The key to being productive is to focus on your most important tasks and to avoid distractions.

This method can summarize 5 clips into one paragraph. However, some people might prefer summaries in other formats.

For more details about chain_type = Stuff or Map-reduce:

  • Stuff: This method involves combining all your documents into a single prompt.
  • Map-reduce: This method summarizes each document individually in a “map” step and then combines these summaries into a final summary in the “reduce” step.
Figure: Stuff and Map-reduce chain types (Source: Link)

3. Custom Prompt Template for Summarization

To modify the summarization style, we use a custom prompt_template prompt template to guide the LLM in generating concise summaries in bullet point format. This method is useful for creating clear and easily digestible summaries, presenting key points in a structured manner.

### Input Code (Example for ENG_S) ###

# Define the prompt template
prompt_template = """
Please provide a summary of the following text as 3-5 bullet point style

TEXT:
{}

"""

# Format the prompt and generate the summary
final_prompt = prompt_template.format(clip_1_doc_ENG_S)
output = llm(final_prompt)
print(output)
### Output from 6 Clips (LLMs Model = text-bison@001) ###

# File 1 (ENG_S): #

The Tortoise and the Hare is a fable that teaches us that slow and steady wins the race.

Here are the key takeaways from the story:

* Donato, the tortoise, is slow but determined. He never gives up, even when he is far behind.
* Piti, the hare, is fast but overconfident. He stops to take a nap, and he is eventually overtaken by Donato.
* The moral of the story is that slow and steady wins the race. If you keep going, you will eventually reach your goal, even if it takes longer than you think.

# File 2 (ENG_M): #

1. GPT-4o is a new language model from OpenAI that is faster, more powerful, and easier to use than previous models.**
2. GPT-4o is available in the GPT store and can be used to create custom ChatGPTs.
3. GPT-4o can now be used for real-time audio and video interactions, as well as for tasks such as math problem solving, code generation, and translation.
4. GPT-4o is still under development, and OpenAI is working to address potential safety concerns.
5. GPT-4o will be available to all OpenAI users over the next few weeks.


File 3 (ENG_L): Error: 400
File 4 (THA_M): Error: 400
File 5 (THA_L): Error: 400

The custom prompt template is a highly flexible technique that can be tailored for various purposes. For instance, it can be used to summarize video meetings, instructional videos on Generative AI, Excel tutorials, and news videos, each with different expected outputs. You can adjust the prompt template as needed to achieve the desired summary style.

4. Custom Prompt in Map-Reduce Summarization with Text Splitter

As shown in Topic 2, the Map-Reduce Summarization Chain can summarize the content, but the output might not always meet expectations. To address this, we can customize the prompts in map_prompt and combine_prompt to get the desired output. In the following example, we want the output in Thai language and bullet point style.

### Input Code (Example for ENG_S) ###

map_prompt = """
สรุปข้อความด้านล่างเป็นภาษาไทย:
"{text}"
"""
map_prompt_template = PromptTemplate(template=map_prompt, input_variables=["text"])

combine_prompt = """
เขียนสรุปสั้นๆ เป็นภาษาไทย 3-4 bullet point.

```{text}```

"""
combine_prompt_template = PromptTemplate(template=combine_prompt, input_variables=["text"])

# Initialize text splitter
text_splitter = RecursiveCharacterTextSplitter(separators=["\n\n", "\n"], chunk_size=2000, chunk_overlap=200)
docs =text_splitter.split_documents(clip_1_doc_ENG_S)

# Setup and run summarization chain
summary_chain = load_summarize_chain(
llm=llm,
chain_type='map_reduce',
map_prompt=map_prompt_template,
combine_prompt=combine_prompt_template,
#verbose=True
)

# Run summarization chain and print output
output = summary_chain.run(docs)
print(output)
### Output from 6 Clips (LLMs Model = text-bison@001) ###

# File 1 (ENG_S): #
1. เต่าและกระต่ายแข่งกัน
2. เต่าชนะเพราะความมุ่งมั่นและอดทน
3. กระต่ายหลงระเริงกับชัยชนะจนหลับ
4. สัตว์ทั้งหลายต่างชื่นชมในความอดทนของเต่า

# File 2 (ENG_M): #
- GPT-4o 是 OpenAI 的新旗舰模型,它比 GPT-4 更快、更强大。
- GPT-4o 现在可以通过 ChatGPT 访问,无需注册即可使用。
- GPT-4o 可以理解和生成文本、视觉和音频内容。
- GPT-4o 是开源的,任何人都可以使用它。

File 3 (ENG_L):
- Google เปิดตัว Gemini ซึ่งเป็น AI ที่สร้างเนื้อหาได้
- Gemini เปลี่ยนวิธีการทำงานของเราไปอย่างสิ้นเชิง
- Google กำลังนำ AI เข้ามามีบทบาทสำคัญในสมาร์ทโฟน Android
- Google กำลังพัฒนา AI Hypercomputer ซึ่งเป็นสถาปัตยกรรมซูเปอร์คอมพิวเตอร์ที่ล้ำสมัย

File 4 (THA_M):
- อาร์แซน เวนเกอร์ เป็นผู้จัดการทีมชาวฝรั่งเศสที่ประสบความสำเร็จอย่างมากในการนำทีมอาร์เซนอลคว้าแชมป์มากมายในช่วง 10 ปีแรกของเขาที่สโมสร
- อาร์เซนอลเป็นทีมที่เล่นฟุตบอลได้สวยงามที่สุดในยุคนั้น โดยพวกเขามีกองกลางที่แข็งแกร่งอย่าง วิเอร่า และ เปตรืต ซึ่งทำให้พวกเขาประสบความสำเร็จอย่างมากในช่วงนั้น
- อาร์แซน เวนเกอร์ ตกยุคและไม่สามารถปรับตัวให้เข้ากับฟุตบอลสมัยใหม่ได้ ซึ่งทำให้ทีมอาร์เซนอลไม่สามารถคว้าแชมป์ได้ในช่วงหลายปีที่ผ่านมา
- อาร์เตต้า วางรากฐานฟุตบอลใหม่ให้อาร์เซนอล และมองระยะยาว
- อาร์เตต้า เน้นเรื่องแทคติกและการจัดหลังมาก
- อาร์เซนอล เน้นรายละเอียด ชุดข้อมูล การตัดสินใจในช่วงเวลาที่เหมาะสม และทีมที่ใหญ่กว่าเสมอ
- อาร์เซนอล มีสไตล์การเล่นที่ชัดเจน
- อาร์เซนอล มีพัฒนาการที่ดีขึ้นทุกปี
- อาร์เตต้า มีคาแรคเตอร์เหมือนเป๊ป กวาร์ดิโอลา

File 5 (THA_L):
1. ระบุเป้าหมายที่สำคัญที่สุดของคุณ
2. วางแผนแต่ละวันไว้ล่วงหน้า
3. ทำงานที่สำคัญที่สุดก่อน

As shown, the output meets my expectations: it is in bullet point format and Thai language. However, occasionally, it may include content in Chinese, which highlights a limitation of LLMs. Sometimes, they may not follow prompt instructions precisely.

We hope the 4 demonstrations above provide a clear understanding of how LLMs work in summarization tasks. For steps 5 onward, the code is quite lengthy, so I will only show the concept and the output of some cases that you can use as ideas to develop your summarization model.

5. Cluster-Based Summarization

For a more advanced approach, we use Cluster-Based Summarization with Embeddings and Dimensionality Reduction. This technique leverages machine learning methods to handle large and complex documents by identifying and summarizing the most representative parts.

The concept of this technique involves converting the entire document into vectors through an embedding process. If we were to plot these vectors on a graph (vector space), similar topics would cluster together, while different topics would be far apart. This is the core idea of Cluster-Based Summarization. We find the centroids of these clusters, and the vector nearest to each centroid represents the summarization topic. To visualize this, we use t-SNE to reduce the vector dimensions to 2D. In this demonstration, we assume the number of clusters is 5.

Figure: Centroids and nested vectors of each centroid

Note: Dimensionality reduction can affect the actual distances between vectors. As a result, some vectors that appear close together in 2D may actually be far apart in their original clusters.

The result for clip L (Google Keynote, Google I/O ’24) is shown below.

### Output from File 3 (ENG_L), (LLMs Model = gpt-4) ###

# File 3 (ENG_L): #

The text discusses a series of advancements in artificial intelligence (AI) technology, particularly those developed by Google. The first advancement is the launch of a new search experience called AI Overviews. This feature allows users to search for information in innovative ways, such as using photos. The text specifically highlights the improvements in Google Photos, where users can now use AI technology to search for specific photos or information. A new feature called Gemini allows users to delve deeper into their memories, such as asking when a specific event occurred or tracking progress over time. The text emphasizes that these improvements have led to increased user satisfaction and usage.

The text then discusses how advanced AI technology, specifically the Gemini model, is being used to predict the structure and interactions of molecules. This has the potential to accelerate biological and medical research. The text introduces Gemini 1.5 Flash, a lighter-weight model designed for low latency and cost-efficiency, while still maintaining multimodal reasoning capabilities. The text also mentions ongoing research and development efforts to push the boundaries of AI technology and create new products for a global audience.

The text also discusses the introduction of Gemini in Gmail, which offers contextual smart replies. These replies suggest customized options based on the content of the email thread. Users can easily choose from options like declining a service or suggesting a new time, with the ability to preview and send the full reply. Gemini also aims to seamlessly integrate Workspace apps like Gmail, Drive, Docs, and Calendar, allowing for automated processes such as organizing receipts and tracking appointments. This feature can help freelancers and small businesses focus on their work rather than administrative tasks by automating processes like creating Drive folders and extracting relevant information from emails.

The text then discusses the development of advanced agentive experiences with Gemini, focusing on new ways of working with AI. It introduces the concept of a virtual Gemini-powered teammate named Chip, who has a specific role and objectives within a team. Chip is designed to monitor and track projects, organize information, provide contexts, and assist in various tasks. The text also demonstrates how Chip interacts in Google chat rooms, showcasing its capabilities in a collaborative team environment. The text explores the integration of AI into teamwork to enhance collective experiences and shared expertise.

Finally, the text discusses the use of LearnLM in YouTube to make educational videos more interactive. This feature allows viewers to ask questions, receive explanations, and take quizzes. The feature is rolling out to select Android users and is being extended beyond Google products through partnerships with experts and institutions. Google is also collaborating with educators to develop generative AI tools, such as new ways to simplify lesson planning in Google Classroom. The text highlights the progress made in AI technology and emphasizes the importance of making AI helpful for everyone. The text concludes with excitement about future developments in AI and collaboration with the audience.

This advanced method helps handle complex and lengthy documents by focusing on the most representative parts and generating detailed summaries. Additionally, using machine learning techniques like clustering can help reduce LLM costs. This example demonstrates how combining ML and LLM techniques can create the desired output efficiently.

6. Structured Summarization with Informative Titles

This technique focuses on generating summaries that include informative titles, called “Topics and Details,” making the content easier to understand and navigate. It uses an OutputParser to create a structured output in a Topic and Detail format, as shown below:

### Output from File 4 (THA_M), (LLMs Model = text-bison-32k) ###
**Topic:** เส้นทางการเป็นนักสื่อสารออนไลน์ของเภสัชกร
**Summary:** เภสัชกรที่ผันตัวมาเป็นนักสื่อสารออนไลน์อย่างคุณเคน สิทธิชัย ได้เล่าถึงจุดเปลี่ยนในชีวิตที่ทำให้เขาค้นพบความชอบที่แท้จริงของตัวเองในการเขียนหนังสือและการสื่อสาร จากการที่ได้อ่านนิตยสารอดีตและได้ร่วมงานกับนิตยสารดังกล่าวในเวลาต่อมา คุณเคนได้เล่าถึงประสบการณ์การฝึกงานที่นิตยสารอดีตที่ทำให้เขาได้พบกับบุคคลที่มีความคิดสร้างสรรค์และเปิดโลกทัศน์ของเขาให้กว้างขึ้น จนทำให้เขาตัดสินใจที่จะทำงานในสายงานสื่อสารออนไลน์

**Topic:** เส้นทางสายนักเขียนกีฬา
**Summary:** การเดินทางของนักเขียนกีฬาที่เริ่มต้นจากความรักในฟุตบอล แม้จะไม่ได้เป็นนักฟุตบอลอาชีพ แต่ก็ยังคงตามความฝันด้วยการเขียนบทความเกี่ยวกับฟุตบอล แม้ว่าในยุคนั้นอาชีพนักเขียนกีฬาจะยังไม่เป็นที่ยอมรับ แต่ด้วยความมุ่งมั่นและความพยายาม ก็สามารถพิสูจน์ตัวเองจนประสบความสำเร็จในอาชีพนี้ได้

**Topic:** ฟุตบอลเหมือนศาสนา
**Summary:** ฟุตบอลเป็นมากกว่ากีฬา มันเหมือนกับศาสนาที่ผู้คนตื่นขึ้นมาก็เป็นมัน นอนก็เป็นมัน อยู่กับมันก็เป็นมัน วันๆ อ่านข่าวสารก็อ่านเกี่ยวกับมัน เราสุขก็สุขกับมัน เราทุกข์ก็ทุกข์กับมัน นอกเหนือจากการทำงาน เสียชีวิต ครอบครัว ฟุตบอลถ้าใครรักฟุตบอลมากๆ มันเป็นส่วนหนึ่งของชีวิต มันเป็นศาสนาอย่างแท้จริง

**Topic:** บทเรียนชีวิตจากนักฟุตบอลระดับโลก
**Summary:** บทความนี้พูดถึงอิทธิพลของนักฟุตบอลที่มีต่อชีวิตของผู้คน โดยเฉพาะอย่างยิ่งในเรื่องของการใช้ชีวิตและการทำงาน นักฟุตบอลระดับโลกหลายคนมีแนวคิดและปรัชญาในการใช้ชีวิตที่น่าสนใจและสามารถนำมาปรับใช้ในชีวิตประจำวันได้ เช่น เดนนิส เบิร์กแคมป์ที่เน้นเรื่องความสง่างามและพื้นฐานที่แน่น หรือเมสซี่ที่เน้นเรื่องการใช้สมองในการเล่นฟุตบอล ซึ่งแนวคิดเหล่านี้สามารถนำมาปรับใช้ในการทำงานหรือการใช้ชีวิตประจำวันได้ เช่น การเน้นเรื่องพื้นฐานที่แน่นก่อนที่จะทำสิ่งที่หวือหวา หรือการใช้ความคิดและไหวพริบในการแก้ปัญหาต่างๆ

**Topic:** ยุคทองของอาร์เซนอลในช่วง 10 ปีแรกของเวนเกอร์
**Summary:** ช่วง 10 ปีแรกของอาร์เซนอลภายใต้การนำของเวนเกอร์ถือเป็นยุคทองของสโมสร โดยเวนเกอร์ได้นำเสนอสไตล์การเล่นแบบใหม่ที่เน้นการต่อบอลบนพื้นและการไล่บอลจากข้างหลังขึ้นหน้า ซึ่งเป็นสิ่งที่แปลกใหม่ในวงการฟุตบอลยุคนั้น นอกจากนี้เวนเกอร์ยังได้แนะนำนักเตะใหม่ๆ เข้ามาในวงการฟุตบอลอังกฤษ ซึ่งในอดีตยังไม่มีต่างชาติเยอะขนาดนี้ ซึ่งก็เป็นยุคทองฝรั่งเศสพอดีก็เลยกองรีอะไรต่างๆก็เลยก็เลยเข้ามา ซึ่งนักเตะเหล่านี้ได้นำวิธีการเล่นที่แตกต่างเข้ามาสู่ทีม ทำให้ทีมประสบความสำเร็จอย่างมากในช่วงเวลานั้น

**Topic:** การวิเคราะห์จุดอ่อนของอาร์เซนอลในยุคหลังของเวนเกอร์
**Summary:** บทความวิเคราะห์จุดอ่อนของอาร์เซนอลในยุคหลังของเวนเกอร์ โดยเน้นที่การขาดความสามารถในการแข่งขันกับทีมใหญ่, ความใจใหญ่ของทีมที่ลดลง, และการขาดความเป็นแชมป์เปี้ยนในทีม

**Topic:** บทวิเคราะห์ความล้มเหลวของอาร์เซนอลและการฟื้นฟูทีมโดยมิเกล อาร์เตต้า
**Summary:** บทความวิเคราะห์ความล้มเหลวของอาร์เซนอลในอดีตและการฟื้นฟูทีมโดยมิเกล อาร์เตต้า โดยเน้นที่ความสำคัญของการสร้าง mentality ที่แข็งแกร่งและการสร้างวัฒนธรรมแห่งความสำเร็จในทีม

**Topic:** การวิเคราะห์แนวทางการทำทีมของ Mikel Arteta
**Summary:** บทความวิเคราะห์แนวทางการทำทีมของ Mikel Arteta ผู้จัดการทีม Arsenal โดยเน้นที่การพัฒนาแท็กติกและการสร้างแรงบันดาลใจให้กับนักเตะ รวมถึงการสร้างความสัมพันธ์ที่ดีกับแฟนบอล

**Topic:** การวิเคราะห์จุดแข็งของอาร์เซนอลในฤดูกาล 2022/23
**Summary:** บทความวิเคราะห์จุดแข็งของอาร์เซนอลในฤดูกาล 2022/23 โดยเน้นที่การพัฒนาของผู้รักษาประตู David Raya และการยิงประตูจากลูกเตะมุม ซึ่งเป็นอาวุธใหม่ที่ช่วยให้ทีมมีโอกาสทำประตูมากขึ้น นอกจากนี้ยังมีการพูดถึงความสำคัญของกองหลังที่เหนียวแน่นและสุขภาพที่ดีของผู้เล่นในทีม

**Topic:** การวิเคราะห์โอกาสคว้าแชมป์พรีเมียร์ลีกของอาร์เซนอลในฤดูกาลหน้า
**Summary:** บทความนี้วิเคราะห์โอกาสคว้าแชมป์พรีเมียร์ลีกของอาร์เซนอลในฤดูกาลหน้า โดยผู้เขียนมองว่าอาร์เซนอลมีโอกาสสูงมากที่จะคว้าแชมป์ในฤดูกาลหน้า เนื่องจากทีมมีการพัฒนาอย่างต่อเนื่องในช่วงหลายปีที่ผ่านมา และในฤดูกาลนี้ทีมก็มีนักเตะที่เก่งกาจหลายคน โดยเฉพาะอย่างยิ่ง กาเบรียล เชซุส และ กาเบรียล มาร์ติเนลลี นอกจากนี้ ผู้เขียนยังมองว่าแมนเชสเตอร์ ซิตี้ คู่แข่งสำคัญของอาร์เซนอลในฤดูกาลนี้ อาจจะฟอร์มตกในฤดูกาลหน้า เนื่องจากเป๊ป กวาร์ดิโอลา ผู้จัดการทีมของแมนเชสเตอร์ ซิตี้ กำลังจะหมดสัญญากับสโมสรในช่วงซัมเมอร์นี้ และอาจจะย้ายไปคุมทีมอื่น

**Topic:** ไลฟ์สไตล์สายสปอร์ต: เทรนด์ใหม่ที่กำลังมาแรง
**Summary:** บทความนี้พูดถึงแนวโน้มใหม่ของไลฟ์สไตล์สายสปอร์ตที่กำลังได้รับความนิยมในปัจจุบัน ซึ่งไม่เพียงแต่จะครอบคลุมถึงการเล่นกีฬาเท่านั้น แต่ยังรวมถึงแฟชั่น การออกกำลังกาย และการใช้ชีวิตแบบมีสุขภาพดีด้วย โดยมีการยกตัวอย่างแบรนด์ต่างๆ ที่หันมาทำไลน์ผลิตภัณฑ์เกี่ยวกับกีฬา รวมถึงการนำเสนอเรื่องราวของนักกีฬาและบุคคลที่มีชื่อเสียงในวงการกีฬาเพื่อเป็นแรงบันดาลใจให้กับผู้อ่าน

This technique ensures that each summary is clear and well-organized, with informative titles that make it easy to navigate the content. The structured format helps quickly identify key points and understand the main topics covered in the document.

7. Refined Summarization

For very long documents, a common issue is the “loss in the middle,” where important information gets overlooked. The Refined technique addresses this problem by iteratively improving a summary through successive steps of incorporating additional documents or information. It begins with an initial summary and continuously refines it, ensuring the final summary is comprehensive and accurate. The process is:

  1. Create an initial summary using the first document or a subset of the documents.
  2. Introduce the next document to the existing summary.
  3. Repeat the process with each subsequent document.
  4. Conduct a final review of the refined summary.
Figure: Example of Refined Summarization Concept (4 Chunks)
### Output from File 5 (THA_L), (LLMs Model = text-bison-32k) ###
The book "Eat That Frog!" by Brian Tracy is a time management and productivity guide that offers practical strategies for overcoming procrastination and achieving personal and professional success. Here's a detailed summary of the key points covered in the book:

**1. The Importance of Setting Priorities:**
- Prioritize tasks based on their importance and urgency.
- The "ABCDE" method can help you categorize tasks and focus on the most critical ones.
- Identify your "key result areas" and focus your efforts on activities that align with your long-term goals.

**2. Overcoming Procrastination:**
- Practice "creative procrastination" by choosing to delay less important tasks and focusing on high-value activities.
- Learn to say "no" to non-essential tasks and commitments.
- Break down large tasks into smaller, manageable steps to make them less daunting.

**3. Time Management Techniques:**
- Use the "time blocking" technique to allocate specific time slots for different tasks and activities.
- Prepare thoroughly before starting a task to avoid distractions and interruptions.
- Follow the "80/20 rule" by focusing on the 20% of activities that yield 80% of the results.

**4. Developing Key Skills:**
- Identify and develop your core competencies to become more efficient and productive.
- Continuously learn and acquire new skills to stay relevant and adaptable in your field.
- Invest time in activities that enhance your income-generating abilities.

**5. Identifying and Overcoming Limitations:**
- Recognize and address the limitations that hinder your progress, both internal and external.
- Set challenging goals and take responsibility for your own success.
- Create self-imposed deadlines to overcome procrastination.

**6. Maintaining Physical and Mental Well-being:**
- Prioritize sleep, exercise, and a healthy diet to maintain high energy levels and mental clarity.
- Take regular breaks and practice mindfulness to reduce stress and improve focus.
- Cultivate a positive mindset and avoid dwelling on negative thoughts.

**7. Managing Technology:**
- Be mindful of technology use and avoid distractions.
- Set boundaries and allocate specific times for checking emails and social media.
- Create "technology-free" periods to recharge and enhance productivity.

**8. Overcoming Perfectionism:**
- Break down large tasks into smaller, achievable steps to build momentum.
- Embrace the "80% rule" and focus on completing tasks well enough rather than striving for perfection.
- Celebrate your accomplishments and progress along the way.

**9. Building Habits and Consistency:**
- Develop a consistent routine and stick to it to build positive habits.
- Practice "habit stacking" by linking new habits to existing ones.
- Reward yourself for completing tasks and achieving goals.

**10. Achieving Flow State:**
- Cultivate a sense of urgency to enter a state of flow, where you experience peak performance and creativity.
- Stay focused and avoid distractions to maintain flow.
- Practice mindfulness and meditation to enhance your ability to enter flow states.

**11. The Power of Focus:**
- Concentrate on one task at a time and avoid multitasking.
- Eliminate distractions and create a conducive work environment.
- Use time-blocking and the Pomodoro Technique to maintain focus.

**12. Continuous Improvement:**
- Continuously seek feedback and identify areas for improvement.
- Set SMART (Specific, Measurable, Achievable, Relevant, Time-bound) goals to track your progress.
- Embrace a growth mindset and be open to learning and adapting.

**13. Effective Communication:**
- Practice active listening and seek to understand others' perspectives.
- Communicate clearly and concisely, both verbally and in writing.
- Build rapport and trust through effective communication.

**14. Building Relationships:**
- Nurture relationships with colleagues, clients, and industry peers.
- Provide value and support to others to strengthen your network.
- Attend industry events and participate in professional organizations.

**15. Delegation and Teamwork:**
- Delegate tasks to free up your time for more important activities.
- Choose the right people for the job and provide clear instructions.
- Foster collaboration and teamwork to achieve shared goals.

**16. Managing Stress:**
- Identify and address the sources of stress in your life.
- Practice relaxation techniques such as deep breathing, meditation, and exercise.
- Set boundaries and learn to say "no" to avoid burnout.

**17. Financial Management:**
- Create a budget and track your expenses to gain control of your finances.
- Invest in assets that generate passive income and secure your financial future.
- Seek professional advice to make informed financial decisions.

**18. Health and Wellness:**
- Prioritize your health by eating a balanced diet, exercising regularly, and getting enough sleep.
- Manage stress and practice self-care to maintain physical and mental well-being.
- Seek medical attention for any health concerns.

**19. Personal Growth and Development:**
- Continuously learn and expand your knowledge and skills.
- Set personal development goals and work towards achieving them.
- Seek mentorship and coaching to accelerate your growth.

**20. Time for Family and Friends:**
- Make time for your loved ones and prioritize quality relationships.
- Find a balance between work and personal life to avoid burnout.
- Create family traditions and rituals to strengthen your bonds.

**21. Living a Balanced Life:**
- Strive for balance in all aspects of your life, including work, family, health, and personal interests.
- Set boundaries and avoid overcommitting yourself.
- Practice self-compassion and forgive yourself for mistakes.

By applying the principles and strategies outlined in "Eat That Frog!", readers can enhance their productivity, achieve their goals, and live a more fulfilling and balanced life.

This technique is ideal for handling long and complex documents, ensuring that all critical information is captured and accurately summarized.

8. Topic Extraction and Summarization

Sometimes, summarization can be too brief, only highlighting the main topics without providing sufficient details. To address this issue, we can break down the process into two steps: first, we use LLMs to extract topics from the content; second, we request the LLM to summarize all details within each extracted topic.

Figure: Topic Extraction and Summarization Concept
### Output from File 3 (ENG_M), (LLMs Model = gemini-1.5-pro) ###

Meeting Content:

Topic 1: Importance of Broad Product Availability

- A very important part of our mission is to make our advanced AI tools available to everyone for free.
- We think it is very, very important that people have access to this technology and see for themselves what it can do.
- We really want to pair the technology with a broader understanding of its capabilities and limitations.
- We are always finding ways to reduce friction so everyone can use ChatGPT wherever they are.
- Recently, we made ChatGPT available without the sign-up flow to reduce barriers to access.

Topic 2: Introducing the ChatGPT Desktop Version

Speaker: Mira Murati
Details:
- OpenAI is releasing a desktop version of ChatGPT to make it accessible from anywhere.
- The desktop version is designed to integrate seamlessly into users' workflows.
- The UI has been refreshed to provide a more natural and user-friendly experience, even as the underlying model becomes more complex. The goal is to minimize distractions from the UI so users can focus on collaborating with ChatGPT.

Topic 3: Launching the New GPT-4o Model

Speaker: Mira Murati
Key Points:
- Introducing GPT-4o: Murati announces the release of their newest flagship model, GPT-4o, met with applause from the audience.
- Key Improvement - Speed and Efficiency: GPT-4o is described as providing the intelligence of GPT-4 but with significantly faster processing speeds.
- Benefits of Increased Efficiency: The enhanced efficiency allows OpenAI to offer GPT-4o's capabilities to all users, including those on the free tier, a goal they've been working towards for months.
Note: This section focuses solely on the announcement and initial description of the GPT-4o model, as per the instructions. Information on other topics discussed during the event is excluded from this summary.

Topic 4: TopiGPT-4o's Multimodal Capabilities (Voice, Text, Vision)

This section focuses on the live demonstrations showcasing GPT-4o's capabilities in understanding and responding to voice, text, and visual input.

Real-Time Conversational Speech
- Seamless Interaction: Mark Chen highlights key differences between GPT-4o and previous voice modes:
-- Interruption: Users can interrupt the model's speech, enabling natural conversation flow.
-- Real-time Responsiveness: GPT-4o responds instantly, eliminating the awkward lag in previous versions.
-- Emotion Detection: The model can perceive emotions from vocal cues, like rapid breathing.
-- Diverse Voice Styles: GPT-4o can generate speech in various styles, from dramatic to robotic to singing.
- Live Demo - Breathing Exercise and Bedtime Story:
-- Mark asks GPT-4o for help with nervousness before the demo. The model suggests deep breaths and provides feedback on his breathing, demonstrating real-time interaction and emotion detection.
-- Mark requests a bedtime story about robots in love for Barrett, specifying different emotional tones and even a singing voice, showcasing GPT-4o's diverse vocal range.

Vision Capabilities
- Interacting with Visual Information: Barrett Zoph demonstrates how GPT-4o can "see" and understand visual information.
- Live Demo - Solving a Linear Equation:
-- Barrett writes a linear equation on paper and asks GPT-4o for help solving it without revealing the solution.
-- GPT-4o correctly identifies the equation from the image and guides Barrett through the steps, demonstrating its ability to process and understand visual input.
-- The demo highlights the potential applications of GPT-4o in educational settings.
- Live Demo - Analyzing Code and Plots:
-- Barrett presents code to GPT-4o, which accurately summarizes its function.
-- He then runs the code, generating a plot, and GPT-4o analyzes the plot, identifying trends and answering questions about specific data points.
-- This demo showcases GPT-4o's ability to understand both code and its visual output, highlighting its potential for complex tasks involving data analysis and visualization.

Real-Time Translation and Emotion Recognition from Images
- Audience Q&A: Mira Murati addresses audience questions about GPT-4o's capabilities.
- Live Demo - Real-Time Translation:
-- Mark asks GPT-4o to act as a translator between English and Italian.
-- Mira speaks in Italian, and GPT-4o accurately translates her question into English.
-- Mark responds in English, and GPT-4o translates it into Italian.
-- This demo demonstrates GPT-4o's real-time translation capabilities.
- Live Demo - Emotion Recognition from Images:
-- Barrett asks GPT-4o to identify his emotions from a selfie.
-- Initially, GPT-4o misinterprets the image but quickly corrects itself and accurately identifies Barrett's emotions as happy and cheerful.
-- This demo showcases GPT-4o's ability to recognize emotions from facial expressions in images.
Conclusion
The live demonstrations highlight GPT-4o's impressive multimodal capabilities, showcasing its ability to seamlessly integrate voice, text, and vision. These advancements pave the way for more natural and intuitive interactions with AI, opening up new possibilities in various fields.

Topic 5: Expanding Access to Advanced Features for Free Users

Mira Murati: Today, we have 100 million people using ChatGPT. They use it to create, to work, to learn. And we have these advanced tools that are only available to our paid users, at least until now. With the efficiencies of 4o, we can bring these tools to everyone. So starting today, you can use GPTs in the GPT store. So far we have had more than a million users create amazing experiences with GPTs. These are custom ChatGPTs and they are available in the store. And now our builders have a much bigger audience where university professors can create content for their students, or podcasters can create content for their listeners.
You can also use vision. So now you can upload screenshots, photos, documents containing both text and images. You can start conversations with ChatGPT about all of this content. You can also use memory, where it makes ChatGPT far more useful and helpful because now it has a sense of continuity across all of your conversations. You can use browse, where you can search for real-time information in your conversation. And advanced data analysis, where you can upload charts and any tools and analyze this information. It will give you answers and so on.
We are very, very excited to bring GPT-4o to all of our free users out there. And for the paid users, they will continue to have up to five times the capacity limits of our free users.

GPT-4o API for Developers:
- GPT-4o is also available through an API, allowing developers to build and deploy AI applications at scale.
- GPT-4o offers several advantages over GPT-4 Turbo:
-- Speed: 4o is faster than GPT-4 Turbo.
-- Cost: 4o is 50% cheaper than GPT-4 Turbo.
-- Rate Limits: 4o has five times higher rate limits compared to GPT-4 Turbo.

Topic 6: Safety and Collaboration in AI Deployment

Speaker: Mira Murati
Content:
Mira Murati briefly addressed the challenges of deploying powerful AI technologies like GPT-4o safely and responsibly. She acknowledged the complexities and new safety concerns arising from real-time audio and vision processing capabilities.
Murati emphasized that the OpenAI team has been actively working on mitigating potential misuse of these features. She highlighted the importance of collaboration in addressing these challenges, stating that OpenAI is engaged in ongoing discussions with various stakeholders. These stakeholders include:
- Government bodies
- Media organizations
- Entertainment industry representatives
- Various industry leaders
- Civil society groups

The goal of these collaborations is to gather diverse perspectives and insights to ensure the responsible and beneficial integration of GPT-4o and similar technologies into society.

I hope the demonstration of these 8 examples helps you understand how to apply this technique to your work. It’s important to note that there isn’t a one-size-fits-all summarization model. The best approach depends on your preferred style of summarization. Some people want concise versions, others prefer bullet point formats, and some need detailed information. You must customize the prompt to match your expectations.

Data Science

26 stories

Dashboard

3 stories

Donato_Journey

5 stories

Course_Review

3 stories

Your engagement and insights are invaluable. Feel free to share your thoughts, questions, or insights below, or connect with me on

Medium: medium.com/donato-story
Facebook:
web.facebook.com/DonatoStory
Linkedin:
linkedin.com/in/nattapong-thanngam

--

--

Donato_TH
Donato Story

Data Science Team Lead at Data Cafe, Project Manager (PMP #3563199), Black Belt-Lean Six Sigma certificate