Skip to content

UN-2444 [FEAT] Temporary-Integration for Agentic table extractor service#1390

Merged
harini-venkataraman merged 8 commits into
mainfrom
UN-2444-poc-test-accuracy-for-extracted-data-using-agentic-framework-for-table
Jul 2, 2025
Merged

UN-2444 [FEAT] Temporary-Integration for Agentic table extractor service#1390
harini-venkataraman merged 8 commits into
mainfrom
UN-2444-poc-test-accuracy-for-extracted-data-using-agentic-framework-for-table

Conversation

@harini-venkataraman

Copy link
Copy Markdown
Contributor

What

  • Introduced an async-based Rent Roll TSV extraction path under the TABLE type condition.
  • Integrated a dedicated RentRollExtractor that processes rent roll documents using a structured schema and adapter-based LLM config.
  • Added logging and basic exception handling for robustness.
  • Temporarily wired into the existing PSKeys.TABLE branch as an MVP/prototype implementation.

Why

  • To support structured extraction of rent roll tables based on field mapping.
  • Ensures completeness, accuracy, and traceability of extracted data for property management datasets.
  • Designed to be a temporary bridge before full production rollout.

How

  • Injected ToolAdapter.get_adapter_config() to fetch LLM metadata.
  • Created an instance of RentRollExtractor when document_type == "rent_rolls".
  • Captured the structured output and returned it under PSKeys.OUTPUT.
  • Added TODOs for logging metrics and metadata in future phases.

Can this PR break any existing features? If yes, please list possible items. If no, please explain why.

No.

  • The new logic is only activated when document_type == "rent_rolls", and all other table extractions remain unaffected.
  • On failure, the code falls back to the regular table extractor, ensuring backward compatibility.

Database Migrations

  • None

Env Config

RENTROLL_SERVICE_HOST=http://unstract-rentroll-service
RENTROLL_SERVICE_PORT=5001

  • Optional: Enable extended logging with DEBUG=true

Relevant Docs

Not applicable

Related Issues or PRs

UN-2444

Dependencies Versions

  • Python ≥ 3.9

Notes on Testing

  • Validated that the async extractor runs as expected and logger entries are populated.
  • Simulated exceptions to confirm fallback triggers correctly.

Screenshots

Checklist

I have read and understood the Contribution Guidelines.

pre-commit-ci Bot and others added 5 commits July 2, 2025 04:49
@github-actions

github-actions Bot commented Jul 2, 2025

Copy link
Copy Markdown
Contributor
filepath function $$\textcolor{#23d18b}{\tt{passed}}$$ SUBTOTAL
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_logs}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_cleanup}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_cleanup\_skip}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_client\_init}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_get\_image\_exists}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_get\_image}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_get\_container\_run\_config}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_get\_container\_run\_config\_without\_mount}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_run\_container}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_get\_image\_for\_sidecar}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_sidecar\_container}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{TOTAL}}$$ $$\textcolor{#23d18b}{\tt{11}}$$ $$\textcolor{#23d18b}{\tt{11}}$$

@sonarqubecloud

sonarqubecloud Bot commented Jul 2, 2025

Copy link
Copy Markdown

@harini-venkataraman harini-venkataraman changed the title UN-2444 [FEAT] Temporary-Integration for Agentic table extractor UN-2444 [FEAT] Temporary-Integration for Agentic table extractor service Jul 2, 2025

@gaya3-vijayakumar gaya3-vijayakumar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks safe to me.

@harini-venkataraman harini-venkataraman merged commit ba94ea1 into main Jul 2, 2025
6 checks passed
@harini-venkataraman harini-venkataraman deleted the UN-2444-poc-test-accuracy-for-extracted-data-using-agentic-framework-for-table branch July 2, 2025 07:39
pk-zipstack pushed a commit that referenced this pull request Aug 20, 2025
…ice (#1390)

* UN-2444 Temporary-Integration for Agentic table extractor

* UN-2444-Interface for Rent roll communication

* UN-2444 Envs

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* UN-2444 Sample env for rent rolls

Signed-off-by: harini-venkataraman <115449948+harini-venkataraman@users.noreply.github.com>

* Change ens to 5003

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: harini-venkataraman <115449948+harini-venkataraman@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants