Enrich embedding pipeline for better semantic search
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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:
SearchEntitieshybrid ranking (RRF score adjustment)AssembleContextentity 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)
- Lingua principale
- Go
- Stelle
- 72
- Fork
- 9
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di raystack/compass
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
Tutte le issue di raystack/compass
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
bug group: validation priority: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
codecheckers/chekhov#51 ·
-
Creating worktree from an existing remote branch with a slash in it, has unexpected behaviour Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100