forrtproject / forrtproject/flora-extractor

Direct-PDF rung: ask for outcome and classification, not references only (supersedes #92)

Open
#194 0 comments 0 reactions 0 assignees View on GitHub
stage-3
Dominant language
Python
Stars
2
Forks
1
Avg merge
1d 6h
Merged PRs (30d)
4

Description

The combined target-and-outcome call (`resolve_targets_and_outcomes()` in `shared/llm_client.py`) now serves the abstract, reference-list and full-text rungs over PARSED text, and asks for the target AND the outcome in one call. The outcome half of #92 therefore exists for every rung that reads parsed text.

**What is still missing.** The direct-PDF call — the whole document handed to `PDF_PARSE_MODEL` — asks for references only. Its one call site is `shared/grobid.py:349`, which sends `PDF_REFERENCES_PROMPT` through `call_gemini_with_pdf()` (`shared/llm_client.py:1044`). It never asks for an outcome or a record-type classification, so a document that only the direct-PDF path could read yields references and nothing else.

**Remaining sub-asks carried over from #92:**

- Page subsetting — send only the relevant pages rather than the whole document.
- Media resolution — the call is pinned to `MEDIA_RESOLUTION_LOW` for cost; whether that is right for scanned documents is untested.

**Scale today (read off `data/extracted.csv`, 2026-08-13):** `llm_fulltext` is 27 of 2,335 shipped rows. Low priority.

Supersedes #92.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at shared/grobid.py:349 and follow PDF_REFERENCES_PROMPT through call_gemini_with_pdf() in shared/llm_client.py:1044. Compare this direct-PDF path with resolve_targets_and_outcomes() and inspect data/extracted.csv for current coverage. Done means the direct-PDF path provides outcome and record-type classification, with page subsetting and media-resolution behavior addressed or explicitly evaluated.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.