Skip to main content
Every value here resolves as defaults < config.json < .env < env < code (precedence), and can be set from code with the config API or cognee-cli config. The search and search.hybrid engine sections tune the standard retrievers; cognee hands them to SearchBuilder::with_tuning (Settings::search_tuning). Three Settings fields tune the search orchestrator itself, lowered by the same Settings::search_tuning:

Triplet retriever hub cap

Opt-in, and it changes results. Unset — the default — the triplet retriever loads the full depth-1 neighbourhood of its seeds, which is result-identical to loading the whole graph. A cap truncates hub fan-out: edges from a hub seed to its dropped neighbours never reach the ranking. Those edges would carry the non-seed distance penalty and rank below seed-to-seed edges, but they could still have made the top k.
Measured on a synthetic 100k corpus, a cap of 100 keeps a Jaccard similarity of 0.93–0.96 against the uncapped result set, with a worst query at 0.67; a cap of 200 keeps 0.92–0.93 but has a worst query at 0.18. The latency it buys is small on a uniform corpus and large on real hub-heavy text (one graph_completion search went from 332 ms to 76 ms). Treat it as a knob for a corpus with known hubs, measured on that corpus, not as a default. The cap bounds single-query graph search at depth 1 only: it has no effect with a neighborhood_depth above 1. Batch graph search (brute_force_triplet_search_batch, several queries at once) loads the whole graph, as Python’s batch mode does, and the cap does not apply to it — see Operations: search. PgGraphAdapter applies the cap in SQL; every other backend gets the same semantics from GraphDBTrait::get_neighborhood_scoped’s client-side default.

Hybrid retriever knobs

The HYBRID_COMPLETION search type (SearchType::HybridCompletion) accepts a set of per-request tuning knobs. These are library / orchestrator-only — typed Option<...> fields on SearchParams, populated from the snake_case JSON keys inside SearchRequest.retriever_specific_config. They have no env binding.
Not reachable from the CLI. cognee-cli search hardcodes retriever_specific_config: None, so these knobs are reachable only from a Rust caller that builds a SearchRequest with a populated retriever_specific_config, or from a language binding, which forwards its retrieverSpecificConfig search option verbatim (camelCase option name, snake_case knob keys inside).
When a knob is unset the retriever falls back through retriever_specific_config.<knob> → SearchRequest.top_k capped at 10 → the HybridRetriever::new constructor default (an explicit per-lane knob is never capped): TEMPORAL. TEMPORAL search (SearchType::Temporal) runs the same hybrid fetch, so it reads the same keys, with two differences. The fallback above applies to the HYBRID_COMPLETION lanes only: TEMPORAL’s top_k is SearchRequest.top_k (5 when unset) and is not capped at 10. And its chunk and entity lanes are sized by candidate_top_k and its fact lane by top_k, overriding chunks_top_k / entities_top_k / facts_top_k (text_summaries_top_k is ignored too: the summary lane follows the chunk lane); the time-window rerank then cuts the candidates back to top_k. A top_k of 0 or a candidate_top_k below top_k is rejected with InvalidInput, as in Python. Chunk-lane fusion. chunk_lane_fusion chooses how the DocumentChunk_text lane and the TextSummary_text lane are combined:
  • "relative_score" (default) normalises each lane’s similarities to [0, 1] against that lane’s own candidates and adds them, the summary lane weighted by summary_lane_weight (the chunk lane always weighs 1.0).
  • "reciprocal_rank" is Python’s rank_chunk_summary_pairs verbatim — RRF over ranks only.
The default diverges deliberately: RRF’s constant is calibrated for candidate lists of thousands, and on these short lists “present in both lanes” outranks “similar to the query”. Measured over 15 probe questions on Alice in Wonderland, relative-score fusion raised MRR in all four tested configurations (0.35–0.54 → 0.47–0.56). Set chunk_lane_fusion = "reciprocal_rank" to get the Python ranking back. Reserved (Phase 2, inert). These keys are parsed and stored but have no effect yet: use_truth_weight (default false), include_global_context_index (default false) and global_context_index_top_k (default 3). The HTTP-facing degradation notes live with the server’s search-router docs, which are not part of the cognee-rs repository.

Search history

When on, each search (CLI search / recall, bindings) records one query row and one result row after retrieval. They carry the searched dataset’s dataset_id when exactly one dataset was searched. Turn it off with cognee-cli config set log_search_history false or COGNEE_LOG_SEARCH_HISTORY=false. This setting is the only switch: the per-request SearchRequest::save_interaction (saveInteraction / save_interaction in the bindings) is removed, and CLI search, which used to skip history, now records it too.