Find answers from the community

Updated 4 months ago

SummaryIndex and DocumentSummaryIndex

At a glance
The post asks about the difference between SummaryIndex and DocumentSummaryIndex, and which one is best to use for creating a "decomposition structured summary" for a document. The comments explain that SummaryIndex (previously called ListIndex) does not keep a summary of nodes, while DocumentSummaryIndex keeps a summary of each document object and maps it to the related nodes. The community members suggest that for the given use case, DocumentSummaryIndex would be the better choice. However, one community member also mentions that a ListIndex/SummaryIndex could also work fine, though they are unsure about the meaning of "decomposition structured summary".
Useful resources
Can someone tell the difference between SummaryIndex and DocumentSummaryIndex?
In general, if I need to create a decomposition structured summay for a document text, which Index is the best to use for this purpose ?
W
Y
L
4 comments
SummaryIndex was earlier called List index, It does not keep summary of any node, Based on the query, would fetch the nodes and would generate the response.

Whereas Document SummaryIndex would keep summary of each Document object created and will map the summary with each of the relatd node.

For your usecase, Document SummaryIndex would be best way to go.

You can find more on these here:
https://gpt-index.readthedocs.io/en/latest/examples/index_structs/doc_summary/DocSummary.html

https://gpt-index.readthedocs.io/en/stable/core_modules/data_modules/index/index_guide.html#summary-index-formerly-list-index
Thank you for the information πŸ™πŸ½
I'm not sure I understand why in my case you think DocumentSummaryIndex would be better.. I'm not using many documents.. I got only one.. I need to extract a breakdown/decomposition from it.
As per your requirement, you wanted to create a structured summary for your document right!


So document summary index will do that, it will create the summary and you can access the summary for each document from the index.
I think a ListIndex/SummaryIndex will also work fine too. Although I'm not sure what a "decomposition structured summay" is πŸ˜…
Add a reply
Sign up and join the conversation on Discord