Integrations

Add the significance channel to your existing chatbot in 20 lines

Your chatbot handles factual queries well. Significance queries — "when was I most afraid?" — return nothing.

The Problem

Your chatbot handles factual queries well — dates, names, events. But significance queries — "when was I most afraid?", "what made me happiest with mum?" — return nothing because BM25 and semantic search match words, not meaning.

How It Works

The significance channel intercepts queries and routes them by what mattered, not keyword frequency.

query arrives
    ↓
your existing retrieval (BM25/semantic/temporal)
    ↓
significance channel (/v1/activate)
    → returns field filters
    → apply to your memory store
    ↓
merge candidates
    ↓
LLM receives significance-weighted context

The Code

Wrap your existing /chat endpoint with a significance channel call before retrieval:

// Express.js — wrap your existing /chat endpoint
app.post('/chat', async (req, res) => {
  const { query, userId } = req.body;

  // 1. Call significance channel
  const activation = await fetch('https://deepadata.com/api/v1/activate', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.DEEPADATA_API_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({ query })
  }).then(r => r.json());

  // 2. Apply EDM filters to your existing memory store
  const filters = activation.data?.field_filters || {};
  const memories = await yourMemoryStore.search(query, { filters });

  // 3. Continue with your existing LLM call
  const response = await yourLLM.chat({ query, context: memories });
  res.json({ response });
});

That's it. Your existing retrieval pipeline gains significance awareness with one API call.

What You Get

Before

"when was I happiest with mum"

→ No results. Semantic search finds "mum" mentions but can't rank by emotional significance.

After

"when was I happiest with mum"

→ EDM routes to arc_type: bond, emotional_weight ≥ 0.7 → finds it.

Why it works:queries like this share no words with the stored text — "what mattered" is typed into the record as fields (arc, weight, state), so it can be addressed directly instead of hoped-for via embedding proximity.

Related