cass

DocsSearch

Deduplication Strategy

On this page

The same conversation content can appear multiple times due to:

  • Agent file rewrites
  • Backup files
  • Symlinked directories
  • Re-indexing

Content-Based Deduplication#

cass uses a multi-layer deduplication strategy:

  1. Message identity: messages are keyed by UNIQUE(conversation_id, idx). Appends to a known conversation use INSERT OR IGNORE, and a new conversation's batched INSERT has the same unique index as its backstop, so re-indexing the same file never stores a message twice

    • No content hash is persisted for this; BLAKE3 content hashes are computed in memory only, as merge fingerprints when an updated file is reconciled against stored rows
  2. Conversation identity: conversations are keyed by UNIQUE(source_id, agent_id, external_id)

    • There is no fingerprint built from message hashes; the same external id from the same source and agent is the same conversation
  3. Search-Time Dedup: hits are deduplicated on an exact key tuple — (source, source path, conversation id or title, line number, created_at, whitespace-invariant content hash) — keeping the highest-scored hit

    • Identical content from different sources stays visible as separate results; tool-invocation noise is filtered

Noise Filtering#

Common low-value content is filtered from results:

  • Empty messages
  • Pure whitespace
  • System prompts (unless searching for them)
  • Repeated tool acknowledgments