Skip to content
CHADA Store

LLM explanations (Groq + OpenAI)

Flagged orders get a plain-English summary of why they were flagged — useful both for your own triage and for pasting straight into a chargeback dispute response. The summary can come from a template (built-in, always available) or from an LLM (better prose, requires an API key).

Provider priority

If both Groq and OpenAI keys are configured, Groq wins. Groq has a generous free tier and exposes an OpenAI-compatible endpoint — no functional difference in output quality for this use case. Reserve OpenAI for fallback or for environments where you\’re already paying for OpenAI anyway.

Groq (recommended)

  1. Sign up at console.groq.com.
  2. Create an API key — it starts with gsk_.
  3. Paste it into WooFraudGuard → Settings → Privacy & API keys → Groq API key.

Groq\’s free tier covers ~14,400 requests/day — far more than any single WooCommerce store needs for explanations.

OpenAI

  1. Get a key from platform.openai.com/api-keys.
  2. Paste it into WooFraudGuard → Settings → Privacy & API keys → OpenAI API key.

The plugin uses gpt-4o-mini by default (~$0.15 per million input tokens — pennies per month for typical volumes). Override via the woofraudguard_openai_model filter.

Locale-aware prompts

The system prompt is automatically adjusted to the merchant\’s current WordPress locale. A German-locale install gets German explanations; Spanish gets Spanish; etc. Stored explanations are not auto-retranslated when you switch locale — click Regenerate in the score detail modal to refresh.

Fallback behaviour

If both LLM keys are missing or invalid, the plugin uses a deterministic template-based explanation built from the firing rules. No flagged order is ever left without an explanation — the template is good enough for most chargeback rebuttal needs; the LLM version is just more conversational.