[Feature]: Native Oracle AI Database 26ai KnowledgeStore backend (OracleKnowledgeStore) for Knowledge Banks

Aperta
#6,844 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à
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
12/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
postgresql, python, sql
Ambito
backend, databases

Direzione di ricerca

Start at load_knowledge_store, which currently hardcodes PostgresKnowledgeStore, and read that store alongside the KnowledgeService and OperationValidator contracts it must satisfy. The issue names the Oracle tables (kb_documents, kb_passages, kb_passage_vectors, staged variants) and the CTXSYS.CONTEXT index, but the reference implementation lives in an out-of-tree fork, so the first step is locating the Postgres store and the bank/MCP routes to see what parity means. Done means dialect dispatch in load_knowledge_store plus an Oracle store passing the existing Knowledge Bank and /mcp/kb/{bank_id}/ tests; this is a design-scale port requiring Oracle 26ai familiarity.

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

Descrizione

core
Use Case

We run self-hosted Hindsight against Oracle AI Database 26ai / Autonomous AI Database (23.26.4.1.0) and use Knowledge Banks (/v1/default/knowledge-banks/* and /mcp/kb/{bank_id}/) alongside Memory Banks in production and CI.

Problem Statement

Knowledge Banks are now enabled by default on main (#6676), and the bank/MCP surface (#6791, #6801) assumes load_knowledge_store can serve every configured database backend. However, load_knowledge_store currently hardcodes PostgresKnowledgeStore, which blocks Oracle AI Database 26ai deployments from using Knowledge Banks without maintaining an out-of-tree fork.

How This Feature Would Help
  • Backend parity out of the box: Allows Oracle 26ai deployments to use Knowledge Banks, /v1/default/knowledge-banks/{bank_id}/operations*, and /mcp/kb/{bank_id}/ with the same KnowledgeService and OperationValidator contracts as PostgreSQL.
  • Native Oracle 26ai search: Uses native VECTOR distance (FETCH EXACT FIRST ... ROWS ONLY), Oracle Text (CTXSYS.CONTEXT / CONTAINS), and RRF fusion — notably avoiding shared HNSW post-filtering recall loss (#6731) because each bank's vector search is exact-scoped by bank_id.
  • Safe UUID-shaped string binding: Uses OracleLiteralStr for UUID-shaped bank_id and document_id parameters so Oracle thin-driver UUID-to-RAW(16) coercion does not break VARCHAR2 keys.
Proposed Implementation & Validation Evidence

In our Oracle 26ai fork (rodrigoedu94-png/hindsight), we have implemented and live-tested OracleKnowledgeStore (kb_documents, kb_passages, kb_passage_vectors, kb_staged_passages, kb_staged_passage_vectors + CTXSYS.CONTEXT index) against Oracle 26ai 23.26.4.1.0, including:

  • Conditional JOIN kb_documents optimization (#6747) when document-level filters are active
  • Deterministic (document_id, idx) tie-breaking (#6697)
  • Full validation of #6731 (small bank next to a 3,000-row big bank with DBMS_XPLAN.DISPLAY_CURSOR ALLSTATS LAST), #6791, #6801, and #6815.

If maintainers are open to it, we can prepare a clean upstream PR adding OracleKnowledgeStore and dialect dispatch in load_knowledge_store (mirroring #6772 for SQL/PGQ).

Lingua principale
Python
Stelle
45.2k
Fork
5.9k
Merge medio
6h 18m
PR unite (30g)
354

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 vectorize-io/hindsight

Tutte le issue di vectorize-io/hindsight

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.