Skip to content

feat(ai-service): full field set including line items #22

Description

@Fluory

Goal

Extraction returns every field the customer listed – header fields and line items – each with status and its own evidence, so a clerk can review a real quote request completely.

Acceptance criteria

  • Header fields: company, contact person, e-mail, phone, requested delivery date, additional requirements
  • Line items: description/product, quantity, unit, material, dimensions – each item field with its own status and evidence
  • Output schema is versioned (schema_version); the prompt is a versioned file; both are stored with every extraction run
  • Verifier normalises German number formats (decimal comma, thousands separators), units (mm, m, Stk., kg) and dates (DD.MM.YYYY, ISO); a calendar week ("KW 42") without an explicit date is at most uncertain
  • A value whose quote cannot be found in the cited segment is unverified – also for line items
  • TS side: contract types regenerated; persistence supports line items (item index) without breaking existing runs

Not part of this task

  • New input formats (separate issue), review UI for line items (separate issue)

Affected areas

  • services/ai/
  • contracts/ai-service.openapi.yaml
  • src/features/extraction/

Test plan

Criterion Check
normalisers pytest unit tests: numbers, units, dates, calendar weeks
verifier on line items pytest unit tests
contract contract test against OpenAPI
end to end pytest with a recorded model response for a synthetic multi-item request

Security/Privacy affected?

Document content reaches the LLM – EU endpoint, synthetic data only, no content in logs.

Epic: #17 · Architecture: docs/decisions/ADR-0001-pilot-architecture.md

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

aiLLM, prompts, evalsfeatureNew capabilityreadyDefinition of Ready met – may be claimed

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions