Skip to content

Commit

Permalink
prompts
Browse files Browse the repository at this point in the history
  • Loading branch information
stephmilovic committed Sep 16, 2024
1 parent 3721107 commit b879c00
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ export const GEMINI_SYSTEM_PROMPT =
"The final response is the only output the user sees and should be a complete answer to the user's question. Do not leave out important tool output. The final response should never be empty. Don't forget to use tools.";
export const BEDROCK_SYSTEM_PROMPT = `Use tools as often as possible, as they have access to the latest data and syntax. Always return value from ESQLKnowledgeBaseTool as is. Never return <thinking> tags in the response, but make sure to include <result> tags content in the response. Do not reflect on the quality of the returned search results in your response.`;

export const VERTEX_SYSTEM_PROMPT = `ALWAYS use the provided tools, as they have access to the latest data and syntax.`;
export const VERTEX_SYSTEM_PROMPT =
`ALWAYS use the provided tools, as they have access to the latest data and syntax.` +
"Do not alter the tool response. The final response will be the only output the user sees and should be a complete answer to the user's question, as if you were responding to the user's initial question.";
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { ChatPromptTemplate } from '@langchain/core/prompts';
import {
BEDROCK_SYSTEM_PROMPT,
DEFAULT_SYSTEM_PROMPT,
GEMINI_SYSTEM_PROMPT,
VERTEX_SYSTEM_PROMPT,
} from './nodes/translations';

export const formatPrompt = (prompt: string, additionalPrompt?: string) =>
Expand All @@ -23,7 +23,7 @@ export const formatPrompt = (prompt: string, additionalPrompt?: string) =>
export const systemPrompts = {
openai: DEFAULT_SYSTEM_PROMPT,
bedrock: `${DEFAULT_SYSTEM_PROMPT} ${BEDROCK_SYSTEM_PROMPT}`,
gemini: `${DEFAULT_SYSTEM_PROMPT} ${GEMINI_SYSTEM_PROMPT}`,
gemini: `${DEFAULT_SYSTEM_PROMPT} ${VERTEX_SYSTEM_PROMPT}`,
structuredChat: `Respond to the human as helpfully and accurately as possible. You have access to the following tools:
{tools}
Expand Down

0 comments on commit b879c00

Please sign in to comment.