Skip to content
Back to skills

Constraint Composition

ASecurity

Compose multiple FUDGE future constraints, especially topic-word constraints, by summing weighted log probabilities.

  • 247 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 9, 2026
testingpython

Works with

  • cli

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill constraint_composition --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Constraint Composition?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Constraint Composition
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-constraint-composition/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-constraint-composition)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
name: constraint_composition
description: Compose multiple FUDGE future constraints, especially topic-word constraints, by summing weighted log probabilities.
---

# Constraint Composition for Topics

Use this skill when a FUDGE decoder must condition on several target words or independent attributes. For topic control, compute `(lambda/N) * sum_j log P(w_j | prefix+candidate)`.

## Inputs
- Candidate-to-target probability table.
- Ordered list of target words or attributes.
- `lambda_value` and whether to normalize by `N`.

## Outputs
- Composed future log score per candidate.
- Audit contributions per candidate and per target.

## Workflow
1. Ensure every candidate has every target probability.
2. Clip probabilities to avoid log(0).
3. Compute the target weight.
4. Sum weighted log-probability contributions.
5. Pass the composed score to the FUDGE rescoring skill.

## Validation
Run `python tests/test_composition.py`.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.