Skip to content

Commit dd2cd39

Browse files
committed
feat(document): Add examples to custom living doc prompt builder
This commit adds support for including examples in the custom living doc prompt builder. The new feature allows the generation of prompts that include examples of questions and answers, which can be useful for guiding the model in providing more accurate responses.
1 parent c5e7fb5 commit dd2cd39

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/src/main/kotlin/cc/unitmesh/devti/custom/document/CustomLivingDocPromptBuilder.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ class CustomLivingDocPromptBuilder(
4848

4949
val lang = target.language.displayName;
5050
if (config.example != null) {
51+
instruction.append("Examples: \n")
5152
instruction.append("Question: ```$lang\n${config.example.question}\n```\n")
5253
instruction.append("Answer: ${config.example.answer}\n")
5354
instruction.append("Question: ```$lang\n${target.text}\n```\n")

0 commit comments

Comments
 (0)