Developing and verifying SummarizedExtraction
When developing your prompts in Prompt Studio, you can enable SummarizedExtraction and see how it affects your extractions. Of course, in Prompt Studio, you're only developing prompts and defining the extraction schema. Ultimately, SummarizedExtraction runs as part of a deployed Prompt Studio project as one of the following integration types:
However, while developing prompts, it is important to verify the performance of SummarizedExtraction. Prompt Studio provides various tools for you to be able to do that.
Enabling SummarizedExtraction in Prompt Studio
To enable SummarizedExtraction, open the Prompt Studio project's settings and navigate to SummarizedExtraction
.
Next, select an LLM that can create a summarized document based on your prompts. After that, enable the Summarize Context
to turn on summary generation. Finally, checking the Use summarized context as source
uses the summarized context to generate extraction responses.
Please note that this only enabled SummarizedExtraction for you to verify if everything is working well during prompt engineering. For SummarizedExtraction to be deployed, you need to turn it on in the deployment workflow. Please see the Deploying SummarizedExtraction section for details on how to do this.
Verifying SummarizedExtraction
Once SummarizedExtraction is enabled in Prompt Studio, you need to run all the prompts if sample documents are already present in the Prompt Studio project for their summaries to be generated. When you add new documents and they are indexed, their summarized versions are automatically created since SummarizedExtraction is turned on.
You can see that in Summary View
, you can now see the summarized version of the sample document created based on your prompts. You can see how compact the summary is, as compared to the Raw View
seen below.
It is important for you to verify that the individual prompt outputs look good.