diff --git a/packages/memory-service/src/entities/extraction.js b/packages/memory-service/src/entities/extraction.js index 08df41d..8daa923 100644 --- a/packages/memory-service/src/entities/extraction.js +++ b/packages/memory-service/src/entities/extraction.js @@ -93,7 +93,10 @@ async function extractAndStoreEntities(userMessage, aiResponse, projectId=null) const parsed = JSON.parse(raw); const entities = Array.isArray(parsed.entities) ? parsed.entities : []; - if (entities.length === 0) throw new Error('No entities in response'); + if (entities.length === 0) { + console.log('[entities] No entities found in this exchange — skipping'); + return; // not an error, just nothing to extract + } if (!Array.isArray(entities)) throw new Error('Response was not a JSON array'); diff --git a/packages/shared/src/config/constants.js b/packages/shared/src/config/constants.js index 5ac457a..2d084dc 100644 --- a/packages/shared/src/config/constants.js +++ b/packages/shared/src/config/constants.js @@ -26,7 +26,7 @@ const ORCHESTRATION = { SEMANTIC_LIMIT: 5, SCORE_THRESHOLD: 0.5, ENTITIES_LIMIT: 5, - ENTITIES_THRESHOLD: 0.5, + ENTITIES_THRESHOLD: 0.6, TEMPERATURE: 0.7, CORS_ORIGIN: 'http://localhost:5173', SYSTEM_PROMPT: `You are a helpful, context-aware AI assistant. You have access to memories of past conversations with the user. Use them to provide consistent, personalised responses.`