Skip to main content
Selected workInformation Retrieval / Search Infrastructure

Kurai

From fragmented search results to useful knowledge.

Self-hosted web search for people and AI agents that queries a private SearXNG instance, fuses results with Reciprocal Rank Fusion and multi-signal relevance scoring, strips ads and trackers, and outputs clean Markdown.

StackGo / SearXNG / MCP
FocusReciprocal Rank Fusion, BM25 relevance, Content extraction, HTML-to-Markdown normalization
Author-provided description

The problem

Individual search engines disagree on ranking, wrap content in trackers and boilerplate navigation, and return noisy HTML that degrades both human reading and LLM context windows.

Approach

Kurai queries a private SearXNG instance, combines rankings via Reciprocal Rank Fusion alongside BM25, engine position, domain authority, and freshness signals, removes ads, trackers, and dead links, and converts pages into clean Markdown across a web UI, HTTP API, and MCP server.

Engineers, researchers, and AI agents needing private, self-hosted, clean-text web retrieval without third-party search API lock-in.

Search Relevance Lab

How does Reciprocal Rank Fusion combine three disagreeing search engines without arbitrary score normalization?

Simplified simulation
Uses synthetic datasets and standard RRF = sum(1 / (k + rank)). Does not execute live web search or claim to replicate Kurai internal BM25/freshness weights.
Engine A (Lexical)
  1. #1Top 10 AI Frameworks You Must Try Right Now (Sponsored)
  2. #2Reciprocal Rank Fusion Outperforms Condorcet and Individual Rank Systems
  3. #3Queue Theory & Backpressure in Event-Driven Pipelines
  4. #4In Search of an Understandable Consensus Algorithm
Engine B (Link Graph)
  1. #1In Search of an Understandable Consensus Algorithm
  2. #2Reciprocal Rank Fusion Outperforms Condorcet and Individual Rank Systems
  3. #3JSON-RPC Transport Design for Model Context Protocol Servers
  4. #4Queue Theory & Backpressure in Event-Driven Pipelines
Engine C (Freshness)
  1. #1JSON-RPC Transport Design for Model Context Protocol Servers
  2. #2Queue Theory & Backpressure in Event-Driven Pipelines
  3. #3Reciprocal Rank Fusion Outperforms Condorcet and Individual Rank Systems
Fused Ranking — RRF(d) = Σ 1 / (60 + rank)Absent documents contribute 0.0000 for that engine
01
Reciprocal Rank Fusion Outperforms Condorcet and Individual Rank Systems
A: #2 (+0.0161)B: #2 (+0.0161)C: #3 (+0.0159)
0.0481
02
Queue Theory & Backpressure in Event-Driven Pipelines
A: #3 (+0.0159)B: #4 (+0.0156)C: #2 (+0.0161)
0.0476
03
JSON-RPC Transport Design for Model Context Protocol Servers
A: absent (+0)B: #3 (+0.0159)C: #1 (+0.0164)
0.0323
04
In Search of an Understandable Consensus Algorithm
A: #4 (+0.0156)B: #1 (+0.0164)C: absent (+0)
0.0320
05
Top 10 AI Frameworks You Must Try Right Now (Sponsored)
A: #1 (+0.0164)B: absent (+0)C: absent (+0)
0.0164

Architecture & notes

Claims are labeled by evidence type. Details requiring direct source inspection are kept explicit.

Capabilities4
  • — Queries a private SearXNG instance for self-hosted retrieval.
  • — Fuses results using Reciprocal Rank Fusion and relevance signals including BM25, engine position, domain authority, and freshness.
  • — Removes advertisements, trackers, and dead links, converting web pages into clean Markdown.
  • — Accessible via web UI, HTTP API, and MCP server.
Design & implementation evidence4
Multi-engine rank fusion
Simplified simulation

Standard RRF aggregates reciprocal ranks across independent result lists so consensus documents surface above single-engine outliers.

Content sanitization pipeline
Conceptual illustration

Strips navigation chrome, ad containers, and tracking scripts before emitting structured Markdown suitable for LLM consumption.

Core implementation
Author-provided description

Built in Go, integrating with SearXNG and exposing an MCP interface.

Ranking formula scope
Simplified simulation

The Search Relevance Lab demonstrates standard RRF = sum(1 / (k + rank)) on synthetic datasets; it does not fabricate Kurai internal BM25 or freshness weights.

Scope & limitations2
  • — The embedded lab uses predefined synthetic rankings and HTML fixtures rather than executing live web searches.
  • — Standard RRF alone does not represent Kurai full multi-signal scoring pipeline.

Shared concerns: making ai agents reliable