Skip to main content

Overview

Interactive CLI tool to review and approve/reject entity merge proposals and low-confidence relations. Provides auto-approval and auto-rejection thresholds to streamline the review process.

Usage

sift review [OPTIONS]

Options

--output
string
Output directory containing review files. Use -o as shorthand.
--auto-approve
float
default:"0.85"
Auto-confirm proposals where all members meet this confidence threshold (0.0-1.0). Set to 1.0 to disable auto-approval.
--auto-reject
float
default:"0.5"
Auto-reject relations below this confidence threshold (0.0-1.0). Set to 0.0 to disable auto-rejection.
--verbose
boolean
default:"false"
Enable verbose logging. Use -v as shorthand.

Behavior

Review Process

The command reviews two types of items:
  1. Merge Proposals - Entity duplicates from merge_proposals.yaml
  2. Flagged Relations - Low-confidence relations from relation_review.yaml

Interactive Review

For each DRAFT item:
  • Displays entity/relation details
  • Shows confidence score and reasoning
  • Prompts for decision: approve, reject, or skip
  • Auto-approves/rejects based on thresholds

Status Transitions

  • DRAFTCONFIRMED (approved)
  • DRAFTREJECTED (rejected)
  • DRAFTDRAFT (skipped)

Review Files

merge_proposals.yaml

Reviews entity merge proposals with status updates:
proposals:
  draft: []        # Pending review
  confirmed: []    # Approved
  rejected: []     # Declined

relation_review.yaml

Reviews flagged relations with status field:
relations:
  - source_id: "entity_123"
    target_id: "entity_456"
    relation_type: "WORKS_WITH"
    confidence: 0.65
    status: draft  # or: confirmed, rejected

Auto-Approval/Rejection

Auto-Approve Threshold

Merge proposals where all members have confidence ≥ --auto-approve are automatically confirmed.
sift review --auto-approve 0.9
Only proposals with all members ≥ 0.9 confidence are auto-approved.

Auto-Reject Threshold

Relations with confidence < --auto-reject are automatically rejected.
sift review --auto-reject 0.4
Relations below 0.4 confidence are auto-rejected.

Disable Auto-Actions

sift review --auto-approve 1.0 --auto-reject 0.0
Disables both auto-approval and auto-rejection, requiring manual review of all items.

Examples

Standard review

sift review
Reviews with default thresholds (auto-approve ≥ 0.85, auto-reject < 0.5).

Conservative review

sift review --auto-approve 0.95 --auto-reject 0.3
Only auto-approves very high confidence items, only auto-rejects very low confidence.

Manual review only

sift review --auto-approve 1.0 --auto-reject 0.0
Requires manual decision for every item.

Review from custom directory

sift review --output ./my-project/output
Reviews files in specified output directory.

Interactive Controls

During review, you can:
  • Type y or yes - Approve item
  • Type n or no - Reject item
  • Type s or skip - Skip to next item
  • Press Ctrl+C - Exit review (progress is saved)

Output

After review:
  • Updates merge_proposals.yaml with decisions
  • Updates relation_review.yaml with decisions
  • Displays summary of reviewed items

Next Steps

After reviewing:
sift apply-merges
To apply confirmed merges and remove rejected relations from the graph.

Error Handling

Exits with status 0 if:
  • No review files exist (prompts to run sift resolve or sift build)
  • No DRAFT items to review

See Also

Build docs developers (and LLMs) love