Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

feat(adk): add vector memory support for psqlpy and PostgreSQL ADBC

Aperta
#728 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
42/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
postgresql, python
Ambito
backend, databases

Direzione di ricerca

Inizia dalle implementazioni di PsqlpyADKMemoryStore e AdbcADKMemoryStore e dal contratto di embedding condiviso di StoredMemory. Esamina i test unitari e i test di integrazione PostgreSQL esistenti, quindi verifica il binding dei parametri e il comportamento per PostgreSQL rispetto ai driver ADBC non supportati. Il lavoro è completato quando gli embedding nullable vengono persistiti e restituiti, l’ordinamento dei vicini più prossimi funziona, i backend non supportati restituiscono un errore chiaro e la documentazione delle capacità e i test coprono la matrice indicata.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

The psqlpy and ADBC ADK memory stores accept StoredMemory.embedding and an embedding search argument through the shared public contract, but currently ignore both.

  • PsqlpyADKMemoryStore creates no vector column, omits embeddings from inserts, and performs text-only searches.
  • AdbcADKMemoryStore is multi-dialect and reduced-scope; its PostgreSQL path likewise has no vector column or search branch and returns embedding=None.

This makes PostgreSQL vector-memory behavior inconsistent across SQLSpec adapters and silently discards caller data.

Proposed behavior

Add PostgreSQL ADK vector-memory support for psqlpy and the PostgreSQL ADBC backend while preserving reduced-scope behavior for non-PostgreSQL ADBC drivers.

  • Persist nullable embeddings in owner and non-owner insert paths.
  • Add vector-only nearest-neighbor search with null embeddings excluded.
  • Use codec-independent parameter binding. Psqlpy supports explicit SQL casts; determine and document the portable ADBC PostgreSQL binding representation rather than assuming native pgvector codecs.
  • Return stored embeddings when the backend exposes them.
  • Do not silently ignore a supplied embedding on an unsupported ADBC backend; fail clearly or expose an explicit capability boundary.
  • Decide whether pg_textsearch BM25/hybrid search should reach parity in the same implementation or remain a separately declared capability.

Acceptance criteria

  • Unit tests cover SQL, nullable embeddings, owner-column parameter ordering, and vector query operands for both adapters.
  • PostgreSQL integrations insert via the public memory-store API and assert nearest-neighbor IDs/order with client pgvector codecs disabled.
  • ADBC tests cover PostgreSQL vector decoding and unsupported non-PostgreSQL behavior.
  • Adapter documentation and the ADK backend matrix accurately describe vector and BM25 capabilities.
  • No public method signatures or shared record types change.

Related: #726, #727

Lingua principale
Python
Stelle
102
Fork
9
Merge medio
16h 30m
PR unite (30g)
77

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di litestar-org/sqlspec

Tutte le issue di litestar-org/sqlspec

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.