Add transcript description prompt context
This commit is contained in:
@@ -61,7 +61,7 @@ func tinyGlossary() *schema.Glossary {
|
||||
}
|
||||
|
||||
func TestBuildProposalMessagesContainsGlossaryContextAndConstraints(t *testing.T) {
|
||||
msgs, err := BuildProposalMessages(tinyTranscript(), tinyGlossary(), 0)
|
||||
msgs, err := BuildProposalMessages(tinyTranscript(), tinyGlossary(), 0, "")
|
||||
if err != nil {
|
||||
t.Fatalf("BuildProposalMessages error: %v", err)
|
||||
}
|
||||
@@ -91,6 +91,24 @@ func TestBuildProposalMessagesContainsGlossaryContextAndConstraints(t *testing.T
|
||||
}
|
||||
}
|
||||
|
||||
func TestBuildProposalMessagesIncludesTranscriptDescriptionGuidance(t *testing.T) {
|
||||
msgs, err := BuildProposalMessages(tinyTranscript(), tinyGlossary(), 0, "Campaign scene in a crowded harbor.")
|
||||
if err != nil {
|
||||
t.Fatalf("BuildProposalMessages error: %v", err)
|
||||
}
|
||||
combined := msgs[0].Content + "\n" + msgs[1].Content
|
||||
for _, want := range []string{
|
||||
"Transcript description (background context only):",
|
||||
"Campaign scene in a crowded harbor.",
|
||||
"must not override the transcript content",
|
||||
"Do not invent corrections, facts, names, events, motivations, or speaker intent based on this description.",
|
||||
} {
|
||||
if !strings.Contains(combined, want) {
|
||||
t.Fatalf("expected prompt to contain %q", want)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestGlossaryModuleReplacementPolicy(t *testing.T) {
|
||||
m, err := New()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user