0.8.8 completes the 0.8.7 roadmap with two remaining features and an important bug fix. It adds optional LLM-based reranking for improved relevance on complex queries, a source_episode field for grouping thoughts by conversational context, and fixes a cross-chain relation traversal bug that could cause lookup failures.
Thoughts can now carry a source_episode label — an optional identifier for
the conversational or contextual origin of a thought. This groups thoughts from the same
conversation turn, debugging session, planning meeting, or reasoning chain.
Useful for:
Set via source_episode on append. Filter in queries with
with_source_episode(). Like entity_type, this field is not
included in the thought hash — backward compatible with all existing chains.
Ranked search now supports an optional LLM-based reranking pass. When enabled, the top candidates from the existing BM25+vector+graph pipeline are sent to an LLM (OpenAI or Anthropic) which re-ranks them by relevance to the query. This helps most on complex multi-hop questions where the lexical and vector signals disagree on the best results.
| Parameter | Type | Default | Description |
|---|---|---|---|
llm_rerank | bool | false | Enable LLM reranking |
llm_model | string | — | Model to use (e.g. "gpt-4", "claude-3-sonnet") |
llm_rerank_top_k | int | 20 | How many candidates to send to LLM |
Works with mentisdb_ranked_search (MCP), POST /v1/search/rerank (REST),
and the Rust RankedSearchQuery::with_llm_reranking(model, top_k) API.
A bug in resolve_context_by_id caused cross-chain relations (those with
chain_key set) to be incorrectly processed during local traversal, potentially
causing lookup failures. Fixed to properly skip cross-chain targets. The underlying
cross-chain graph expansion via BranchesFrom was already working correctly.
Added 14 new regression tests covering the query pipeline: tags_any filter,
type filter, empty results, text search case-insensitivity, importance threshold,
entity_type filtering, cross-chain traversal, and LLM reranking behavior.
cargo install mentisdb --force