Skip to main content

Module query

Module query 

Source
Expand description

Hybrid query — combines semantic search, graph expansion, and episode search.

Pipeline:

  1. Semantic phase: HNSW KNN with limit * 2 to gather candidates
  2. Graph phase: 1-hop expansion from top-N results, scored as parent_score * 0.5
  3. Merge + deduplicate by entity ID, keeping highest score
  4. Episode search (optional) — separate KNN on episodes

Functions§

pipeline_entities
Get all pipeline entities for a given stage, optionally filtered by status.
pipeline_flow
Trace the lineage of a pipeline entity through relationship chains.
pipeline_stats
Get pipeline stats: counts by (stage, status), stale entities.
query
Run a hybrid query: semantic search + graph expansion + optional episode search.