Vector RAG finds the passage that looks like your question. It can miss an answer that needs two passages. Oracle's example: "Who is the spouse of the author of Young Man Luther?" No single text chunk holds that. It takes two hops, book to author and author to spouse. DBMS_AI_GRAPHRAG, in Release Update 23.26.4 of Oracle AI Database 26ai, is built for this.
What to know
CREATE_KNOWLEDGE_GRAPHuses an LLM to extract entities and relationships from a text column, then builds the graph, embeddings and indexes.QUERY_KNOWLEDGE_GRAPHsearches by VECTOR, GRAPH or HYBRID. HYBRID is the default and merges results with Reciprocal Rank Fusion (a standard way to merge ranked lists).n_hopssets how far GRAPH and HYBRID search travel: 1 to 5, default 3.generate_answer => TRUEadds a generated answer. The default, FALSE, returns only the context, for your own agent to use.dml_maintenance => TRUEupdates the graph asynchronously as the table changes. Tables only: for views it must stay FALSE, the default.
Test it on the questions RAG gets wrong
My take: when an answer depends on how facts relate, better retrieval of single paragraphs won't fix it. Source: DBMS_AI_GRAPHRAG.
Get the Oracle + AI digest
One email when a new tested guide, template or APEX release note lands — English or Arabic. No spam; unsubscribe anytime.