Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Alejandrin08/Hackathon-SPEI/llms.txt

Use this file to discover all available pages before exploring further.

The AI nudging engine monitors behavioral signals on each screen and offers contextual help when a user appears to be struggling. Nudges are informational and non-intrusive — they are never used to push financial products or influence decisions.

How it works

1

Collect behavioral signals

As the user interacts with a screen, the frontend tracks the following signals:
SignalDescription
screenScreen identifier, e.g. send-money
num_validation_errorsNumber of form validation errors triggered
time_on_screen_secondsTotal time spent on the current screen
num_back_navigationsNumber of times the user navigated backwards
steps_totalTotal steps in a multi-step flow
current_stepCurrent step index in the flow
2

Send signals to the nudging API

Signals are sent to the nudging inference endpoint:
POST /ai/nudge
{
  "screen": "send-money",
  "num_validation_errors": 3,
  "time_on_screen_seconds": 75,
  "num_back_navigations": 1,
  "steps_total": 4,
  "current_step": 2
}
3

Receive nudge recommendation

The model responds with a difficulty score and the recommended nudge type:
{
  "screen": "send-money",
  "model_version": "nudging-v1.0",
  "result": {
    "needs_help": true,
    "difficulty_score": 0.82,
    "recommended_nudge_type": "assist",
    "reason": "high_error_rate_or_time"
  }
}
  • needs_help — Whether a nudge should be shown.
  • difficulty_score — Continuous score from 0 to 1 indicating estimated difficulty level.
  • recommended_nudge_type — One of assist, info, or warning.
  • reason — Human-readable code explaining the trigger.
4

Display the nudge

If needs_help is true, the frontend renders the appropriate nudge component. The user can dismiss the nudge at any time.

Nudge types

The nudge type is determined by the difficulty_score returned by the model.
Nudge typeScore thresholdBehavior
assist> 0.75Direct step-by-step help is offered to guide the user through the current action
info> 0.4An informational hint is shown, providing context about the current screen
warning≤ 0.4A soft security reminder is displayed, e.g. to verify recipient details
The assist nudge is the most active intervention. It presents the user with a guided walkthrough of the current screen, broken down into clear steps.

Fallback logic

When the AI model is unavailable or not loaded, the frontend applies a rule-based fallback to ensure users still receive help. A nudge is triggered if either of the following conditions is met:
  • num_validation_errors >= 2
  • time_on_screen_seconds > 60
The fallback always triggers an assist-level nudge to err on the side of providing more help.

Model performance

The nudging model (nudging-v1.0) was trained on synthetic user interaction data.
MetricValue
Accuracy0.83
F1 score (macro avg)0.80

Ethical principles

The nudging engine is designed around the following commitments:

User in control

Every nudge includes a dismiss option. The user is never forced to engage with a nudge.

Non-commercial

Nudging is strictly informational. It is never used to promote financial products or influence purchase decisions.

Transparent

Every nudge includes a brief, plain-language explanation of why it was triggered.

Respectful tone

Nudge copy avoids technical jargon and is written in a calm, supportive tone appropriate for all age groups.