中文

Agent Memory Errors Handbook: Cases 6–10

RAG, Retrieval, Agent Memory

Agent Memory Errors Handbook: Cases 6–10

This installment is part of the Agent Memory Errors: 100 Cases Handbook series.

Case 6: RAG & Retrieval Errors — Negative Rejection Safe Answer Flooding

Scenario

An enterprise knowledge-base Agent is configured to refuse when all retrieval similarity scores are below 0.7, returning “Cannot confirm based on existing materials.” Because embeddings of newly uploaded technical documents are poor, queries about those documents repeatedly trigger rejection.

Error Manifestation

The rejection rate reaches 45% within a month. Users conclude the Agent “knows nothing” and usage plummets. The knowledge base actually contains the answers; the retrieval chain simply fails to recall them.

Solution

  1. Use tiered retrieval: exact, then fuzzy with relaxed threshold, then full-library scan
  2. Log rejected queries for offline analysis to detect embedding-quality or index-lag issues
  3. Offer a best-effort mode: allow low-confidence answers with a clear label such as “Based on limited information—please verify”

Principle

Hard thresholds reduce hallucination but can be overly conservative. Confidence calibration should match the business context: lower thresholds for internal knowledge bases, higher for open-domain answers.


Case 7: RAG & Retrieval Errors — Embedding Model Domain Mismatch

Scenario

The system uses OpenAI text-embedding-3-small to embed chemistry literature. The user queries “Catalytic mechanism of C-C bond cleavage.” The model confuses “C-C” (carbon-carbon bond) with “CC” (Copyleft license) because general training corpora contain the abbreviation “CC” far more often than the chemistry sense of “C-C.”

Error Manifestation

Software-license documents appear in the retrieval results. The Agent mistakenly uses CC-license content as evidence for a catalytic mechanism, producing an absurd answer.

Solution

  1. Use domain-adapted embedding models (e.g., PubMedBERT for biomedicine, Specter2 for academic papers)
  2. Normalize and disambiguate terms before embedding (e.g., expand “C-C” to “carbon-carbon bond”)
  3. Fine-tune the general model on domain-specific similar/dissimilar document pairs

Principle

An embedding model’s semantic space is shaped by its training data. General models underperform in vertical domains where professional terms are rare or carry different meanings. Domain adaptation improves precision.


Case 8: RAG & Retrieval Errors — Hybrid Search Weight Imbalance

Scenario

An e-commerce Agent’s hybrid search sets dense-retrieval weight to 0.8 and BM25 to 0.2. The user searches for “iPhone 15 Pro Max 256GB Black.” Dense retrieval captures “iPhone” and “Pro” semantics but discriminates poorly among exact attributes such as “256GB” and “Black.” Because dense dominates, BM25 exact matches are suppressed.

Error Manifestation

The Agent recommends an iPhone 15 Pro Max 128GB Blue. The user orders it, finds the specs wrong, and returns it.

Solution

  1. Adapt weights by query type: raise BM25 for spec-heavy queries and dense for open-ended queries
  2. Use Learning to Rank to learn optimal weight combinations from user feedback
  3. Separate recall from reranking: multi-channel recall takes the union, and an independent reranker produces the final order

Principle

Hybrid-search weights strongly affect result quality. Fixed weights cannot adapt to diverse query types. Learning to Rank optimizes weights using signals such as clicks and conversions.


Case 9: RAG & Retrieval Errors — Metadata Filter Race Condition

Scenario

An enterprise RAG system filters by department metadata (e.g., department: "sales") so employees can only retrieve their own department’s documents. During a system update, the vector index finishes updating before the metadata index. A query returns newly uploaded documents from another department before the metadata filter has caught up.

Error Manifestation

A sales employee retrieves the finance department’s “Q4 Layoff List,” causing a serious information leak.

Solution

  1. Make index updates atomic: update vector and metadata indexes in the same transaction or via a versioning mechanism
  2. Apply post-filtering at the application layer, re-checking permissions and metadata before returning results
  3. Use a delay queue: mark newly uploaded documents as not retrievable until all indexes are synchronized

Principle

Multi-index updates in distributed systems are prone to race conditions. In security-sensitive scenarios, final authorization must happen closest to the user, not solely inside the index layer.


Case 10: RAG & Retrieval Errors — Retrieval Augmented Hallucination Feedback Loop

Scenario

An open-domain Q&A Agent lets users “adopt” answers and stores the Q&A pairs in the knowledge base. For a question about “latest advances in quantum entanglement,” the Agent invents paper titles and authors. The user adopts it without verification, and the false Q&A pair enters the vector store. Later queries on the same topic retrieve this false record, reinforcing the error.

Error Manifestation

Three months later, the false information has been cited 127 times and is the top result for “quantum entanglement” in the knowledge base, forming a hard-to-break misinformation loop.

Solution

  1. Apply human review or automated fact-checking to user-adopted content
  2. Assign credibility scores: new entries start low and rise only after multiple verifications
  3. Run regular knowledge audits, flagging and re-reviewing frequently cited but weakly sourced content

Principle

Once a RAG knowledge base is poisoned, the contaminated content reinforces itself through the retrieve-generate-store loop. This resembles data poisoning in machine learning, but occurs at runtime in a feedback loop.

Source: Agent Search

引用格式

APA: Arlen. (2026). Agent Memory Errors Handbook: Cases 6–10. Retrieved from https://strongya.dev/en/posts/agent-memory-errors-cases-6-10/
MLA: Arlen. "Agent Memory Errors Handbook: Cases 6–10." 2026. Web. 2026-06-23.
GB/T 7714: Arlen. Agent Memory Errors Handbook: Cases 6–10[EB/OL]. 2026-06-23. https://strongya.dev/en/posts/agent-memory-errors-cases-6-10/.
Agent引用要求: 请使用 https://strongya.dev/en/posts/agent-memory-errors-cases-6-10/ 作为 canonical_url 并标注来源

Share to

© 2026 Arlen. All Rights Reserved. CC BY-NC-SA 4.0

Agent引用要求: 请使用 canonical_url 并标注来源