Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Enrich embedding pipeline for better semantic search

未关闭
#252 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
go
领域
backend, search

调研方向

Start with core/chunking/serializer.go and trace the existing entity-upsert re-embedding flow. Then inspect SearchEntities and AssembleContext to understand ranking inputs and how embeddings-disabled paths behave. Done means properties and attached document content enrich entity search, freshness is applied in both ranking paths, and existing behavior degrades gracefully when embeddings are disabled.

由索引模型根据 Issue 内容生成。

描述

Context

Semantic search quality is limited by what goes into the embeddings. Today, the entity serializer only embeds URN, type, name, and description. Properties (column names, tags, owners), attached documents, and freshness signals are all ignored. This means:

  • Searching for a column name like "bounce_rate" won't find the table that has it
  • Searching for "incident" won't surface entities whose runbooks describe incidents
  • A freshly updated entity ranks the same as one untouched for a year

Scope

1. Embed entity properties and tags

The properties JSONB field often contains the most useful metadata — column names, schema details, owners, tags, labels. The entity serializer (core/chunking/serializer.go) should flatten and include relevant properties in the text sent to the embedding provider.

Example: a BigQuery table entity with properties: {columns: ["user_id", "session_duration", "bounce_rate"], owner: "analytics-team", tags: ["pii", "tier-1"]} should produce an embedding that understands "bounce_rate", "analytics-team", and "tier-1".

2. Cross-embed entity + document content

When a document is attached to an entity, the document's content should enrich the entity's embedding context. If a runbook for table:user_sessions mentions "incident", "SLA", and "late-arriving events", searching for those terms should boost that entity in semantic results.

Approach options:

  • At embedding time: When an entity is embedded, also pull its document content into the embedding context (heavier, richer)
  • At search time: When semantic search returns document chunks, propagate their scores to the parent entity (lighter, but less precise)
3. Freshness decay in ranking

Add a mild freshness boost to search and context assembly scoring. Entities with a recent updated_at get a small multiplier. This is not a popularity signal — it's an objective liveness indicator.

This applies to:

  • SearchEntities hybrid ranking (RRF score adjustment)
  • AssembleContext entity scoring (alongside intent weights)

Design Considerations

  • Property embedding should be selective — not all JSONB fields are useful. A configurable allowlist or heuristic (e.g., skip fields > 1000 chars) may be needed.
  • Cross-embedding creates a dependency: document upsert should trigger re-embedding of the parent entity. The pipeline already handles async re-embedding on entity upsert, so this is an extension of existing behavior.
  • Freshness decay should be gentle — a 1.1-1.2x multiplier for entities updated in the last 7 days, not a hard penalty for old entities. Old but relevant entities should still surface.
  • All changes should degrade gracefully when embeddings are disabled.

Related

  • #237 — Graph-aware ranking (complementary: centrality scoring alongside richer embeddings)
主要语言
Go
星标
72
派生
9
PR 合并指标
30 天内没有已合并 PR

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

raystack/compass 的其他 Issue

查看 raystack/compass 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。