redb.Route.Llm 3.1.1 — per-message audit fields for LLM compliance / replay

작성자

카테고리:

← 피드로
DEV Community · rinat kozin · 2026-06-12 개발(SW)
Cover image for redb.Route.Llm 3.1.1 — per-message audit fields for LLM compliance / replay

rinat kozin

When an auditor asks “reproduce this exact answer” six months later, you need more than (messages, model). You need the sampling parameters that were actually applied, the prompt template version, the tool set the model saw, and ideally the provider’s backend fingerprint — because closed-source providers silently re-release weights.

Just shipped this in redb.Route.Llm 3.1.1: 7 nullable audit fields on every persisted message.

Set on assistant rows:

Temperature, MaxTokens, TopP — effective values (request override → factory default)
ToolSetHash — SHA-256 of canonical {name, description, InputSchema} set, sorted by name. Tool added/renamed/schema-changed → hash changes
ProviderSystemFingerprint — system_fingerprint from the response (OpenAI / xAI / Together echo it; Anthropic / Gemini-compat / Ollama leave it null)
Set on every row of the run:

PromptTemplateName, PromptTemplateVersion — when the caller used a managed template
Honest limitation: bit-exact replay is only possible with self-hosted (Ollama / vLLM / llama.cpp). Anthropic doesn’t expose a fingerprint, OpenAI rotates them silently. For closed providers we record (model_id, params, tool_set_hash, prompt_template) and label it best-effort.

Zero migration. REDB stores props schemalessly — added 7 fields to the C# class, redeployed, done. No ALTER TABLE, no version bump on the storage layer.

Code & details: CHANGELOG.md → 3.1.1 — section per-message audit fields on MessageProps.

Triggered by feedback from a compliance auditor on Habr — turns out “we log conversations” doesn’t cut it when the courtroom asks which exact prompt drove this.

원문에서 계속 ↗

코멘트

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다