Wikantik features a high-precision, multi-stage retrieval pipeline designed to serve both humans and AI agents. It goes beyond simple keyword matching by fusing lexical, semantic, and relational data.
When a query is submitted (via /api/search or the retrieve_context tool), it undergoes four distinct phases:
The first stage uses Apache Lucene to perform a classic BM25 search.
com.wikantik.search.subsystem.luceneIn parallel, the query is converted into a high-dimensional vector.
com.wikantik.search.hybrid.DenseRetrievernomic-embed-text) and compared against chunked content in the content_chunk_embeddings table.The results from BM25 and Dense retrieval are combined using Reciprocal Rank Fusion (RRF).
KG reranking is off by default (boost=0, never wired into production; shelved 2026-06-16 after a measured zero-lift ceiling spike). See KnowledgeGraphRerank.
Wikantik's dense search depends on a chunk-and-embed pipeline:
EmbeddingClient (communicating with Ollama, OpenAI, or TEI).Search quality is measured by a standalone utility in the wikantik-tools module.
bin/search-eval (backed by ExperimentEvaluator.java).eval/ (e.g., grand-finale.txt) to ensure retrieval performance never regresses during refactoring.See Also: