Unstructured-IO / Unstructured-IO/unstructured

[Feature Request] Add document layout analysis confidence scores

Open
#4,320 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
15.5k
Forks
1.3k
Avg merge
4d 2h
Merged PRs (30d)
13

Description

Feature Description

Include confidence scores for each extracted element to help downstream processing decide which elements to trust.

Use Case

In our enterprise RAG pipeline, we process thousands of PDFs daily. Some elements are extracted with low confidence (rotated tables, scanned handwritten notes). Having confidence scores would let us:

  1. Filter out low-confidence extractions
  2. Route uncertain elements to manual review
  3. Weight chunk importance in retrieval

Current Behavior

All extracted elements are treated equally regardless of extraction quality.

Proposed Enhancement

element.metadata.confidence_score  # 0.0 - 1.0
element.metadata.extraction_method  # 'ocr', 'native', 'inferred'

This would significantly improve RAG quality for noisy document sources. Thank you!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no implementation files, tests, or entry points. Start by locating the element metadata and document-layout extraction path, then determine how confidence_score and extraction_method should be produced; done means each extracted element exposes the proposed metadata with the stated score range and method values.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data, machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.