Self-contained prompt templates in advisors

The built-in advisors that perform prompt augmentation have been updated to use self-contained templates. The goal is for each advisor to be able to perform templating operations without affecting nor being affected by templating and prompt decisions in other advisors.

* QuestionAnswerAdvisor
* PromptChatMemoryAdvisor
* VectorStoreChatMemoryAdvisor

Documentation and upgrade notes have been updated accordingly

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
This commit is contained in:
Thomas Vitale
2025-05-08 00:38:32 +01:00
committed by Mark Pollack
parent 2ea518686f
commit d619e25cb5
7 changed files with 95 additions and 48 deletions

View File

@@ -128,6 +128,7 @@ public class QuestionAnswerAdvisorIT {
PromptTemplate customPromptTemplate = PromptTemplate.builder()
.renderer(StTemplateRenderer.builder().startDelimiterToken('$').endDelimiterToken('$').build())
.template("""
$query$
Context information is below, surrounded by ---------------------