跪拜 Guibai
← All articles
Agent

RAG End-to-End: Why a Fund Agent Still Gives Unreliable Answers

By hpoenixf ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

RAG deployments in finance and other regulated domains face hard requirements on evidence provenance, permission revocation, and versioning. This walkthrough shows where those requirements actually break in real systems, so engineers can stop chasing recall numbers and start instrumenting the retrieval-to-answer chain for the failures that matter.

Summary

RAG systems fail in ways that recall metrics never capture. This piece traces the full path from document ingestion to a final researched answer, using a real fund-announcement question: “What exactly changed in 2023, and can later materials explain that change?” Returning three seemingly relevant documents to the model does not guarantee a correct answer, because the newest file may not be the direct evidence for a historical event, and a keyword match does not mean the right clause applies.

The system separates four distinct chains: knowledge construction (ingesting and versioning materials), online retrieval (permission-filtered candidate ranking), evidence consumption and delivery (what the model actually reads and cites), and evaluation/governance (where to debug the first evidence loss). Each chain has its own failure modes. Permission filtering must happen before Top-K selection, not after, to avoid leaking private notes or squeezing out authorized candidates. Retrieval hits, externalized content locators, and real reads of the original text are three different levels of evidence — only the last one supports a verifiable citation.

The piece also covers versioned updates, the difference between “currently not accessible” and “explicitly asked to delete retained copies,” and a decision table for when to use full RAG versus plain lexical search. An open teaching repository exposes a minimal lexical-retrieval implementation, but the full private system’s architecture is not reproduced there. The goal is not to route every question through more steps, but to ensure that for questions that genuinely need retrieval, the chain preserves the fact of what was found, read, and supported — and what remains unknown.

Takeaways
— A knowledge index entry must trace back to logical source, document version, content hash, section or page, fragment range, and text representation type.
— Permission filtering must run before Top-K candidate selection to prevent leakage and to keep authorized documents from being pushed out of the candidate pool.
— RRF merges lexical and vector rankings by position and deduplicates by source/version/fragment identity; it does not compute a probability that a claim is true.
— A reranker can only reorder already-authorized candidates; it cannot recall material that never entered the pool or grant permissions.
— Four distinct actions must all happen for a model to actually use knowledge: Host allows the tool, tool definition appears in the model request, model calls it and gets results, and subsequent model input carries usable content.
— Externalizing large tool results and giving the model only locators creates a false 'read' impression; only actually delivered and still-authorized fragments support verifiable citations in the current Run.
— Document updates are conditional state changes, not in-place overwrites; old versions remain under their own retention and read-back rules.
— A 2026-09 controlled revocation reproduction showed that historical playback could hide revoked material but first-time streaming could still expose protected fragments, so eligibility checks must happen at the actual submission point.
— The RQ-08 evaluation compared 306 indexed chunks across three fixed source versions, but without full human relevance labels, no claim of improved Recall or financial answer accuracy can be made.
— The open teaching repository (Open ETF Agent) only provides restricted lexical retrieval, original-page read-back, and source-linked reports on synthetic documents; the private system's full RAG architecture is not reproducible from it.
Conclusions

The recurring failure in RAG is not missing chunks but missing evidence: the system often cannot prove that a specific fragment was actually read and bound to a claim at answer time.

A reliable answer requires distinguishing 'file exists' from 'fully searchable', 'ranked high' from 'supports the claim', and 'tool executed' from 'model used it correctly' — these are separate gates that a single manager cannot own.

Permission revocation and historical replay create a time-of-check/time-of-use problem: content may be readable at retrieval, disclosable at submission, and re-displayable later under different rules, so eligibility must be rechecked at the point of actual disclosure.

The value of hybrid retrieval is task-dependent, not inherent; adding vector search, embeddings, and a reranker imposes real latency and maintenance costs that only pay off when a measured gap appears in a specific stage.

Engineering retrieval metrics like Recall@K are useful for debugging algorithm stages, but they sit far from the final user outcome because model consumption and semantic verification sit between them.

Concepts & terms
RRF (Reciprocal Rank Fusion)
A method for merging ranked lists from multiple retrieval channels by summing reciprocal ranks of each candidate; it provides a stable ordering and enables deduplication by source/version/fragment identity, but does not estimate the probability that a claim is true.
TEI reranker
A local embedding-based reranker (Text Embeddings Inference) that re-scores an already-authorized candidate set; when unavailable, the system degrades to the original RRF order.
MCP (Model Context Protocol)
A protocol for connecting tools to models; wrapping a retriever in MCP does not fill an empty index or guarantee retrieved material appears in model input — the real work is in acquisition, authorization, invocation, delivery, and provenance.
Knowledge Source
In this system, an explanatory material asset, not an authoritative investment ledger; historical announcements can support historical change facts but cannot become current NAV, holdings, or trading instructions.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗