Maeyen Trust & Risk Assistant

Maeyen Trust & Risk Assistant is an internal AI assistant designed to support Maeyen admins with transaction risk review, evidence assessment, dispute summarization, and trust score explanations.

It provides structured recommendations only and does not make final decisions. All outputs require human admin review.

Key Features

  • Transaction risk assessment
  • Evidence strength evaluation
  • Dispute summarization
  • Trust score explanation
  • Structured JSON output
  • Always requires human review (final decisions made by admins)

Intended Use & Limitations

Intended Use:

  • Assist Maeyen admins with trust and risk decisions
  • Provide structured analysis of transactions, evidence, and disputes
  • Explain trust scores

Limitations:

  • NOT a replacement for human judgment
  • Should only be used as an assistant
  • Requires human review for all decisions

How to Use

With Transformers and PEFT

from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import json

def load_maeyen_assistant(model_path):
    print("Loading tokenizer...")
    tokenizer = AutoTokenizer.from_pretrained(model_path)
    tokenizer.pad_token = tokenizer.eos_token
    print("Loading model...")
    model = AutoModelForCausalLM.from_pretrained(model_path)
    return model, tokenizer

def generate_recommendation(model, tokenizer, task, data):
    system_prompts = {
        "risk": "You are Maeyen AI Transaction Risk Agent. Assess risk and output valid JSON only with requires_human_review: true.",
        "evidence": "You are Maeyen AI Evidence Review Agent. Review evidence and output valid JSON only with requires_human_review: true.",
        "dispute": "You are Maeyen AI Dispute Assistant. Summarize dispute and output valid JSON only with requires_human_review: true.",
        "trust": "You are Maeyen AI Trust Score Explanation Agent. Explain trust score and output valid JSON only."
    }
    system_prompt = system_prompts.get(task, system_prompts["risk"])
    prompt = f"""<|im_start|>system
{system_prompt}<|im_end|>
<|im_start|>user
{json.dumps(data, indent=2)}<|im_end|>
<|im_start|>assistant
"""
    inputs = tokenizer(prompt, return_tensors="pt")
    outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.1)
    try:
        return json.loads(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
    except:
        return {"raw": tokenizer.decode(outputs[0], skip_special_tokens=True), "requires_human_review": True}

Model Output Format

All outputs are valid JSON with requires_human_review: true:

{
  "risk_level": "medium|high|critical|low",
  "risk_score": 0-100,
  "reasons": ["reason1", "reason2"],
  "recommended_action": "action description",
  "requires_human_review": true
}

Disclaimer

Maeyen Trust & Risk Assistant does not make final decisions. All outputs must be reviewed by human admins before any action is taken.

Downloads last month
301
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support