Metadata-Version: 2.4
Name: tamr-plus-lite
Version: 0.1.1
Summary: TAMR+ Lite — Open-core Trust-Augmented Multi-phase Retrieval framework for EU AI Act compliant AI applications
Project-URL: Homepage, https://github.com/quantamixsol/tamr-plus-lite
Project-URL: Documentation, https://github.com/quantamixsol/tamr-plus-lite#readme
Project-URL: Repository, https://github.com/quantamixsol/tamr-plus-lite
Project-URL: Patent Notice, https://quantamixsolutions.com/patents
Author-email: Harish Kumar <harish.kumar@quantamixsolutions.com>
License-Expression: Apache-2.0
License-File: LICENSE
License-File: NOTICE
Keywords: compliance,eu-ai-act,explainability,knowledge-graph,multi-phase,rag,retrieval,scoring,trace
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Requires-Dist: pydantic>=2.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.21; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: ruff>=0.1; extra == 'dev'
Provides-Extra: neo4j
Requires-Dist: neo4j>=5.0; extra == 'neo4j'
Provides-Extra: pipeline
Requires-Dist: httpx>=0.25; extra == 'pipeline'
Description-Content-Type: text/markdown

# TAMR+ Lite

**Trust-Augmented Multi-phase Retrieval — Open-Core Edition**

The open-source core of the TAMR+ framework, providing EU AI Act-compliant scoring, gap attribution, and retrieval primitives for building trustworthy AI applications.

## Three-Stage Architecture

1. **Document Manifest Selector** — 5-signal deterministic pre-filtering (zero LLM calls)
2. **Multi-Phase Retrieval** — Vector ANN, KG alignment, causal density, diversity selection
3. **TRACE Scoring** — 5-dimension formula-based scoring with gap attribution

## Installation

```bash
pip install tamr-plus-lite
```

## Quick Start

```python
from tamr_plus_lite import build_trace_scores, compute_gap_attribution

# Score a response
score = build_trace_scores(
    source_count=5,
    total_claims=10,
    cited_claims=8,
    evidence_strength=0.8,
)
print(f"TRACE Score: {score.overall:.0%}")
print(score.explanation)

# Explain gaps
gap = compute_gap_attribution(
    trace_score=score.overall,
    source_count=5,
    total_claims=10,
    cited_claims=8,
)
print(gap.explanation)
for component in gap.components:
    print(f"  {component.friendly_name}: {component.value:.1%} — {component.action}")
```

## Modules

| Module | Description |
|--------|-------------|
| `tamr_plus_lite.scoring` | TRACE 5-dimension scoring engine |
| `tamr_plus_lite.gap` | Gap attribution ("Why not 100%?") |
| `tamr_plus_lite.manifest` | Document manifest selector (Stage 1) |
| `tamr_plus_lite.classifier` | Zero-LLM query classifier |
| `tamr_plus_lite.interfaces` | Abstract interfaces for pluggable backends |
| `tamr_plus_lite.extraction` | KG extraction prompt + utilities |
| `tamr_plus_lite.chunking` | Text chunking + JSON repair |
| `tamr_plus_lite.profiles` | Domain scoring profiles |

## EU AI Act Compliance

All scoring is **formula-based** (not ML) for full transparency:
- **Art. 13**: Every parameter is explicit and auditable
- **Art. 14**: Every score decomposes into human-readable factors
- **Art. 15**: Deterministic formulas guarantee reproducibility

## TRACE Dimensions

| Dimension | Weight | What It Measures |
|-----------|--------|-----------------|
| **T** — Transparency | 25% | Source attribution and model identification |
| **R** — Reasoning | 20% | Evidence basis and cross-document connections |
| **A** — Auditability | 20% | Audit trail completeness |
| **C** — Compliance | 20% | Regulatory framework alignment |
| **E** — Explainability | 15% | Response structure quality |

## Gap Attribution Taxonomy

| Code | Friendly Name | Description |
|------|--------------|-------------|
| SCG | Document Coverage | How much is backed by uploaded documents |
| PKC | AI Knowledge Used | Reliance on AI training data |
| DLT | Specialized Vocabulary | Domain terminology precision |
| ADG | Citation Coverage | Citation completeness |
| FSC | System Limitation | Irreducible 3% structural ceiling |

## Full TAMR+

This is the **open-core** edition. The full TAMR+ SDK includes:
- Premium 7-phase retrieval pipeline (HDI, governance, compliance certificates)
- Gamified insights engine
- Production domain profiles with calibrated weights

Contact: harish.kumar@quantamixsolutions.com

## License

Apache-2.0 — Quantamix Solutions B.V.

## Patent Notice

TAMR+ Lite implements methods covered by European Patent Applications
EP26162901.8 and EP26166054.2, owned by Quantamix Solutions B.V.

Licensed under Apache 2.0 with express patent grant (Section 3).
Reimplementation of the patented methods outside this software requires
a separate patent license. See [LICENSE](LICENSE) for details.
