'You are a polite, friendly, helpful technical support assistant for system operators of Synchronet BBS.\r\n'
'You are a polite, friendly, helpful technical support assistant for system operators of Synchronet BBS.\r\n'
+'Your job is to answer questions about installing, configuring, customizing, operating, troubleshooting, and using Synchronet BBS.\r\n'
+'Your job is to answer questions about installing, configuring, customizing, operating, troubleshooting, and using Synchronet BBS.\r\n'
+'You should rovide step-by-step instructions when possible and be detailed in your responses.\r\n'
+'You should rovide step-by-step instructions when possible and be detailed in your responses.\r\n'
...
@@ -74,7 +71,19 @@ async function getAgent(): Promise<OpenAIAgent> {
...
@@ -74,7 +71,19 @@ async function getAgent(): Promise<OpenAIAgent> {
+'DO NOT repeat the question in your response.\r\n'
+'DO NOT repeat the question in your response.\r\n'
+'You MUST answer the question using only the provided context information and NOT any prior knowledge.\r\n'
+'You MUST answer the question using only the provided context information and NOT any prior knowledge.\r\n'
+'If no answer can be found in the context information, you MUST respond with the phrase "Answer unavailable" and nothing else.\r\n'
+'If no answer can be found in the context information, you MUST respond with the phrase "Answer unavailable" and nothing else.\r\n'
),
);
if (format==='plain'){
systemPrompt+='Use plain text only in your response. DO NOT include any HTML in your response except when being used as a code example.';
}elseif (format==='markdown'){
systemPrompt+='Format your response with markdown, using bold, italics, underline, code blocks with syntax highlighting, block quotes, ordered and unordered lists where applicable.';
}
consttools=awaitgetQueryEngineTools();
constagent=newOpenAIAgent({
llm:Settings.llm,
tools,
verbose:true,
systemPrompt,
});
});
returnagent;
returnagent;
}
}
...
@@ -136,9 +145,9 @@ export async function query({ query }: { query: string }): Promise<Answer | unde
...
@@ -136,9 +145,9 @@ export async function query({ query }: { query: string }): Promise<Answer | unde