hermes - 💡(How to fix) Fix Honcho Dialectic Query Missing Last User Message & Semantic Search Pollution

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

The dialectic query for Honcho is currently constructed without the latest user message, because that message will not have been synced/flushed to Honcho yet:

Code Example

const dialecticQuery = `Given what's been discussed in the session so far, what is the most relevant context...?`;

---

"{peerName}: {latestUserMessage}"

Given what's been discussed in the session so far, what is the most relevant context...?`;

---

// Input: "What is the weather like today in Prague?"
// Output: "What relationship does this peer have to Prague? What kind of weather would they likely prefer in Prague?"
RAW_BUFFERClick to expand / collapse

Scope: This issue affects the Honcho memory backend integration only.

Current Behavior

The dialectic query for Honcho is currently constructed without the latest user message, because that message will not have been synced/flushed to Honcho yet:

const dialecticQuery = `Given what's been discussed in the session so far, what is the most relevant context...?`;

This means the dialectic agent has zero information about what the user just asked when attempting to retrieve relevant memory, only the an off-by-one session history.

Attempted Fix & Blocker

PR #34551 attempted to include the user message by prepending it:

"{peerName}: {latestUserMessage}"

Given what's been discussed in the session so far, what is the most relevant context...?`;

This unfortunately doesn't play well with Honcho. On a self-hosted setup, it caused ~30B parameter models to:

  • Confuse their role (answering vs. retrieving) and attempt to answer the user question directly
  • Focus on a narrow part of the query rather than on wider context
  • Hallucinate instead of querying memory

Bigger and more expensive models fared marginally better but the performance wasn't stellar either, even with Claude Opus.

Additionally, the entire constructed prompt is used for semantic similarity observation prefetch on the Honcho side, causing:

  • Instructions to dominate embeddings for short user messages
  • Unpredictable retrieval quality

Proposed Solution

Phase 1: Preprocessor LLM (Immediate)

Add a fast, auxiliary LLM call that transforms the user message into a dialectic-optimized query:

// Input: "What is the weather like today in Prague?"
// Output: "What relationship does this peer have to Prague? What kind of weather would they likely prefer in Prague?"

This query:

  • Elicits relevant user context (travel habits, preferences, past mentions)
  • Excludes instructions that would pollute semantic search
  • Keeps the dialectic agent focused on retrieval

Phase 2: Honcho API Enhancement (Blocked on upstream)

Once Honcho supports separate semantic_query / reasoning_context parameters (see https://github.com/plastic-labs/honcho/issues/754), remove the preprocessor and pass structured data directly.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix Honcho Dialectic Query Missing Last User Message & Semantic Search Pollution