Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Prevent Retrieval Dilution in Alfresco RAG with Metadata Filters

Description and use

In a RAG application using an Alfresco repository, retrieval dilution occurs when irrelevant but semantically similar chunks dominate the top results, preventing the model from finding the correct answer. Adding a query‑analysis step that extracts a semantic query and a site filter based on Alfresco metadata limits the search scope and returns relevant documents.

Problem

Retrieval dilution occurs when irrelevant but semantically similar document chunks occupy the top retrieval results, causing a RAG application to miss the correct answer.

Outcome

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.

Workflow

  • 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.

Evidence

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.

Source

This time, all ten results came from the Engineering document: ...

Source

Alfresco does know this. Documents loaded through OpenDMA carry the repository metadata alongside their text.

Source

We extend the normal two-step RAG with one query analysis step: question -> analyse query -> retrieve with filter -> generate answer

Source

  • Record date: 2026-11-03T15:13:58.329Z