Make context useful to both kinds of reader
The aim is a shared place where people and AI agents can find information, understand its meaning, and trace it to a source. My work combines customized OpenMetadata, semantic search, AI features, and feeds from internal processes. The components below are a reference design for that problem.
A person needs useful search, ownership, and explanations. An agent needs bounded, structured context with references. Both need current authorization. The paired ClickHouse serving layer returns data; this layer supplies context. Finding a catalog entry does not grant permission to query its data or perform an action.
Keep source facts and generated meaning distinct
Connectors collect permitted technical metadata and selected process information. Normalize source identities, revisions, collection times, and ownership. Treat a failed feed as incomplete coverage, not a deletion signal. Preserve source links so consumers can inspect the original record.
OpenMetadata provides the catalog foundation. In this design, source facts, owner-reviewed definitions, and AI-generated suggestions remain distinguishable. Suggestions carry provenance and review state; regeneration must not silently replace a reviewed definition.
Combine exact lookup with semantic search
Exact identifiers, filters, and text search remain useful alongside semantic matching. A semantic result is a candidate that may be relevant, not proof that two business terms mean the same thing. Resolve ambiguity in definitions, units, and time ranges before presenting them as settled context.
Treat keyword and vector indexes as derived copies of approved catalog content. Link each indexed item to a source revision. Edits and deletions need an update path, and index lag must remain visible. Keep raw source access separate from discovery.
Enforce access throughout retrieval
Resolve the caller and scope the query before retrieving content. Apply policy to candidate selection and recheck current access before returning records, snippets, counts, or context to a model. A broad search service credential must not become the caller's permission.
The same contract applies to the human interface and agent APIs or MCP tools. Cache entries must respect caller scope and policy changes; a hit never skips authorization. Retrieved instructions are untrusted content and cannot expand tool permissions or override the caller's identity.
Return a small, traceable context response
Return the relevant definition, source reference, revision, freshness, and any unresolved conflict. Bound result count and response size. Give agents enough structure to cite sources and recognize missing information, instead of assembling an unexplained block of text.
Context retrieval can use maintained indexes and carefully scoped caches. Freshness and authorization still apply. If a source is unavailable, return an explicit partial result or fail the required operation; do not turn missing context into a fabricated answer.
Test meaning as well as retrieval speed
Evaluate known lookups, ambiguous questions, stale sources, changed permissions, and deleted records. Check whether the right source supports an answer and whether restricted context stays out of results and model inputs. Separate retrieval quality from the model's wording.
Extra indexes and AI enrichment add maintenance and review work. Begin with useful definitions and reliable source feeds, then add semantic retrieval where it helps. Measure response time under a stated workload; no performance target or internal operating result is implied here.