Skip to content

Introduce provenance-aware, tiered RAG and MCP foundation - #2

Draft
vitrixLab wants to merge 16 commits into
mainfrom
agent/rag-mcp-audit-v2
Draft

Introduce provenance-aware, tiered RAG and MCP foundation#2
vitrixLab wants to merge 16 commits into
mainfrom
agent/rag-mcp-audit-v2

Conversation

@vitrixLab

@vitrixLab vitrixLab commented Aug 16, 2026

Copy link
Copy Markdown
Owner

Summary

This PR audits obsolete repository content and adds an initial provenance-aware RAG + MCP foundation, now revised around the skeptical architecture review.

What changed

  • Added audit/CONTENT-AUDIT.md to classify current, historical, template, legacy, and legal material.
  • Added data/SOURCES.md with source provenance, freshness, and tiered status rules.
  • Added a canonical JSON schema for verified ISO 3166-2:PH mappings.
  • Added an intentionally empty/unverified ISO dataset scaffold so the project does not invent mappings by converting PSGC identifiers.
  • Added a dependency-free lexical RAG baseline with provenance-aware, query-time trust filtering.
  • Historical retrieval is explicitly opt-in rather than permanently discarded.
  • Added an MCP server exposing search, policy, and schema tools/resources without making MCP the sole governance authority.
  • Added tests separating governance correctness from retrieval behavior.
  • Added ADR-0001 documenting the tiered governance decision.
  • Added architecture documentation describing automated freshness checks, trust tiers, and future vector-search evaluation.

Critical-thinking adjustments

The original design treated provenance too much as a hard ingestion gate. This revision uses a hybrid model:

  1. Hard exclusions happen at ingestion for content that must never enter the trusted corpus.
  2. Historical/unverified/deprecated material can be retained with provenance for auditability.
  3. current is the default query-time trust tier; historical context is opt-in and labeled.
  4. Policy logic is independent of MCP transport and can be reused by other interfaces or batch jobs.
  5. Freshness is treated as dynamic metadata. Production should automatically detect source changes and trigger re-verification rather than relying on manual classification alone.
  6. Lexical retrieval is explicitly a baseline. Governance tests, retrieval-quality tests, and answer/citation tests are evaluated separately.

Validation

  • Branch comparison against main is clean and contains only the intended RAG/MCP/audit files.
  • Added tests for current-only defaults, historical opt-in, provenance propagation, and HTML exclusion.
  • The ISO dataset remains intentionally unpopulated until mappings are independently verified.

Follow-up

Populate data/iso-3166-2-ph.json with independently verified ISO 3166-2:PH mappings, add automated source-freshness jobs, and benchmark a small embedding/vector backend against a labeled retrieval set before replacing the lexical baseline.

@vitrixLab vitrixLab changed the title Introduce provenance-aware RAG and MCP foundation Introduce provenance-aware, tiered RAG and MCP foundation Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant