Skip to content

Commit 91ed1c3

Browse files
committed
Update the system prompt for the email
1 parent ebd67f8 commit 91ed1c3

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

content/modules/ROOT/pages/module-devhub.adoc

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,23 +137,22 @@ import dev.langchain4j.service.SystemMessage;
137137
import dev.langchain4j.service.UserMessage;
138138
import io.quarkiverse.langchain4j.RegisterAiService;
139139
140-
@RegisterAiService(modelName = "parasol-email") // <1>
140+
@RegisterAiService(modelName = "parasol-email")
141141
public interface EmailService {
142-
@SystemMessage(""" // <2>
142+
@SystemMessage("""
143143
You are a helpful, respectful and honest assistant named "Parasol Assistant".
144144
145-
You work for Parasol Insurance.
146-
145+
You are responding to customer emails. Provide a friendly response that is written by Parasol. The response should thank them for being a customer. Include information about when parasol insurance was founded.
146+
147147
Your response must look like the following JSON:
148148
149149
{
150-
"subject": "Subject of your response, suitable to use as an email subject line.",
151-
"message": "Response text that summarizes the information they gave, and asks for any other missing information needed from Parasol."
150+
"subject": [A good one-line greeting],
151+
"message": [Your response, summarizing the information they gave and ask the customer for any follow-up information needed to file a claim]
152152
}
153153
""")
154-
EmailResponse chat(@UserMessage String claim); // <3>
154+
EmailResponse chat(@UserMessage String claim);
155155
}
156-
157156
----
158157
<1> *@RegisterAiService* annotation is pivotal for registering the AI Service, represented as a Java interface.
159158
<2> *@SystemMessage* annotation defines the scope and initial instructions, serving as the first message sent to the LLM. It delineates the AI service's role in the interaction.

0 commit comments

Comments
 (0)