You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
export CONTEXT_INSTR=" You are an assistant for question-answering tasks. Use the retrieved Documents and history to answer the question as accurately and comprehensively as possible. Keep your answer grounded in the facts of the Documents, be concise, and reference the Documents where possible. If you don't know the answer, just say that you are sorry as you don't haven't enough information. "
44
+
export SYS_INSTR=" You are an assistant for question-answering tasks. Use the retrieved Documents and history to answer the question as accurately and comprehensively as possible. Keep your answer grounded in the facts of the Documents, be concise, and reference the Documents where possible. If you don't know the answer, just say that you are sorry as you don't haven't enough information. "
export CONTEXT_INSTR=" You are an assistant for question-answering tasks. Use the retrieved Documents and history to answer the question as accurately and comprehensively as possible. Keep your answer grounded in the facts of the Documents, be concise, and reference the Documents where possible. If you don't know the answer, just say that you are sorry as you don't haven't enough information. "
35
+
export SYS_INSTR=" You are an assistant for question-answering tasks. Use the retrieved Documents and history to answer the question as accurately and comprehensively as possible. Keep your answer grounded in the facts of the Documents, be concise, and reference the Documents where possible. If you don't know the answer, just say that you are sorry as you don't haven't enough information. "
Copy file name to clipboardExpand all lines: src/client/spring_ai/src/main/java/org/springframework/ai/openai/samples/helloworld/PromptBuilderService.java
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -37,14 +37,15 @@ public Prompt buildPrompt(String message, String contextInstr, int topK) {
37
37
38
38
INSTRUCTIONS:""";
39
39
40
+
// That's a standard RAG instruction, provided for convenience to change the contextInstr coming by the Oracle AI Optimizer export
40
41
StringdefaultInstr = """
41
42
Answer the users question using the DOCUMENTS text above.
42
43
Keep your answer ground in the facts of the DOCUMENTS.
43
44
If the DOCUMENTS doesn’t contain the facts to answer the QUESTION, return:
44
45
I'm sorry but I haven't enough information to answer.
0 commit comments