Content trust & human review platform for RAGFlow pipelines.
RAGTrust sits alongside RAGFlow as a lightweight review gate. When RAGFlow parses documents and generates chunks, RAGTrust intercepts chunks requiring human review based on configurable policies, then feeds corrected content back for re-embedding and re-indexing.
- Python 3.11+
- PostgreSQL 16+
pip install -e .
cp .env.example .env
uvicorn app.main:app --reload --port 8000docker compose up -d| Method | Path | Description |
|---|---|---|
| POST | /api/v1/review-batches | Submit chunks for review |
| GET | /api/v1/review-batches?status=completed | Poll completed batches |
| GET | /api/v1/review-batches/{id}/result | Get batch review results |
| GET | /api/v1/policies/{kb_id} | Get review policy |
| PUT | /api/v1/policies/{kb_id} | Upsert review policy |
| GET | /api/v1/docs/{doc_id}/review-status | Document review progress |
| GET | /api/v1/health | Health check |
| Mode | Behavior |
|---|---|
| auto_pass | All chunks pass automatically (default) |
| full_review | Every chunk goes to human review |
| sampled | Deterministic sampling via sample_rate (0.0-1.0) |
Apache 2.0