Custom embeddings to improve encoded semantics
Semantic search is currently based on general-purpose embeddings which are trained on web text and are fundamentally bad at metadata semantics. They don't know that e.g. order_id in the orders table is semantically closer to order_id in order_items than to session_id, even though both are Id columns. OpenMetadata, however, has rich structural supervision that could be leveraged for training.
- Build a fine-tuned encoder (with ModernBERT-base or similar small model) trained using a multi-objective contrastive loss on signals already present in any OpenMetadata instance. Some examples of these signals, to name just a few:
- Lineage edges: if column A flows into column B via a transformation, they share semantic meaning; also columns in the same table can be soft positives; columns in tables N hops apart in the lineage graph are hard negatives.
- Glossary assignments: two columns tagged with the same glossary term are a positive pair; columns with disjoint term sets are negatives.
- The training is entirely self-supervised from the catalog itself (no need for manual labelling).
- The evaluation framework should be defined ad-hoc to assess semantic search quality vs baseline embeddings
Hi, I would like to work on this issue. Please assign it to me.
Hi @PubChimps,
I would like to work on this issue. Please assign it to me.
Hi @PubChimps , I’m very interested in taking up this issue and would love to contribute. After reading the detailed problem statement, I think this is a highly impactful improvement for OpenMetadata because semantic search over metadata requires understanding schema relationships, lineage context, and business meaning rather than relying only on generic web-trained embeddings.
The current limitation makes sense: general-purpose embeddings may capture language similarity, but they often miss metadata-specific semantics such as order_id being more related to order_items.order_id than unrelated identifier columns like session_id. Using the structural intelligence already present in OpenMetadata is a smart direction.
From my understanding, a strong solution could involve building a domain-adapted encoder (such as ModernBERT-base or a lightweight transformer) fine-tuned using self-supervised contrastive objectives generated directly from catalog signals. Some useful training signals I would explore include:
Lineage edges as strong positive pairs for semantic equivalence or transformation relationships. Columns within the same table as soft positives depending on context. Graph-distance based negatives using lineage hops for hard negative sampling. Glossary term matches as positives for shared business meaning. Disjoint glossary assignments as negatives. Potentially schema/table naming patterns and ownership/domain context as auxiliary signals.
For implementation, my approach would be:
Review the current semantic search / embedding pipeline in OpenMetadata. Design a reusable training-data generation pipeline from metadata signals already stored in the catalog. Fine-tune a compact encoder with multi-objective contrastive learning. Build an evaluation benchmark comparing baseline embeddings vs tuned embeddings on metadata retrieval relevance. Keep the solution modular so future models or signals can be added easily.
Hi everyone, thank you for your interest in the hackathon!
This is just an idea of something that could be submitted for it! Please feel free to submit something on this whether you are assigned or not, or submit something totally different! Whatever you think would showcase OpenMetadata and help our community the most!
@PubChimps Hi, I’ve addressed all the bot-reported issues on this PR and pushed the necessary fixes. Could you please apply safe to test? Thank you!
@PubChimps Hi, just following up on my PR. I’ve addressed all the bot-reported issues and pushed the necessary fixes a few days ago. Could you please look into my PR when you have a moment and apply safe to test so the checks can run? I’d really appreciate it. Thank you!
Hi @Yashsainani123, thank you for your pr, we are going reviewing hackathon submissions now!