Remove confidence scoring and refine correction prompts

This commit is contained in:
2026-11-11 17:05:52 +00:00
parent bbf89bb4f5
commit d155bf4cb3
92 changed files with 448 additions and 786 deletions

View File

@@ -66,12 +66,6 @@ func TestMaintainedProjectsWithControlledProvider(t *testing.T) {
if err != nil {
t.Fatal(err)
}
if tc.dir == "prompt-edit" {
prompt, err := engine.Engine.InspectPrompt(context.Background(), "audita/modules.grammar.proposal")
if err != nil || !strings.Contains(prompt.Messages[0].Content, "clearly supported grammatical errors") {
t.Fatalf("operator prompt: %+v %v", prompt, err)
}
}
raw, err := os.ReadFile(filepath.Join(root, tc.dir, "transcript.json"))
if err != nil {
t.Fatal(err)

View File

@@ -62,9 +62,7 @@ func processCommand() commandkit.Command {
path ck.Path
}{
{"normalize-max-segment-gap", ck.Keys("normalization", "max_segment_gap")}, {"normalize-ellipsis-gap", ck.Keys("normalization", "ellipsis_gap")},
{"normalize-max-segment-duration", ck.Keys("normalization", "max_segment_duration")}, {"glossary-confidence-threshold", ck.Keys("thresholds", "glossary")},
{"homophones-confidence-threshold", ck.Keys("thresholds", "homophones")}, {"spoken-word-confidence-threshold", ck.Keys("thresholds", "spoken_word")},
{"grammar-confidence-threshold", ck.Keys("thresholds", "grammar")},
{"normalize-max-segment-duration", ck.Keys("normalization", "max_segment_duration")},
} {
name, path := item.name, item.path
flags = append(flags, commandkit.ValueFlag(commandkit.FlagMeta{Name: name, Usage: "Override application setting."}, (*float64)(nil), func(s string) (float64, error) { return strconv.ParseFloat(s, 64) },

View File

@@ -54,17 +54,17 @@ func TestProcessingUsesPerEntryProfilesInOrder(t *testing.T) {
}
firstProposalCall := proposalCalls
mu.Unlock()
result := `{"validations":[{"correction_index":1,"approved":true,"confidence":1,"reason":"ok"}]}`
result := `{"validations":[{"correction_index":1,"approved":true,"reason":"ok"}]}`
switch request.Model {
case "model-one":
result = `{"corrections":[{"id":1,"original_text":"Alyce","corrected_text":"Alice","confidence":1}]}`
result = `{"corrections":[{"id":1,"original_text":"Alyce","corrected_text":"Alice"}]}`
if firstProposalCall == 1 {
result = `{"invalid":true}`
}
case "model-two":
result = `{"corrections":[{"id":1,"original_text":"Sheeld","corrected_text":"Shield","confidence":1}]}`
result = `{"corrections":[{"id":1,"original_text":"Sheeld","corrected_text":"Shield"}]}`
case "model-three":
result = `{"corrections":[{"id":1,"original_text":"casts","corrected_text":"cast","confidence":1}]}`
result = `{"corrections":[{"id":1,"original_text":"casts","corrected_text":"cast"}]}`
}
encoded, _ := json.Marshal(result)
body := fmt.Sprintf(`{"model":"fixture","choices":[{"message":{"role":"assistant","content":%s}}]}`, encoded)