Skip to content

Add conversation route + wire NLP intelligence into memory writes#5

Merged
Yashasm18 merged 1 commit into
mainfrom
feat/conversation-node-and-nlp-wiring
Jul 14, 2026
Merged

Add conversation route + wire NLP intelligence into memory writes#5
Yashasm18 merged 1 commit into
mainfrom
feat/conversation-node-and-nlp-wiring

Conversation

@Yashasm18

Copy link
Copy Markdown
Owner

Summary

Fixes the "no proper answer" problem seen in the local workspace and makes the NLP layer actually do something.

1. Conversation route (the missing piece)
Every message was previously forced into memory/knowledge/execution/repo_analysis. A general question like "can u explain me" got classified as memory, retrieved nothing, and the LLM apologised about an empty memory store instead of answering. Added a conversation node that is now the router's default — it answers naturally with the LLM, injects relevant stored memories as optional context (never as a gate), and uses prior turns for continuity. Ambiguous/failed classification now falls back to conversation instead of the JSON-only execution planner.

2. NLP intelligence wired into knowledge writes
The Python spaCy + sentence-transformers service existed but was never called during chat. nodeKnowledge now makes a best-effort call to /analyze/memory after storing, folds extracted entities/relationships into the knowledge graph, and reports the counts. Fully non-blocking (8s AbortController + try/catch) — a down service degrades to a plain "saved to memory."

Test plan (verified against local Ollama)

  • "can u explain me" → real answer, no memory apology
  • "Explain how transformers work" → substantive conversational answer
  • "Remember that Yashas prefers PostgreSQL" → stored; with NLP up, reported "2 entities and 1 relationship"; graph.db shows yashas PREFERS postgresql
  • "What is my favorite database?" → recalled correctly
  • NLP service down → write still succeeds (graceful fallback)

🤖 Generated with Claude Code

Two fixes to make the agent actually answer well and use the NLP layer:

1. Conversation node (fixes "no proper answer")
   Previously every message was forced into memory/knowledge/execution/
   repo_analysis. A general question like "can u explain me" got
   classified as `memory`, found nothing, and the LLM apologised about an
   empty memory store instead of just answering. Added a `conversation`
   route that is now the router's default: it answers naturally with the
   LLM, injecting relevant stored memories as optional context (never as
   a gate), and uses prior turns for continuity. Ambiguous/failed
   classification now falls back to conversation instead of execution.

2. NLP intelligence wired into knowledge writes
   The Python spaCy/sentence-transformers service was built but never
   called during chat. nodeKnowledge now makes a best-effort call to
   /analyze/memory after storing, folds the extracted entities/
   relationships into the knowledge graph via ingestKnowledgeGraph, and
   reports the counts back to the user. It is fully non-blocking: an
   8s-timeout AbortController and try/catch mean a down/slow service
   degrades to a plain "saved to memory" — persistence never depends on
   NLP.

Verified against local Ollama: conversation answers real questions
(no more memory apology), memory recall works, knowledge writes succeed
with the NLP service both up (entities/relationships land in graph.db)
and down (graceful fallback).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Yashasm18
Yashasm18 merged commit a3a9337 into main Jul 14, 2026
2 checks passed
@Yashasm18
Yashasm18 deleted the feat/conversation-node-and-nlp-wiring branch July 14, 2026 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant