MicroFish/backend
Dominik Seemann fb0ac4b5fe fix(graph): replace passthrough reranker with ollama-backed cross-encoder
Graphiti's default cross-encoder hard-codes the OpenAI gpt-4.1-nano model
and depends on OpenAI-specific logprobs/logit_bias, so the adapter has
been injecting a no-op _PassthroughReranker just to keep search code
paths working. Search results consumed by SearchResult, InsightForge,
Panorama, and Interview were therefore returned in Graphiti's RRF order
with no real reranking signal.

Add an Ollama-backed CrossEncoderClient that scores passages through a
local chat model via the OpenAI-compatible /v1 surface and wire it into
_get_graphiti() behind a RERANKER_PROVIDER switch (default: ollama).
Construction is side-effect-free and the rank() method never raises:
per-passage parse failures degrade to a deterministic low score, and a
whole-call failure falls back to passthrough order with a single WARNING
log so Flask keeps serving when Ollama is unreachable. Setting
RERANKER_PROVIDER=none preserves the legacy passthrough for CI and slim
containers that cannot pull the model.

Closes #39
2026-05-11 10:39:50 +00:00
..
app fix(graph): replace passthrough reranker with ollama-backed cross-encoder 2026-05-11 10:39:50 +00:00
scripts docs(i18n): translate chinese docstrings/comments in backend/scripts 2026-05-09 10:59:44 +00:00
tests feat(i18n): externalize chinese log and api response strings 2026-05-07 13:52:22 +00:00
pyproject.toml docs(i18n): translate readme tagline and rename chinese assets 2026-05-07 19:39:30 +00:00
requirements.txt fix(file_parser): handle non-UTF-8 encoded text files with automatic encoding detection 2026-01-22 18:28:37 +08:00
run.py docs(i18n): translate chinese docstrings/comments in backend root, api init, simulation_ipc, simulation_manager, zep_entity_reader 2026-05-07 14:49:20 +00:00
uv.lock feat: migrate knowledge graph from Zep Cloud to Graphiti + local Neo4j 2026-03-22 01:30:28 +05:30