RAG, Retrieval, and Tool Use

Why this topic matters

RAG is often used as a cure-all for hallucinations. It is not. It helps only when the retrieval step finds the right evidence, the evidence is passed cleanly, and the model is instructed to stay within it. Tool use has a similar misconception: connecting tools makes the assistant more capable, but it also makes it easier to act unsafely if the permissions and outputs are not controlled.

Chroma results emphasized reranking, context compression, and relevance filtering as the main quality levers after retrieval. Current MCP guidance and GenAI observability standards reinforce the operational side: tool and retrieval events should be explicit, attributable, and traceable.

Conceptual model / diagrams

RAG and tool use frequently coexist in one workflow, but they should remain distinguishable.


flowchart TD
    A[Question or event] --> B[Retrieve candidate evidence]
    B --> C[Rerank and filter]
    C --> D[Model generates grounded answer]
    D --> E{Need fresh data or action?}
    E -->|No| F[Return answer]
    E -->|Yes| G[Validated tool call]
    G --> H[Tool result]
    H --> I[Model synthesizes response]

Core patterns or workflows

Retrieval design

Retrieval quality depends on more than the vector database. The system needs to make decisions about:

  • document parsing quality
  • chunk size and overlap
  • metadata such as issuer, effective date, language, or methodology version
  • retrieval strategy such as vector, keyword, hybrid, or graph-assisted
  • reranking or filtering

In ESG and index workflows, metadata filters are especially important because date, issuer, market, and methodology version frequently matter as much as semantic similarity.

Hybrid retrieval and reranking

Hybrid retrieval is often the production default:

  • lexical retrieval helps with tickers, identifiers, article numbers, and exact terms
  • vector retrieval helps with semantically related narrative passages
  • reranking improves which chunks ultimately reach the model

This is better than relying on similarity search alone, especially when the workflow mixes narrative documents and structured reference data.

Citations and evidence-linked answers

RAG is most useful when the system preserves the evidence trail. The answer should be able to point back to:

  • the source document or record
  • the chunk identifiers or page references
  • the retrieval timestamp or version
  • the methodology or data snapshot used

Without this, RAG is only a hidden context mechanism, not a trustworthy one.

Tool use and MCP-style connectivity

Use tool calls when the model needs access to:

  • live databases
  • current market or vendor records
  • document search over a large corpus
  • deterministic rule engines
  • calculators or workflow APIs

MCP matters because it gives AI applications a standardized way to connect to external systems. That improves interoperability, but it also widens the attack surface. Tool descriptions, tool outputs, and accessible resources all become part of the model’s effective context and must be treated as security-relevant.

Retrieval versus tool use

A useful rule is:

  • use retrieval when the model needs evidence to read
  • use tool use when the model needs a system to fetch, compute, or act
  • use both when the model must first gather evidence and then query a deterministic service

For example, methodology interpretation may start with retrieval over benchmark documentation, then use a tool to fetch the exact constituent or corporate-actions record for the date under review.

Production examples

ESG methodology support

An ESG analyst assistant may:

  • retrieve relevant ESRS or issuer-report sections
  • rerank by issuer and reporting period
  • surface extracted passages
  • call a taxonomy-mapping tool or internal reference service
  • draft a reviewer-facing interpretation with evidence attached

Index review support

An index QA assistant may:

  • retrieve the relevant methodology clauses and previous rebalance notes
  • call read-only tools for membership snapshots, weights, and corporate actions
  • produce a grounded explanation for why a constituent changed or why the change is suspicious

Incident investigation

A data-platform assistant may:

  • retrieve logs and runbook fragments
  • call read-only lineage or metadata tools
  • propose next checks while keeping state-changing actions outside the tool scope

Risks / anti-patterns

  • Using vector similarity alone for identifier-heavy tasks.
  • Passing too many low-quality chunks and assuming the model will sort them out.
  • Letting tool outputs enter the context without sanitization or relevance filtering.
  • Giving write-capable tools to workflows that only need read support.
  • Treating MCP connectivity as trust rather than as an integration mechanism that still needs policy.

Recommendations / operating rules

  • Start retrieval design with document and metadata quality, not only with the vector store.
  • Prefer hybrid retrieval for finance, ESG, and methodology work.
  • Rerank only where it materially improves downstream quality.
  • Keep tool scopes narrow and default to read-only access.
  • Preserve citations, chunk identifiers, and source versions wherever possible.

Domain-specific applications

  • ESG analytics: disclosure retrieval, taxonomy support, controversy evidence gathering, multilingual report analysis.
  • Index engineering: methodology lookup, corporate-actions disambiguation, point-in-time constituent review, exception packets.
  • Data engineering: runbook retrieval, schema lookup, lineage support, and controlled SQL assistance.

Evaluation / validation considerations

Evaluate retrieval and tool use separately:

  • recall and precision of retrieved evidence
  • citation quality
  • reranker gain
  • tool-call correctness
  • argument validity
  • unsafe-call rate
  • answer quality after retrieval versus without retrieval

If tool use quality is poor, switching embedding models will not fix it.

Troubleshooting / failure modes

  • If answers cite irrelevant passages, inspect chunking and reranking before prompt wording.
  • If exact-rule lookup fails, add lexical retrieval or metadata filters.
  • If the model calls the wrong tool, improve tool descriptions, routing logic, or permission scopes.
  • If injected content appears in the answer, sanitize retrieved and tool-returned content before it re-enters model context.

RAG, Retrieval, and Tool Use References

  • ChromaDB enrichment: Designing Large Language Model Applications.epub
  • ChromaDB enrichment: Raieli S. Building AI Agents.pdf
  • ChromaDB enrichment: Ultimate Agentic AI with AutoGen for Enterprise Automation.epub
  • Model Context Protocol | What is MCP?
  • OpenTelemetry | Semantic conventions for Generative AI events