> ## Documentation Index
> Fetch the complete documentation index at: https://uqp.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# InferenceRules

> Map raw intake answers into factor outputs with ordered rules, defaults and confidence metadata.

Source: spec/schemas/inference-rules.json. Draft v0.1; reference, not production.

Use the canonical JSON below for all constraints.

## Properties and definitions

| Property / definition | Required | Type / reference | Description / constraints |
| - | - | - | - |
| pack\_id | yes | common.json#/\$defs/packId | \{"\$ref":"common.json#/\$defs/packId"} |
| pack\_version | yes | common.json#/\$defs/packVersion | \{"\$ref":"common.json#/\$defs/packVersion"} |
| provenance | no | string | \{"type":"string","minLength":1} |
| rules | yes | array | \{"type":"array","items":\{"type":"object","properties":\{"id":\{"type":"string","minLength":1},"target\_factor":\{"type":"string","minLength":1},"output\_value":\{},"any":\{"type":"array","items":\{"oneOf":\[\{"type":"string"},\{"type":"object"}]}},"all":\{"type":"array","items":\{"oneOf":\[\{"type":"string"},\{"type":"object"}]}},"provenance":\{"type":"string","minLength":1}},"required":\["id","target\_factor","output\_value"],"additionalProperties":false}} |

## Full JSON

```json theme={null}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://uqp.dev/spec/schemas/inference-rules.json",
  "title": "InferenceRules",
  "type": "object",
  "properties": {
    "pack_id": {
      "$ref": "common.json#/$defs/packId"
    },
    "pack_version": {
      "$ref": "common.json#/$defs/packVersion"
    },
    "provenance": {
      "type": "string",
      "minLength": 1
    },
    "rules": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "target_factor": {
            "type": "string",
            "minLength": 1
          },
          "output_value": {},
          "any": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "object"
                }
              ]
            }
          },
          "all": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "object"
                }
              ]
            }
          },
          "provenance": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "id",
          "target_factor",
          "output_value"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "pack_id",
    "pack_version",
    "rules"
  ],
  "additionalProperties": false
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.