gate: tablet 52 — the fringe quoted couplings as sentences on the first real reply
checks.grounding.ungrounded holds coupling strings ("coupled(claim(1),
not_in_sources)"), not sentences; the fringe called Access.get/3 on a
string and the first real reply from Claude through /gate/anthropic
answered 500 CHATAT_UNEXPECTED (after recording its bedikah). The
sentence is now looked up by claim index in the check's claims; a test
produces an ungrounded claim. Broken Tablets tablet 52. Elixir 593/0.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
5c63273dba
commit
2b8eaced27
3 files changed
+60
-3
No files matched your search
@@ -191,6 +191,8 @@ defmodule VavPipeline.Gate.Shape do
|
||||
end
|
||||
|
||||
defp sentences_for(checks, rule) do
|
||||
grounding = checks[:grounding] || %{}
|
||||
|
||||
claims_of = fn
|
||||
%{claims: claims} when is_list(claims) -> Enum.map(claims, &(&1["sentence"] || &1[:sentence]))
|
||||
_ -> []
|
||||
@@ -198,8 +200,8 @@ defmodule VavPipeline.Gate.Shape do
|
||||
|
||||
case rule do
|
||||
"avodah_zarah" -> claims_of.(checks[:authority])
|
||||
"golden_calf" -> ungrounded_sentences(checks[:grounding])
|
||||
"self_grounding" -> ungrounded_sentences(checks[:grounding])
|
||||
"golden_calf" -> ungrounded_sentences(grounding)
|
||||
"self_grounding" -> ungrounded_sentences(grounding)
|
||||
"shfichut_damim" -> action_sentences(checks[:actions], "shfichut_damim")
|
||||
"gilui_arayot" -> action_sentences(checks[:actions], "gilui_arayot")
|
||||
"parah_adumah" -> claims_of.(checks[:self_validation])
|
||||
@@ -211,7 +213,33 @@ defmodule VavPipeline.Gate.Shape do
|
||||
|> Enum.reject(&is_nil/1)
|
||||
end
|
||||
|
||||
defp ungrounded_sentences(%{ungrounded: list}) when is_list(list), do: Enum.map(list, &(&1[:sentence] || &1["sentence"]))
|
||||
# The grounding check's `ungrounded` are coupling strings —
|
||||
# "coupled(claim(3), not_in_sources)" — not sentences; the claim's
|
||||
# sentence is in the check's `claims` by index. (Tablet 52: the first
|
||||
# real reply through the gate found this; no test double had an
|
||||
# ungrounded claim.)
|
||||
defp ungrounded_sentences(%{ungrounded: list} = grounding) when is_list(list) do
|
||||
claims = grounding[:claims] || []
|
||||
|
||||
Enum.map(list, fn
|
||||
coupling when is_binary(coupling) ->
|
||||
case Regex.run(~r/claim\((\d+)\)/, coupling) do
|
||||
[_, n] ->
|
||||
i = String.to_integer(n)
|
||||
Enum.find_value(claims, coupling, fn c -> if (c[:index] || c["index"]) == i, do: c[:sentence] || c["sentence"] end)
|
||||
|
||||
_ ->
|
||||
coupling
|
||||
end
|
||||
|
||||
%{} = c ->
|
||||
c[:sentence] || c["sentence"]
|
||||
|
||||
other ->
|
||||
to_string(other)
|
||||
end)
|
||||
end
|
||||
|
||||
defp ungrounded_sentences(_), do: []
|
||||
|
||||
defp action_sentences(%{actions: actions}, rule) when is_list(actions) do
|
||||
|
||||
Reference in new issue
Block a user