// Query enhancer prompt for generating better search terms
QUERY_ENHANCER:
`You are an AI assistant that decides what information needs to be retrieved from a user's knowledge base called TriliumNext Notes to answer the user's question.
// Used to format notes context when providing responses
CONTEXT_NOTES_WRAPPER:
`I'll provide you with relevant information from my notes to help answer your question.
{noteContexts}
Whenreferringtoinformationfromthesenotesinyourresponse,pleasecitethembytheirtitles(e.g.,"According to your note on [Title]...")ratherthanusinglabelslike"Note 1"or"Note 2".
"I am an AI assistant helping you with your Trilium notes. "+
"I couldn't find any specific notes related to your query, but I'll try to assist you "+
"with general knowledge about Trilium or other topics you're interested in.",
// Fallback when context building fails
ERROR_FALLBACK_CONTEXT:
"I'm your AI assistant helping with your Trilium notes. I'll try to answer based on what I know.",
// Headers for context (by provider)
CONTEXT_HEADERS:{
ANTHROPIC:(query: string)=>
`I'm your AI assistant helping with your Trilium notes database. For your query: "${query}", I found these relevant notes:\n\n`,
DEFAULT:(query: string)=>
`I've found some relevant information in your notes that may help answer: "${query}"\n\n`
},
// Closings for context (by provider)
CONTEXT_CLOSINGS:{
ANTHROPIC:
"\n\nPlease use this information to answer the user's query. If the notes don't contain enough information, you can use your general knowledge as well.",
DEFAULT:
"\n\nBased on this information from the user's notes, please provide a helpful response."
"I'm an AI assistant helping with your Trilium notes. I couldn't find specific notes related to your query, but I'll try to assist based on general knowledge.",
// Prompt for adding note context to chat
NOTE_CONTEXT_PROMPT:`Here is the content of the note I want to discuss:
{context}
Pleasehelpmewiththisinformation.`,
// Prompt for adding semantic note context to chat
SEMANTIC_NOTE_CONTEXT_PROMPT:`Here is the relevant information from my notes based on my query "{query}":
`Here's information from my notes to help answer the question:
${context}
Basedonthisinformation,pleaseanswer: ${query}`
},
// Common prompts across providers
COMMON:{
DEFAULT_ASSISTANT_INTRO:"You are an AI assistant integrated into TriliumNext Notes. Focus on helping users find information in their notes and answering questions based on their knowledge base. Be concise, informative, and direct when responding to queries."
}
};
// Constants for formatting context and messages
exportconstFORMATTING_PROMPTS={
// Headers for context formatting
CONTEXT_HEADERS:{
SIMPLE:(query: string)=>`I'm searching for information about: ${query}\n\nHere are the most relevant notes from my knowledge base:`,
DETAILED:(query: string)=>`I'm searching for information about: "${query}"\n\nHere are the most relevant notes from my personal knowledge base:`
},
// Closing text for context formatting
CONTEXT_CLOSERS:{
SIMPLE:`End of notes. Please use this information to answer my question comprehensively.`,
DETAILED:`End of context information. Please use only the above notes to answer my question as comprehensively as possible.`
},
// Dividers used in context formatting
DIVIDERS:{
NOTE_SECTION:`------ NOTE INFORMATION ------`,
CONTENT_SECTION:`------ CONTEXT INFORMATION ------`,