OpenViking icon indicating copy to clipboard operation
OpenViking copied to clipboard

Memory vector-store abstract uses full content instead of VLM-generated summary

Open njuboy11 opened this issue 4 months ago • 0 comments

Problem

When MemoryUpdater writes vector-store entries to Qdrant, it uses the full stripped content of each memory file as the abstract field:

# memory_updater.py:1269
abstract = LinkRenderer.strip_all_links(mf.content or "")  # ~1000-5000 chars

However, the VLM extraction pipeline already generates a concise summary (typically 80-200 characters) for memory types that have a summary field in their schema — most notably events, which is the most frequently created memory type.

This summary is stored in MemoryFile.extra_fields["summary"] but is never used during vectorization. Instead the full content is written verbatim, bloating Qdrant payloads and reducing recall signal-to-noise ratio when recallPreferAbstract=true is used.

Reproduce

  1. Configure any memory type with summary field (e.g. the built-in events.yaml)
  2. Run memory extraction — VLM correctly outputs summary in MEMORY_FIELDS
  3. Check Qdrant points: payload.abstract = full # Summary + # ChatLog content (1000-5000 chars), not the concise VLM-generated summary (~100 chars)

Expected

Qdrant abstract should prefer the VLM-generated summary field when available, falling back to full content only for memory types without summary.

Environment

  • OpenViking 0.4.8 (also applies to upstream/main)
  • events memory type (add_only, has summary field)

Root Cause

memory_updater.py:_vectorize_memory_files discards mf.extra_fields["summary"] and always uses full content:

abstract = LinkRenderer.strip_all_links(mf.content or "")

MemoryFileUtils.read() correctly populates extra_fields from the YAML frontmatter, so the summary is available but ignored.

Additional Context

This issue pairs with PR #3137 which fixed archive .abstract.md generation. Both are about using the real VLM-generated summary instead of raw markdown content — just in different code paths (archive vs Qdrant).

njuboy11 avatar Jul 10 '26 19:07 njuboy11