---
title: "Recover a debugging solution: retrieve, read, then verify reuse"
description: Use a constructed debugging scenario to check notes, vectors, and search results, then compare the original conversation with the current project.
image: "https://zengliangyi.com/og/blog/en/recover-debugging-notes.png"
---

Remembering that you solved a problem without remembering its conditions and changes is more troublesome than losing a code snippet. A knowledge base can narrow the search, but a related note still needs a check against the current situation.

The following is a constructed scenario: a React page issues duplicate requests, and a historical note records an investigation. It is not a personal incident or a measured promise of retrieval within a few seconds. Behavior follows the search routes and note services in [ChatCrystal](/en/projects/chatcrystal) at commit [`7642768`](https://github.com/ZengLiangYi/ChatCrystal/tree/764276814e5c5a33ecbfeae63754f74b9261a3a8).

## Establish that a searchable note exists

Importing conversations, generating notes, and creating vectors are separate steps. Current semantic retrieval searches note vectors; absent notes do not trigger fallback to full-text search over original conversations. Select an actual conversation outside the demo data and complete the summary and index steps in the [getting-started workflow](/en/blog/chatcrystal-getting-started).



```bash
crystal   --json   notes   list   --limit   20
```



Select the known note’s ID from `items`, then read its details:



```text
crystal --json notes get <note-id>
```



Check its content and `embedding_status`. `done` means vector processing completed, not that the summary is necessarily correct. Resolve `pending`, `syncing`, or `failed` index states first. The experience gate can also legitimately filter a conversation without generating a note. See [LLM and embedding responsibilities](/en/blog/llm-and-embedding-separation) for model configuration and rebuilding acceptance.

## Describe the problem, then compare phrasing

With the default local connection, use JSON output to pass the requested limit to retrieval. Fewer eligible candidates can produce fewer results than this upper bound:



```bash
crystal   --json   search   "React page sends duplicate requests; how to locate the trigger"   --limit   5
```



Keep distinguishing conditions: stack, error, stage, and expected behavior. Try short keywords too. Natural language does not always outperform keywords, and longer descriptions can introduce irrelevant concepts. Checking whether several phrasings retrieve the same known note is more testable than claiming that specificity always improves accuracy.

The [search route](https://github.com/ZengLiangYi/ChatCrystal/blob/764276814e5c5a33ecbfeae63754f74b9261a3a8/server/src/routes/notes.ts) returns candidate fields including `note_id`, `conversation_id`, title, project, tags, and score. It does not directly return full note bodies or original conversation excerpts. CLI JSON is an unwrapped array. If `jq` is installed, extract identifiers with:



```bash
crystal   --json   search   "React duplicate requests"   --limit   5   |  
    jq   '.[] | {note_id, conversation_id, title, score}'
```



Use `.[]`, not `.data[]`. Results are entrances to further reading, not verified debugging answers.

## Read the note and return to the original record

Fetch details using the candidate’s `note_id`. Inspect the problem, conclusions, snippets, and project. A summary can omit environmental conditions; when needed, use `conversation_id` with `GET /api/conversations/<id>` to inspect actual messages.

In this constructed scenario, ask whether duplicates occurred in development or production; whether they came from lifecycle behavior, user events, or retries; and whether the historical change removed the fault or concealed its symptoms. Do not apply a particular React setting without evidence.

The [retrieval implementation](https://github.com/ZengLiangYi/ChatCrystal/blob/764276814e5c5a33ecbfeae63754f74b9261a3a8/server/src/services/embedding.ts) combines vector candidates, lexical boosts, and note deduplication. Its score is neither a pure raw cosine value nor a probability that a solution is correct. Higher scores help prioritize reading.

## Test recovery with positive and negative queries

Record at least two query types: a problem that should retrieve the known solution, and one for which the knowledge base has no relevant answer. For the positive case, check candidate inclusion and whether the note explains the handling. For the negative case, inspect empty results or candidates that require human rejection.

If nothing appears, check whether the real note exists, vector processing completed, the query model matches stored vectors, and the wording relates to the content. An empty result does not directly prove poor model quality. Summarizing an existing note’s conversation does not automatically rewrite that note either: the current summary service returns its existing ID first. `summarize --all` is not whole-library regeneration.

## Verify the current project before reuse

Turn the historical solution into a testable hypothesis. Reproduce the issue in the current project, apply a minimal change, and check the fault plus relevant regression paths. Recheck official references when versions, dependencies, or deployment conditions differ.

Only after examining applicability and results does a candidate become evidence for the current task. If an Agent retrieves through MCP, ask it to show the note, conditions, and validation steps; supplying a tool does not guarantee automatic invocation every time. See [RAG and knowledge graphs](/en/blog/rag-and-knowledge-graphs) for retrieval and relation boundaries, and the [knowledge memory loop](/en/blog/agent-knowledge-memory-loop) for writeback quality.

Share:

##  Related Posts

[##  Semantic Search and Context: Finding Hidden Code Dependencies

Combine vector search with one-hop graph relation expansion in code refactoring, keeping similarity scores, candidates, and sources verifiable on disk.          曾亮懿       October 3, 2026      3 min read

#ChatCrystal

#Semantic search

#Knowledge graph](/en/blog/semantic-search-relation-context)    [##  Semantic Search: Candidate Deduplication and Graph Context

Trace query vectors, candidate growth, lexical boosts, and relation expansion in ChatCrystal, distinguishing list filtering from semantic retrieval.          曾亮懿       October 3, 2026      3 min read

#ChatCrystal

#Semantic search

#RAG](/en/blog/semantic-search-workflow)    [##  AI Conversation Formats: JSONL Events vs SQLite Snapshots

Compare 5 AI adapter formats: separate JSONL events from SQLite keys, and inspect indexed, orphan, and unknown-version chat transcripts in memory stores.          曾亮懿       October 7, 2026      4 min read

#ChatCrystal

#Node.js

#SQLite](/en/blog/ai-conversation-format-divergence)

##  From writing to code

Explore ChatCrystal, developer tools and daily learning notes on my GitHub. Questions about the implementation are welcome.

[Visit my GitHub](https://github.com/ZengLiangYi)

```json
{
  "@context": "https://schema.org",
  "@type": "WebSite",
  "name": "ZengLiangYi Blog",
  "alternateName": [
    "Zeng Liangyi",
    "ZengLiangYi",
    "zengliangyi.com"
  ],
  "url": "https://zengliangyi.com",
  "description": "曾亮懿的个人网站。记录 AI Native 探索、开发者工具与全栈产品实践。"
}
{
  "@context": "https://schema.org",
  "@type": "BlogPosting",
  "headline": "Recover a debugging solution: retrieve, read, then verify reuse",
  "description": "Use a constructed debugging scenario to check notes, vectors, and search results, then compare the original conversation with the current project.",
  "url": "https://zengliangyi.com/en/blog/recover-debugging-notes/",
  "image": "https://zengliangyi.com/images/blog/recover-debugging-notes.svg",
  "datePublished": "2026-10-03T00:00:00.000Z",
  "dateModified": "2026-10-03T00:00:00.000Z",
  "author": {
    "@type": "Person",
    "name": "曾亮懿",
    "url": "https://zengliangyi.com/en/about"
  },
  "publisher": {
    "@type": "Organization",
    "name": "ZengLiangYi Blog",
    "logo": {
      "@type": "ImageObject",
      "url": "https://zengliangyi.com/favicon-96x96.png"
    }
  },
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://zengliangyi.com/en/blog/recover-debugging-notes/"
  }
}
{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    {
      "@type": "ListItem",
      "position": 1,
      "name": "Home",
      "item": "https://zengliangyi.com/en"
    },
    {
      "@type": "ListItem",
      "position": 2,
      "name": "Blog",
      "item": "https://zengliangyi.com/en/blog"
    },
    {
      "@type": "ListItem",
      "position": 3,
      "name": "Recover a debugging solution: retrieve, read, then verify reuse",
      "item": "https://zengliangyi.com/en/blog/recover-debugging-notes/"
    }
  ]
}
```
