> For the complete documentation index, see [llms.txt](https://docs.uptiq.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uptiq.ai/document-ai/guides/fraud-detection.md).

# Fraud Detection

Screen documents for fraud signals, in two phases, using configurable rules.

Fraud Detection runs alongside document extraction in two background phases so it does not block processing.

* **Pre-OCR** checks the raw file for visual forensic signals during upload.
* **Post-extraction** evaluates extracted data against configurable rules such as math or logic checks, compliance checks, and completeness checks.

### **Rule configuration**

A document type is reached via **Document Types > Configure > Fraud Detection > Edit Rules**.

| Capability               | Description                                                                                      | Limit                                            |
| ------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------ |
| Pre-OCR analysis         | Visual forensic checks on the raw file, before OCR                                               | Runs automatically if enabled; background thread |
| Post-extraction analysis | Rule-based evaluation of extracted field data                                                    | Runs automatically if enabled; background thread |
| Rule categories          | `math_logic`, `visual_forensic`, `social_engineering`, `compliance`, `completeness`, `threshold` | Defined categories used in scoring               |
| Rule sources             | Pre-built templates, natural-language rules, custom rule logic                                   | 70+ document types have recommended templates    |
| Rule weighting           | Each rule contributes a weight toward the overall risk score                                     | Weight range documented as 0–100                 |
| Risk levels              | Aggregate score maps to a risk level                                                             | CLEAN, LOW, MEDIUM, HIGH, CRITICAL               |
| Testing harness          | Run fraud rules against a previous extraction before enabling them live                          | Test extraction listing capped at 100 results    |
| Tenant configuration     | Enable or disable phases, adjust category weights, and set risk thresholds per document type     | Master on or off switch is admin-only            |

{% hint style="info" %}
Generic pre-OCR templates apply to all document types automatically when the pre-OCR phase is enabled. Only custom rules can be toggled per document type.
{% endhint %}

{% hint style="warning" %}
The documented rule weight range of 0–100 does not match the live rule-editing UI, where rule cards and the Create or Edit Custom Rule form both use a 0–10 scale with a default of 5.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.uptiq.ai/document-ai/guides/fraud-detection.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
