Skip to main content

LLM-based compliance note evaluation for financial services

Project description

assert-review

LLM-based compliance note evaluation for financial services.

Evaluates adviser suitability notes against regulatory framework definitions (FCA, MiFID II, etc.), returning structured gap reports with per-element scores, evidence, and actionable remediation suggestions.

Installation

pip install assert-review

Quick Start

from assert_review import evaluate_note, LLMConfig

llm_config = LLMConfig(
    provider="bedrock",
    model_id="anthropic.claude-v2",
    region="us-east-1",
)

report = evaluate_note(
    note_text=open("note.txt").read(),
    framework="fca_suitability_v1",
    llm_config=llm_config,
)

print(f"Result: {'PASS' if report.passed else 'FAIL'} ({report.overall_rating})")
print(f"Score: {report.overall_score:.2%}")

CLI

# Evaluate a single note
assert-review evaluate note.txt --framework fca_suitability_v1

# Output as JSON
assert-review evaluate note.txt --framework fca_suitability_v1 --output json

# Batch evaluate from CSV
assert-review batch notes.csv --framework fca_suitability_v1 --note-column text

# Use OpenAI instead of Bedrock
assert-review evaluate note.txt --framework fca_suitability_v1 \
  --provider openai --model gpt-4o --api-key $OPENAI_API_KEY

Bundled Frameworks

  • fca_suitability_v1 — FCA COBS 9.2 Suitability Note Framework

Custom frameworks can be supplied as a YAML file path or pre-loaded dict.

Public API

from assert_review import (
    evaluate_note,     # main entry point
    NoteEvaluator,     # evaluator class for advanced use
    GapReport,         # full evaluation result
    GapItem,           # per-element result
    GapReportStats,    # summary statistics
    PassPolicy,        # pass/fail threshold configuration
    LLMConfig,         # re-exported from assert-core
)

GapReport Output

{
  "framework_id": "fca_suitability_v1",
  "framework_version": "1.0.0",
  "passed": true,
  "overall_score": 0.82,
  "overall_rating": "Compliant",
  "summary": "The note meets all 9 FCA suitability requirements...",
  "stats": { "total_elements": 9, "present_count": 9, ... },
  "items": [
    {
      "element_id": "client_objectives",
      "status": "present",
      "score": 0.9,
      "evidence": "Client states retirement goal in 15 years",
      "severity": "critical",
      "required": true,
      "suggestions": []
    }
  ]
}

Dependencies

  • assert-core — shared LLM provider layer
  • PyYAML — framework loading

Supports AWS Bedrock and OpenAI providers via assert-core.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

assert_review-0.1.0.tar.gz (20.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

assert_review-0.1.0-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file assert_review-0.1.0.tar.gz.

File metadata

  • Download URL: assert_review-0.1.0.tar.gz
  • Upload date:
  • Size: 20.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for assert_review-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0421ec82d01830ef8e9465eea40f4433133087078a24598e073a41789d642847
MD5 ce8aab2ff16aa87ef40a46f997e78dfa
BLAKE2b-256 4a00c93445b48205a4c394bae3593c96508fe6871c1f544f330424489d2d37e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for assert_review-0.1.0.tar.gz:

Publisher: publish-assert-review.yml on charliedouglas/assert_llm_tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file assert_review-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: assert_review-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for assert_review-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e9f9ae34803d7fdc47f230e705aed0e3bdc2c16ee3dd78b793016b271377926d
MD5 0acd27502065b8666316518b23ce8ba1
BLAKE2b-256 4db6077c4dca3154471143cce983e33da67084244eed76620375cfff7ba77e08

See more details on using hashes here.

Provenance

The following attestation bundles were made for assert_review-0.1.0-py3-none-any.whl:

Publisher: publish-assert-review.yml on charliedouglas/assert_llm_tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page