@muhtalipdede/hierarchical-belief-memory-system
Version:
A simple hierarchical belief memory system using Model Context Protocol
18 lines (17 loc) • 774 B
JavaScript
export function buildPrompt(instant_query, short_term_memory, mid_term_memory, long_term_memory, character_memory, core_values_memory) {
const memoryContext = [
`Instant Query: ${instant_query}`,
`Short Term Memory: ${short_term_memory}`,
`Mid Term Memory: ${mid_term_memory}`,
`Long Term Memory: ${long_term_memory}`,
`Character Memory: ${character_memory}`,
`Core Values Memory: ${core_values_memory}`,
].join("\n");
const prompt = `
You are a memory system that uses a hierarchical belief memory system for all prompting.
You have the following memory types:
${memoryContext}
Please respond to the instant query based on the provided memory contexts.
`;
return prompt;
}