Skip to content

Memory phase 2 - #65

Closed
heyjoja wants to merge 6 commits into
sqliteai:mainfrom
Astrolle:memory-phase-2
Closed

heyjoja wants to merge 6 commits into
sqliteai:mainfrom
Astrolle:memory-phase-2

Conversation

@heyjoja

@heyjoja heyjoja commented Dec 1, 2026

Copy link
Copy Markdown

No description provided.

heyjoja and others added 6 commits November 30, 2026 18:51
…mory

- packages/python is now astrolle-orbit: compiles the extension from src/ and
  ships it in the wheel; orbit.load(conn) loads it. Drops the upstream
  sqliteai-vector package, its binary downloader and its PyPI workflow.
- orbit.memory: add/recall/forget_conversation/missing_sources over an
  orbit_chunks table; the caller passes the embedding function. Recall strips
  the question's wrapper, skips the recent window and gates by score and
  shared content words.
- python -m orbit.eval: 102-question memory evaluation (es/en/pt) with the
  baseline; bench/bench_memory.py for search latency.
- CI workflow for the Python package.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- FTS5 index (orbit_chunks_fts, synced by triggers, rebuilt for older chunks)
  fused with the vector ranking by reciprocal rank fusion. Gate: similarity
  >= 0.6 alone or >= 0.3 with a full-text match.
- orbit.dates: es/en/pt dates in words to a range in the caller's timezone;
  recall(now=...) filters by it only for questions about the conversation.
- Each recalled chunk carries its pair (the other half of the exchange).
- orbit.eval: --noise, --min-score, --min-score-with-words; bench measures
  hybrid recall.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- vector_init(..., 'partition=<column>'): vector_full_scan can be restricted
  to one partition (5th argument in top-k mode, WHERE v.part = ? when
  streaming); its SELECT reads only those rows through the index. xBestIndex
  assigns argv by bound columns (idxNum flags); quantized scans refuse it.
- vector_init persists its options in _sqliteai_vector (only when they
  change) and scans in other connections load them; re-init on a registered
  table skips the schema queries. Invalid persisted rows are refused.
- normalized=1 also for FLOAT16/FLOATB16 (1 - dot on the DOT kernels).
- orbit.memory: FLOAT16 by default (FLOAT32 tables keep it), conversation
  as scan partition. One conversation of 100k chunks: ~45 ms -> <1 ms.
- No compiler warnings. C tests: 1482 -> 1511 (also with SIMD).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- orbit.facts: local filter (might_hold_fact) before any model call; learn()
  with the caller's llm (no provider in Orbit), facts under stable keys in the
  message's language; a new fact replaces an active one with its key only
  when both are about the same thing (similarity >= 0.45).
- recall() over every conversation (vectors + FTS5, same gate as memory);
  forget() deletes the fact, its older versions and the messages and answers
  it came from.
- orbit.eval --facts: across conversations 0/10 -> 9.3/10, changed facts
  3/6 -> 4.7/6 (3 runs); judge accepts listed translations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@heyjoja heyjoja closed this Dec 1, 2026
@heyjoja
heyjoja deleted the memory-phase-2 branch December 1, 2026 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant