Skip to main content

Prompt Coverage

Overview of Coverage Feature

The Coverage feature in Unstract shows how your prompts perform across multiple documents in your collection. It provides visibility into the extraction results for each prompt across all documents, allowing you to verify consistency and adjust prompts as needed.

How to Access and Understand Coverage

  1. View Coverage Information:

    • When a prompt is created and executed, you'll see a "Coverage" indicator below each prompt (The anchor link in blue color).
    • The format shows "Coverage: X of Y docs" where:
      • X = The number of documents with successful extractions
      • Y = The total number of documents processed by this prompt
  2. Accessing Detailed Coverage:

    • Click on the "Coverage" link to open a detailed view showing results across all documents.
    • This opens a modal window with comprehensive information about how the prompt performed.
  3. Coverage Details Window:

    • The top section shows configuration details:
      • Profile Name, LLM, Chunk Size, Vector Store, Embedding Model, etc.
      • These indicate which components were used for processing
  4. Document Variants Tab:

    • Lists all documents that were processed by this prompt
    • Shows token count for each document
    • Displays the extracted value for each document
    • Green checkmarks indicate successful extractions
  5. Navigation:

    • Use pagination controls at the bottom to navigate between multiple pages of results

img Prompt Studio project

Benefits and Use Cases

  1. Cross-Document Verification:

    • Verify that your prompt works consistently across different document formats and sources
    • In the example, the "account_holder_name" prompt successfully extracted names from two different documents:
      • "JOSEPH PAULSON" from "Amex.pdf"
      • "NARENDRAN HARIPARANTHAMAN" from "BoFA_creditcard.pdf"
  2. Prompt Optimization:

    • If extraction fails or returns unexpected results for certain documents, you can adjust your prompt
    • Compare successful vs. unsuccessful extractions to identify patterns and improve prompts
  3. Quality Assurance:

    • Ensure that all your documents are being properly processed
    • Identify any documents that may require special handling or different prompts

By effectively utilizing the Coverage feature, you can ensure your extraction prompts deliver consistent, reliable results across your entire document collection.