Find answers from the community

Updated 3 days ago

Creating Summaries with DocumentSummaryIndex

Hello, I'm using DocumentSummaryIndex to create summaries of all the documents that I have. I have the code that uses an extended BaseExtractor class that would create extra metadata and also have the code that would loop through and append the metadata.

However, I ran into some code that showed that this may be done by sending an extractor into the DocumentSummaryIndex builder
summary_index = DocumentSummaryIndex.from_documents( documents=documents, transformations=[splitter], response_synthesizer = response_synthesizer, extractors=[sentiment_extractor], )
The above code doesn't work; the extractor is never called. Is there a way of doing the above? It's cleaner than the approach I currently have
W
1 comment
I think you are passing the extractor at the wrong place, Please have a look at this example: https://docs.llamaindex.ai/en/stable/examples/metadata_extraction/MetadataExtractionSEC/
Add a reply
Sign up and join the conversation on Discord