Prompted Extraction Foundations
Summary
Prompted extraction foundations explain how OCR, LLM calls, prompt registries, structured outputs, audit records, caches, and human correction fit into LKCI workflows. Domain pages should link here when model-assisted behavior appears in POA interpretation, Precon sizing, RFI drafting, marketing rendering, asset inventory, or morning briefs.
Reader Question
How can OCR and LLM output help an operational workflow without becoming the unchecked source of truth?
Surface Or Workflow
Operators see model-assisted output as interpreted document fields, sizing evidence, candidate RFI questions, rendered marketing assets, synthesized reports, or morning brief text. Engineers enter through OCR services, LLM adapters, prompt registries, structured output parsing, audit tests, domain prompt tests, and repair surfaces that let humans correct model output.
Lifecycle
The workflow starts with an artifact or context bundle. OCR or model services produce extracted text, structured JSON, scored evidence, or draft language. The domain validates shape, records audit evidence, applies deterministic guards, and presents output as evidence. A human or downstream policy decides whether it is acceptable enough to persist, publish, send, or retry.
Prompt versions and model configuration must be explicit so future changes can be traced. Failures should be recorded as issues, diagnostics, or low-confidence signals rather than swallowed.
Child Threads
- OCR And LLM Services: capability boundary for OCR and model calls.
- Registry And Prompt Versioning: prompt/version governance.
- POA Interpretation Workflow: document interpretation as repairable evidence.
- Precon Sizing Workflow: sizing evidence and guardrails.
- Precon RFI Drafting Workflow: candidate questions and editable drafts.
Implementation Boundaries
OCR lives under services/ocr; LLM client, structured output, registry, audit, and adapters under services/llm; asset-inventory OCR under libs/asset_inventory/ocr; procurement prompts under libs/procurement/po_workflow; domain use under POA and Precon services; tests under tests/llm, tests/ops, tests/poa, and tests/precon.
Tradeoffs
Treating model output as evidence adds validation and audit work. That is the price of using probabilistic tools in operational workflows where a wrong document, recipient, or action can affect real work.
Visual
The current visual is a graph neighborhood. The intended visual is a prompted extraction flow from artifact/context to OCR or LLM call, structured output, validation, audit, human correction, and domain state.
Source Evidence
services/ocrservices/llmlibs/asset_inventory/ocrlibs/procurement/po_workflowservices/poa/interpretationservices/precon/sizingservices/precon/rfitests/llmtests/ops/test_llm_audit.pytests/poa/test_poa_interpretation_persistence.pytests/precon/test_precon_sizing_inference_contracts.pytests/precon/test_precon_rfi_draft_contracts.py