Hi, I’m doing a website and I need a tool to summarize an entire book. If anyone knows how to do it, I would be very grateful if you would share it with us.
Welcome to the community!
Are they well known books? It’s quite possible that GPT has already “read” them. Just ask for a summary!
If they’re not well known books, there are a couple of approaches. My go-to for long texts is a rolling report, and creating a summary from that. It’s also possible that a summary of chapters, and then a summary of summaries would suffice.
thank you for your welcome!!
No, what I’m looking for is to make a tool that allows me to upload the pdf and give me a summary. I have been trying to do it through Python with the open ai API but I have not been able to do it.
I was wondering if anyone has done it so that the community and I can benefit?
where have you gotten stuck?
There’s multiple levels of sophistication, depending on your budget, and complexity of the work you’re handling
- summary of summaries with gpt-3.5
graph TD
C1[Chapter 1] --> S1[Summary of Chapter 1 with GPT-3.5]
C2[Chapter 2] --> S2[Summary of Chapter 2 with GPT-3.5]
C3[Chapter 3] --> S3[Summary of Chapter 3 with GPT-3.5]
C4[Chapter 4] --> S4[Summary of Chapter 4 with GPT-3.5]
C5[Chapter 5] --> S5[Summary of Chapter 5 with GPT-3.5]
S1 --> SS[Summary of Summaries with GPT-3.4 or GPT-4]
S2 --> SS
S3 --> SS
S4 --> SS
S5 --> SS
SS --> O[Output]
- rolling summary with gpt-3.5
graph TD
C1[Chapter 1] --> S1[Summary of Chapter 1 with GPT-3.5]
S1 --> RS2[Rolling Summary of Chapter 2 with GPT-3.5]
C2[Chapter 2] --> RS2
RS2 --> RS3[Rolling Summary of Chapter 3 with GPT-3.5]
C3[Chapter 3] --> RS3
RS3 --> RS4[Rolling Summary of Chapter 4 with GPT-3.5]
C4[Chapter 4] --> RS4
RS4 --> RS5[Rolling Summary of Chapter 5 with GPT-3.5]
C5[Chapter 5] --> RS5
RS5 --> O[Output]
-
whole book summary with gpt-4
-
Synopses With Context
graph TD
P1[Paragraph 1 + context] --> E1[Embedding P1]
E1 --> VDB[Vectordb]
P2[Paragraph 2 + context] --> PA2[Paragraph 2 abstract]
PA2 --> E2[Embedding P2]
E2 --> VDB
P3[Paragraph 3 + context] --> PA3[Paragraph 3 abstract]
PA3 --> E3[Embedding P3]
E3 --> VDB
PN[Paragraph n + context] --> PAN[Paragraph n abstract]
PAN --> EN[Embedding Pn]
EN --> VDB
C1[Chapter 1] --> CS1[Chapter 1 Synopsis]
C2[Chapter 2] --> ES2[Embedding search ch 2]
VDB --> ES2
ES2 --> PAO[Paragraph o..p Abstracts] --> CSC2[Chapter 2 Synopsis with Context]
C2 --> CSC2
C3[Chapter 3] --> ES3[Embedding search ch 3]
VDB --> ES3
ES3 --> PAO3[Paragraph o..p Abstracts] --> CSC3[Chapter 3 Synopsis with Context]
C3 --> CSC3
C4[Chapter 4] --> ES4[Embedding search ch 4]
VDB --> ES4
ES4 --> PAO4[Paragraph o..p Abstracts] --> CSC4[Chapter 4 Synopsis with Context]
C4 --> CSC4
C5[Chapter 5] --> ES5[Embedding search ch 5]
VDB --> ES5
ES5 --> PAO5[Paragraph o..p Abstracts] --> CSC5[Chapter 5 Synopsis with Context]
C5 --> CSC5
CS1 --> SOS[Synopsis of Synopses]
CSC2 --> SOS
CSC3 --> SOS
CSC4 --> SOS
CSC5 --> SOS
SOS --> O[Output]
VDB --> P2
VDB --> P3
VDB-->PN
Edit: the first box is Chapter 1, if it’s cut off for you too.
Some months ago I created a beta version of such a tool that automatically creates summaries of longer books/reports (focused on the specific domain I am working in). It essentially uses a hybrid of 1 and 2, i.e. for shorter chapters it creates a summary in one go while for longer chapters it applies the rolling summary approach, whereby a chapter is sub-divided into multiple parts. The latter helps to mitigate model attention loss for longer chapters even if they technically fit into the context window.
I would be very grateful if you would share it with all of us, I find what you have done very interesting and I think we can all benefit from your program
This idea is super cool. It’s a shame these tools weren’t around back in my uni days. Not everything I had to read in uni was my cup of tea, and honestly, I could’ve used that time for something way more useful)
The power of obedience by David ibiyeomie