fai-tune-03-deterministic-agent — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited fai-tune-03-deterministic-agent (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Optimize agent configuration for repeatable outputs and schema compliance.
{
"model": "gpt-4o",
"temperature": 0,
"seed": 42,
"max_tokens": 1024,
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "classification",
"strict": true,
"schema": {
"type": "object",
"properties": {
"category": { "type": "string", "enum": ["bug", "feature", "question"] },
"confidence": { "type": "number", "minimum": 0, "maximum": 1 }
},
"required": ["category", "confidence"],
"additionalProperties": false
}
}
}
}def test_determinism(prompt: str, model: str, seed: int, runs: int = 10) -> dict:
outputs = []
for _ in range(runs):
resp = client.chat.completions.create(
model=model, seed=seed, temperature=0,
messages=[{"role": "user", "content": prompt}],
)
outputs.append(resp.choices[0].message.content)
unique = len(set(outputs))
return {"deterministic": unique == 1, "unique": unique, "runs": runs}def calibrate_thresholds(eval_results: list[dict]) -> dict:
"""Find thresholds that pass 95% of good examples and fail 95% of bad."""
from numpy import percentile
good = [r["score"] for r in eval_results if r["label"] == "good"]
bad = [r["score"] for r in eval_results if r["label"] == "bad"]
return {
"recommended_threshold": percentile(good, 5), # 95% of good passes
"false_positive_rate": sum(1 for b in bad if b >= percentile(good, 5)) / len(bad),
}from pydantic import BaseModel, ValidationError
def check_compliance(outputs: list[str], schema: type[BaseModel]) -> dict:
valid = 0
errors = []
for out in outputs:
try:
schema.model_validate_json(out)
valid += 1
except ValidationError as e:
errors.append(str(e)[:100])
return {"compliance_rate": valid / len(outputs), "sample_errors": errors[:5]}| Issue | Cause | Fix |
|---|---|---|
| Non-deterministic output | Temperature > 0 or no seed | Set temperature=0, seed=42 |
| Schema validation fails | Model ignores strict mode | Use response_format with strict=true |
| Confidence always 1.0 | No calibration data | Train on diverse examples |
| Different results per deploy | Model version changed | Pin model version in config |
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.