Skip to main content
Every question asked of Seyn, whether in chat, through the API, or via MCP, runs through one query pipeline. Its design principle: no single search signal is trustworthy alone. Semantic similarity misses exact terms (“error 4032”, “Acme Corp”); keyword search misses paraphrase; structured filters miss everything they weren’t told about; and none of them know whether a rule actually holds in practice. Seyn runs them all and lets them vote. This is the part to be precise about: Seyn is not a vector database with a chat wrapper. Vector similarity is one signal among up to five, fused by rank, re-scored by a cross-encoder, and expanded through the entity and knowledge graph, over knowledge that was extracted, structured, and human-reviewed before any query ever touched it.

The pipeline

The signal set is adaptive: simple lookups don’t pay for expansion and inference, broad questions do. Everything runs inside one PostgreSQL instance: vectors, full-text, and relational filters in the same database as the source of truth. No search-index sync drift, and it’s a large part of why retrieval stays sub-second.

Degrades, never hard-fails

Querying degrades gracefully when optional dependencies are missing: A degraded answer beats an error page, and the explain output tells you when you’re getting one.

Choosing a strategy

The classifier picks automatically (auto), but API callers can force one:

Explain mode

Pass explain=true (or use the dashboard’s Query Explorer) and every result carries its attribution: which signals matched it, at what ranks, and what fusion and reranking did to its position. When someone asks “why did chat say that?”, the explain output is the answer. It’s the query-side analogue of the provenance chain.

Tuning heuristics

  • Start with auto. Force hybrid only when the classifier visibly picks wrong; check explain output first.
  • Queries with literal tokens (IDs, error codes, project names) lean on full-text matching. If such queries underperform, confirm the term actually appears in rule text rather than only in raw records.
  • topK defaults are conservative. Raise toward 20–50 for synthesis-style consumers (an agent summarising a topic); keep low for direct Q&A.
  • Filter by reviewStatus for production integrations. Querying ranks by relevance, not by whether a human approved the rule.

Common mistakes

Chat

The biggest consumer of this pipeline.

Knowledge

The substrate and indexes this pipeline searches.