26 COLUMN_NAME DATA_TYPE -------------------- -------------------- AGE NUMBER CAMPAIGN NUMBER CONS_CONF_IDX NUMBER CONS_PRICE_IDX NUMBER DURATION NUMBER EMP_VAR_RATE NUMBER EURIBOR3M NUMBER ID NUMBER NR_EMPLOYED NUMBER PDAYS NUMBER PREVIOUS NUMBER CONTACT VARCHAR2 CREDIT_DEFAULT VARCHAR2 DAY_OF_WEEK VARCHAR2 EDUCATION VARCHAR2 HOUSING VARCHAR2 JOB VARCHAR2 LOAN VARCHAR2 MARITAL VARCHAR2 MONTH VARCHAR2 POUTCOME VARCHAR2 Y VARCHAR2 -- 対象となる表 BANKテーブル SELECT column_name, data_type FROM user_tab_columns WHERE table_name = 'BANK' ORDER BY data_type, column_name;
29 SELECT id, vector_embedding(pcamod USING *) embedding FROM bank WHERE id=10000; ID EMBEDDING -------------- -------------------------------------------------- 10000 [-2.3551013972411354E+002,2.8160084506788273E+001, 5.2821278275005774E+001,-1.8960922352439308E-002, -2.5441143639048378E+000]
affiliates 30 CREATE TABLE pca_output AS (SELECT id, vector_embedding(pcamod USING *) embedding FROM bank); CREATE VECTOR INDEX my_ivf_idx ON pca_output(embedding) ORGANIZATION NEIGHBOR PARTITIONS DISTANCE COSINE WITH TARGET ACCURACY 95;
affiliates 35 set echo on set serveroutput on var query clob; var initial_retrieval_docs clob; exec :query := 'What are some interesting characteristics of the Jovian satellites?'; begin :initial_retrieval_docs := ' { "documents": [ "Jupiter boasts an impressive system of 95 known moons, including the four largest Galilean satellites.", "Jupiter's immense mass, 318 times that of Earth, significantly influences the orbits of other bodies in the Solar System.", "Io, one of Jupiter's Galilean moons, is the most volcanically active body in our solar system.", "The gas giant completes one orbit around the Sun in just under 12 years, traveling at an average speed of 13 kilometers per second.", "Jupiter's composition is similar to that of the Sun, and it could have become a brown dwarf if its mass had been 80 times greater." ] }'; end; /
affiliates 37 [ { "index" : "0", "score" : "0.059319142", "content" : "Jupiter boasts an impressive system of 95 known moons, including the four largest Galilean satellites." }, { "index" : "2", "score" : "0.04352814", "content" : "Io, one of Jupiter's Galilean moons, is the most volcanically active body in our solar system." }, { "index" : "4", "score" : "0.04138472", "content" : "Jupiter's composition is similar to that of the Sun, and it could have become a brown dwarf if its mass had been 80 times greater." } ]