Explain: shorter answers, streamed, remembered, and prepared for settings
ai-explain spec, amendment 1 (EX-22 to EX-28): - answers are three or four sentences, max_tokens 160, cut at 700 chars; - POST /api/explain streams the answer as server-sent events; - each node remembers answers in memory (1,000, 24 h), keyed by the facts, prompt version and model, shared by server-level administrators; - resources/explain/settings.json.gz ships answers for settings at their defaults, generated with prepare_setting_explanations (717 for 2026.9.27); - the system prompt no longer carries the per-request marker, so a model server can reuse it; - inbuxa:Explanation gains source, answeredAt and preparedFor.
This commit is contained in:
@@ -26,6 +26,10 @@ pub enum ExplanationProperty {
|
||||
Node,
|
||||
ElapsedMs,
|
||||
Grounded,
|
||||
// inbuxa: EX-27, where the answer came from
|
||||
Source,
|
||||
AnsweredAt,
|
||||
PreparedFor,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
@@ -52,6 +56,9 @@ impl Property for ExplanationProperty {
|
||||
ExplanationProperty::Node => "node",
|
||||
ExplanationProperty::ElapsedMs => "elapsedMs",
|
||||
ExplanationProperty::Grounded => "grounded",
|
||||
ExplanationProperty::Source => "source",
|
||||
ExplanationProperty::AnsweredAt => "answeredAt",
|
||||
ExplanationProperty::PreparedFor => "preparedFor",
|
||||
}
|
||||
.into()
|
||||
}
|
||||
@@ -67,6 +74,9 @@ impl ExplanationProperty {
|
||||
b"node" => ExplanationProperty::Node,
|
||||
b"elapsedMs" => ExplanationProperty::ElapsedMs,
|
||||
b"grounded" => ExplanationProperty::Grounded,
|
||||
b"source" => ExplanationProperty::Source,
|
||||
b"answeredAt" => ExplanationProperty::AnsweredAt,
|
||||
b"preparedFor" => ExplanationProperty::PreparedFor,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user