The community members are discussing how to create a book embedding where each chapter is a separate node, so that a user can query for a summary of a specific chapter. The main points are:
- Creating a single node per chapter may not be feasible due to token limits, so a set of nodes with defined relations for each chapter is suggested instead.
- The community members discuss using metadata or the DocumentSummaryIndex to help with queries like "summarize chapter 3".
- There is a discussion around using a vector database and a retriever to get the relevant nodes based on metadata filters, but there are concerns about the token limit still being an issue.
There is no explicitly marked answer in the comments.
hi all, if i am embedding a book, is there a way to make each chapter a node, so that when i ask "summarize chapter x" it works through this node only? would appreciate guidance. thank you!
thank you , the chapters are not small , 3-4 pages of text, will the basic-usage-pattern be enough to address queries like "summarize chapter 3" as an example?
Not entirely though. You can try adding metadata to each chapter or try DocumentsummaryIndex along with metadata. This may be able to help you in query like these.
I was just wondering, I was thinking if he was using a vector db, he could do what you said with a chapter in each node's metadata, use a retriever to get all of the nodes there and then pass into documentSummaryIndex
Yeah but while response generation all the nodes may not get used if the node length crosses token limit, that's what I'm thinking. So it may look half cooked response