Add transcript description prompt context
This commit is contained in:
21
internal/framework/promptcontext/transcript_description.go
Normal file
21
internal/framework/promptcontext/transcript_description.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package promptcontext
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// TranscriptDescriptionBlock returns standardized background-only context
|
||||
// guidance for prompt builders when a user-supplied description is present.
|
||||
func TranscriptDescriptionBlock(transcriptDescription string) string {
|
||||
description := strings.TrimSpace(transcriptDescription)
|
||||
if description == "" {
|
||||
return ""
|
||||
}
|
||||
|
||||
return "Transcript description (background context only):\n" +
|
||||
fmt.Sprintf("%s\n\n", description) +
|
||||
"Use this description only as optional background to interpret ambiguous terms. " +
|
||||
"It must not override the transcript content. " +
|
||||
"Do not invent corrections, facts, names, events, motivations, or speaker intent based on this description.\n\n"
|
||||
}
|
||||
Reference in New Issue
Block a user