v0.7.1
Fixed
- Embedding dimension mismatch broke RAG retrieval in v0.7.0. The re-embed migration rewrote all stored vectors at the configured dimension (1536), but the per-query, per-new-topic, per-fact, and per-artifact embedding calls were never updated to pass the new
Dimensionsfield — the OpenRouter server defaulted those to 3072. Cosine similarity returns 0 on length mismatch, so every vector search in prod returned zero topic / fact / people / artifact candidates, and the reranker was silently never invoked (gated on candidate count > 0). All 14 productionEmbeddingRequestcall sites now forwardcfg.Embedding.Dimensions, and a static test fails the build if a future call site forgets it.
Model upgrade release: Gemini 3.1 family + Embedding 2 Preview.
Changed
- Embedding model →
google/gemini-embedding-2-preview@ 1536 dimensions. First full re-embed of all existing vectors (topics, facts, people, artifacts) on startup — ~45 seconds one-time downtime, ~$0.04 in tokens on a prod-sized DB. Chosen after a benchmark on realreranker_logsdata that showed +60% relative Recall@5 overgemini-embedding-001, with 1536 specifically beating 768 / 3072 on Recall@20. See docs/architecture/embedding-storage.md for methodology and results. Task prefixes (task: search result | query: …) from the Gemini docs were tested and measurably hurt retrieval on our enricher-generated queries — not used. - Chat agent →
google/gemini-3.1-pro-preview-customtools. Drop-in API-compatible variant tuned to prefer registered custom functions over the built-in general tool. Same pricing and 1M context. - Default agent (splitter / enricher / merger / archivist base) →
google/gemini-3.1-flash-lite-preview, same for reranker and extractor. Smaller, faster, cheaper — sufficient for the classification-style tasks these agents perform. - Migration is forward-only. Vector spaces of v1 and v2 are incompatible, so rolling back requires restoring a pre-migration DB snapshot, which loses any messages written in the v0.7.0 window.
Added
embedding.dimensionsconfig option (YAML +LAPLACED_EMBEDDING_DIMENSIONSenv) — forwarded to OpenRouter as thedimensionsparameter.embedding_versioncolumn on topics, structured_facts, people, artifacts (migration 009). On startup the bot re-embeds any rows whose stored version differs from the configured one.cmd/embed-benchmark— reproducible retrieval-quality benchmark harness.
Fixed
- Cost fields in OpenRouter debug/info logs now print the USD value (
cost_usd=0.0123) instead of the raw Go pointer address.