Add notebook 12: Hindsight on Oracle 23ai#42
Open
DK09876 wants to merge 1 commit into
Open
Conversation
A cookbook walkthrough that drives a Hindsight server backed by Oracle Database 23ai via the standard hindsight-client: retain, recall (4-way parallel retrieval), reflect, mental models, directives, and temporal recall. Each section drops into raw SQL (python-oracledb) to show memories living in Oracle's native VECTOR type (HNSW index + VECTOR_DISTANCE), Oracle Text (CONTAINS), and the relational entity graph. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A new cookbook notebook,
notebooks/12-oracle-backend.ipynb, showing Hindsight running on Oracle Database 23ai — memory stored and searched natively in Oracle (aVECTORcolumn with an HNSW index, Oracle Text for keyword search, and the entity graph in ordinary tables — no separate vector database).Written for an audience new to Hindsight, using a customer-support example (Acme Corp). It walks through each feature and, for this Oracle-focused audience, shows the raw SQL underneath each step:
retain— teach the agent facts in plain English; LLM extraction intoMEMORY_UNITS(nativeVECTOR) +ENTITIES.recall's lenses, each shown as native Oracle SQL:VECTOR_DISTANCE(... COSINE)+ HNSWCONTAINS()event_date)recall— one fused call (RRF + reranking) returning the memories relevant to a specific question.reflect— the payoff: it reasons across three separately-logged incidents and surfaces a root cause (lock contention on theORDERStable during overnight jobs) that appears in no single memory, then recommends a fix.VECTOR.Notes
HINDSIGHT_API_DATABASE_BACKEND=oracle+ a connection URL) and uses local sentence-transformers embeddings, so it's self-contained against a local Oracle 23ai.🤖 Generated with Claude Code