quipu_search
Search a governed knowledge graph using semantic, keyword, or hybrid ranking to find relevant entities and context for agent queries.
Instructions
Semantic vector search (default), opt-in SQLite FTS5 keyword search, or configurable lexical/vector hybrid fusion. Keyword mode requires query text and an enabled, backfilled index; it needs no embedding provider. Ranked REST results are diagnostic candidates; native MCP renders admitted context only. Agent context uses context_results when insufficient_context is false under quipu-context/v1.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| via | No | Traverse only these predicate IRIs (replaces the default exclusions). | |
| mode | No | Keyword: literal terms and quoted phrases ranked by BM25 over labels, alt labels, descriptions/full bodies, literal attributes, type names and IRI local tokens. Requires [quipu.search] keyword=true. | semantic |
| alpha | No | Semantic weight. Hybrid alpha=1 preserves semantic results exactly, alpha=0 returns keyword results. | |
| decay | No | Per-hop multiplier in (0, 1] for decay mode (default 0.5). | |
| graph | No | Search one registered graph IRI, or all. Unknown IRIs are refused. Omitted scope uses the stored default (ALL for new stores, ROOT for existing stores), unless configuration overrides it. | |
| limit | No | Maximum results (default: 10) | |
| query | No | Natural language search query (auto-embedded when EmbeddingProvider is attached) | |
| rrf_k | No | Positive RRF constant; server default 60. | |
| anchor | No | Root the search on ONE entity (IRI, CURIE or exact label; ambiguity is refused, never guessed) and rank by hop distance from it. Requires [quipu.search] anchored = true on the server. | |
| fusion | No | Min-max score blend or weighted reciprocal rank fusion. | |
| graphs | No | Search the union of these registered graph IRIs. Mutually exclusive with graph/all_graphs. | |
| explain | No | Return score components, matched lexical fields, applied filters and highlighted snippets; anchored search also returns a shortest path. | |
| filters | No | Equivalent strict AST: {term:string}, {not:expr}, {and:[expr,expr]}, {or:[expr,expr]}. Mutually exclusive with structured_query. | |
| ranking | No | Content ranking demotes repository artifacts lacking explanatory content; semantic returns raw cosine order. | semantic |
| verbose | No | Return expanded full IRIs instead of default CURIE-compacted values. | |
| max_hops | No | Anchor neighbourhood radius (default 3, server cap 4). | |
| valid_at | No | Point-in-time for temporal filtering (ISO-8601) | |
| direction | No | Edge direction to traverse (default both). | |
| embedding | No | Pre-computed query embedding vector (f32 array). Takes precedence over query. | |
| group_ids | No | Optional: best-effort filter to entities from these provenance groups (episode-scoped label, NOT an isolation boundary; `/knot` facts are ungrouped and dropped from a group scope) | |
| all_graphs | No | Search ROOT and all registered named graphs, excluding metadata and configured search.exclude_graphs. New stores default to ALL; existing stores retain ROOT until explicitly broadened. Configuration overrides the stored default. | |
| anchor_mode | No | decay (default): score x decay^hops; sort: hops first; filter: only reachable results. | |
| entity_type | No | Optional: restrict to entities of this rdf:type IRI | |
| infer_types | No | Keyword mode only: type scope includes subclass inference when true; defaults false (asserted full-IRI types only). Type tokens are always asserted; response marks both choices. | |
| structured_query | No | Explicit boolean field/phrase/prefix candidate expression. Requires structured=true and SQLite. Candidate selection precedes ranking; default off. | |
| context_similarity_floor | No | Raw cosine floor for context admission only; ranking is unchanged. Exact subject/identifier and term coverage are also required. |