AI Agent Hub
Back to plugins
🧠

dsh-pattern-search

Memory Updated 2026.08.25

Run the following command in DeepSeek Harness:

dsh plugin install yzhangjy/dsh-pattern-search

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install yzhangjy/dsh-pattern-search (source: https://github.com/yzhangjy/dsh-pattern-search) in the DeepSeek Harness terminal, then restart dsh web and hard-refresh the browser to activate the plugin.

About this plugin

In a DSH conversation, recurring model phrasings such as "Actually, wait, let me..." are fleeting textual artifacts: you can recognize them instinctively, yet you cannot count them, graph them, or trace how often they resurface across a long session. dsh-pattern-search turns regular expressions into a magnifying glass for exactly that gap, letting you search assistant replies, reasoning traces, user messages, and tool results in a single pass and read the results back as a statistics panel showing matched turns, message hit rate, distinct matched strings, and per-source and per-turn breakdowns.

The primary interface is a client-side floating window triggered by /pattern-search. You paste a regex (with optional i, s, m flags), click Search, and get a paginated, bordered table where every hit is highlighted alongside 60 characters of surrounding context. A "Search full session" toggle loads the entire durable log so hit rates reflect the whole interaction rather than just the recent client window; a "Partial" switch snapshots in-flight streaming output into the same search. All colors resolve from dsh web theme tokens, so the window adapts seamlessly to day and night mode without extra configuration.

Equally notable is the pattern_search session tool: the model itself can invoke the identical search logic against the current session's durable event log, enabling true in-session self-observation. This lets you quantify behaviors that were previously only qualitatively noticeable, such as how often the model backtracks or restates a plan. The plugin is well suited for researchers building behavioral baselines, product analysts tracking specific phrasings at scale, and any heavy DSH user who needs to pinpoint text fragments quickly without leaving the conversation.

Use Cases

  • Quantify how often a model uses a particular phrasing across a long session
  • Locate and highlight every regex match in hundreds of conversation turns with context
  • Let the model self-inspect its own durable output for behavioral auditing

Best For

  • Researchers or engineers studying LLM behavioral patterns
  • Product or data analysts tracking phrasing frequency at scale
  • Heavy DSH users who need fast, highlighted text search in conversations