Prevent Retrieval Dilution in Alfresco RAG with Metadata Filters
说明与用途
在使用 Alfresco 仓库的 RAG 应用中,检索稀释现象导致无关但语义相似的文本块占据前几名,导致模型无法找到正确答案。通过添加查询分析步骤,提取语义查询和基于 Alfresco 元数据的站点过滤器,可限制检索范围并返回相关文档。
问题
Retrieval dilution occurs when irrelevant but semantically similar document chunks occupy the top retrieval results, causing a RAG application to miss the correct answer.
结果
The three-step metadata-aware RAG successfully mitigates retrieval dilution by filtering retrieval results based on Alfresco site metadata, ensuring relevant context is returned and the LLM can answer correctly.
工作流
- Load documents from Alfresco into vector store preserving OpenDMA metadata.
- Ask a question and perform a similarity search on the vector store.
- Observe retrieval dilution when the Engineering document dominates the top results.
- Add a query analysis step that extracts a semantic query and a site filter using a structured LLM output.
- Retrieve chunks using both the semantic query and the site filter.
- Generate the answer from the filtered context.
- Validate that the answer is correct and relevant.
- Iterate if necessary.
证据
A normal similarity search returned meeting notes from the project. These notes contain the decision to include localisation in phase 1, so the RAG application could answer the question.
This time, all ten results came from the Engineering document: ...
Alfresco does know this. Documents loaded through OpenDMA carry the repository metadata alongside their text.
We extend the normal two-step RAG with one query analysis step: question -> analyse query -> retrieve with filter -> generate answer
- 记录日期: 2026-11-03T15:13:58.329Z