Spaces:
Runtime error
Runtime error
| """Citation-grounded extraction & verification core. | |
| This package turns retrieved source spans into schema-constrained, evidence-backed | |
| survey findings and audits them for hallucination and contradiction. It is the | |
| deterministic "no invented facts" layer that sits between retrieval and rendering. | |
| Design tenets (do not relax these without a regression test): | |
| * Extraction over summarization β findings are copied/derived from cited spans. | |
| * Grounding over fluency β every claim must map to a literal source span. | |
| * Determinism over creativity β temperature=0, top_p=1, fixed seed. | |
| * Citation validation over freeform generation β unsupported claims are dropped. | |
| The pure-Python validation/contradiction layers (``citation_validator`` and | |
| ``contradiction``) have NO network dependency and are fully unit-testable | |
| offline. Only :mod:`app.extraction.extractor` calls the LLM. | |
| """ | |
| from app.extraction.schemas import ( | |
| AtomicClaim, | |
| ClaimEvidence, | |
| ClaimType, | |
| ClaimVerification, | |
| ConditionRating, | |
| Contradiction, | |
| ContradictionKind, | |
| EvidenceSpan, | |
| GroundedClaim, | |
| SectionExtraction, | |
| SupportLevel, | |
| SurveyFinding, | |
| ) | |
| __all__ = [ | |
| "AtomicClaim", | |
| "ClaimEvidence", | |
| "ClaimType", | |
| "ClaimVerification", | |
| "ConditionRating", | |
| "Contradiction", | |
| "ContradictionKind", | |
| "EvidenceSpan", | |
| "GroundedClaim", | |
| "SectionExtraction", | |
| "SupportLevel", | |
| "SurveyFinding", | |
| ] | |