⏺ Here's a comprehensive ASCII art table showing where all data items are stored across the system:
┌──────────────────────┬──────────────────────┬─────────────────┬───────────┬──────────────────┬────────────────┬──────────────────┐
│ Data Item │ PostgreSQL │ Neo4j │ FAISS │ JSONL │ NPZ │ Parquet │
│ │ (lnsp database) │ (graph store) │ (index) │ (text files) │ (numpy files) │ (columnar) │
├──────────────────────┼──────────────────────┼─────────────────┼───────────┼──────────────────┼────────────────┼──────────────────┤
│ CPE ID │ cpe_entry.cpe_id │ node.cpe_id │ - │ cpesh_active │ cpe_ids │ cpesh_segments │
│ │ cpe_vectors.cpe_id │ │ │ │ │ │
├──────────────────────┼──────────────────────┼─────────────────┼───────────┼──────────────────┼────────────────┼──────────────────┤
│ Concept Text │ cpe_entry. │ node.concept │ - │ cpesh_active │ concept_texts │ cpesh_segments │
│ │ concept_text │ │ │ │ │ │
├──────────────────────┼──────────────────────┼─────────────────┼───────────┼──────────────────┼────────────────┼──────────────────┤
│ Probe Question │ cpe_entry. │ node.probe │ - │ cpesh_active │ - │ cpesh_segments │
│ │ probe_question │ │ │ │ │ │
├──────────────────────┼──────────────────────┼─────────────────┼───────────┼──────────────────┼────────────────┼──────────────────┤
│ Expected Answer │ cpe_entry. │ node.expected │ - │ cpesh_active │ - │ cpesh_segments │
│ │ expected_answer │ │ │ │ │ │
├──────────────────────┼──────────────────────┼─────────────────┼───────────┼──────────────────┼────────────────┼──────────────────┤
│ Soft Negatives │ cpe_entry. │ - │ - │ cpesh_active │ - │ cpesh_segments │
│ (3 items) │ soft_negatives │ │ │ (JSON array) │ │ (JSON array) │
│ │ (JSONB array) │ │ │ │ │ │
├──────────────────────┼──────────────────────┼─────────────────┼───────────┼──────────────────┼────────────────┼──────────────────┤
│ Hard Negatives │ cpe_entry. │ - │ - │ cpesh_active │ - │ cpesh_segments │
│ (3 items) │ hard_negatives │ │ │ (JSON array) │ │ (JSON array) │
│ │ (JSONB array) │ │ │ │ │ │
├──────────────────────┼──────────────────────┼─────────────────┼───────────┼──────────────────┼────────────────┼──────────────────┤
│ TMD Bits │ cpe_entry.tmd_bits │ node.tmd_bits │ - │ cpesh_active │ - │ cpesh_segments │
│ (packed int) │ (INTEGER) │ │ │ │ │ │
├──────────────────────┼──────────────────────┼─────────────────┼───────────┼──────────────────┼────────────────┼──────────────────┤
│ TMD Dense │ cpe_vectors. │ - │ - │ - │ tmd_dense │ - │
│ (16D vector) │ tmd_dense │ │ │ │ (16, float32) │ │
│ │ (vector(16)) │ │ │ │ │ │
├──────────────────────┼──────────────────────┼─────────────────┼───────────┼──────────────────┼────────────────┼──────────────────┤
│ Domain Code │ cpe_entry. │ node.domain │ - │ cpesh_active │ - │ cpesh_segments │
│ │ domain_code │ │ │ │ │ │
├──────────────────────┼──────────────────────┼─────────────────┼───────────┼──────────────────┼────────────────┼──────────────────┤
│ Task Code │ cpe_entry. │ node.task │ - │ cpesh_active │ - │ cpesh_segments │
│ │ task_code │ │ │ │ │ │
├──────────────────────┼──────────────────────┼─────────────────┼───────────┼──────────────────┼────────────────┼──────────────────┤
│ Modifier Code │ cpe_entry. │ node.modifier │ - │ cpesh_active │ - │ cpesh_segments │
│ │ modifier_code │ │ │ │ │ │
├──────────────────────┼──────────────────────┼─────────────────┼───────────┼──────────────────┼────────────────┼──────────────────┤
│ Lane Index │ cpe_entry. │ - │ - │ cpesh_active │ lane_indices │ cpesh_segments │
│ │ lane_index │ │ │ │ (INTEGER) │ │
├──────────────────────┼──────────────────────┼─────────────────┼───────────┼──────────────────┼────────────────┼──────────────────┤
│ Concept Vector │ cpe_vectors. │ - │ - │ - │ concept_vecs │ - │
│ (768D GTR-T5) │ concept_vec │ │ │ │ (768, float32) │ │
│ │ (vector(768)) │ │ │ │ │ │
├──────────────────────┼──────────────────────┼─────────────────┼───────────┼──────────────────┼────────────────┼──────────────────┤
│ Question Vector │ cpe_vectors. │ - │ - │ - │ question_vecs │ - │
│ (768D GTR-T5) │ question_vec │ │ │ │ (768, float32) │ │
│ │ (vector(768)) │ │ │ │ │ │
├──────────────────────┼──────────────────────┼─────────────────┼───────────┼──────────────────┼────────────────┼──────────────────┤
│ Fused Vector │ cpe_vectors. │ - │ IVF_flat │ - │ vectors/fused │ - │
│ (784D: TMD+GTR) │ fused_vec │ │ (784D) │ │ (784, float32) │ │
│ │ (vector(784)) │ │ │ │ │ │
├──────────────────────┼──────────────────────┼─────────────────┼───────────┼──────────────────┼────────────────┼──────────────────┤
│ Fused Norm │ cpe_vectors. │ - │ - │ - │ - │ - │
│ │ fused_norm │ │ │ │ │ │
│ │ (REAL) │ │ │ │ │ │
├──────────────────────┼──────────────────────┼─────────────────┼───────────┼──────────────────┼────────────────┼──────────────────┤
│ Source Chunk │ cpe_entry. │ - │ - │ cpesh_active │ - │ cpesh_segments │
│ │ source_chunk │ │ │ │ │ │
├──────────────────────┼──────────────────────┼─────────────────┼───────────┼──────────────────┼────────────────┼──────────────────┤
│ Relations │ cpe_entry. │ edges/ │ - │ cpesh_active │ - │ cpesh_segments │
│ │ relations_text │ relationships │ │ (JSON array) │ │ │
│ │ (JSONB) │ │ │ │ │ │
├──────────────────────┼──────────────────────┼─────────────────┼───────────┼──────────────────┼────────────────┼──────────────────┤
│ Mission Text │ cpe_entry. │ - │ - │ cpesh_active │ - │ - │
│ │ mission_text │ │ │ │ │ │
├──────────────────────┼──────────────────────┼─────────────────┼───────────┼──────────────────┼────────────────┼──────────────────┤
│ Echo Score │ cpe_entry. │ - │ - │ cpesh_active │ - │ - │
│ │ echo_score │ │ │ │ │ │
├──────────────────────┼──────────────────────┼─────────────────┼───────────┼──────────────────┼────────────────┼──────────────────┤
│ Batch ID │ cpe_entry. │ - │ - │ - │ - │ - │
│ │ batch_id │ │ │ │ │ │
└──────────────────────┴──────────────────────┴─────────────────┴───────────┴──────────────────┴────────────────┴──────────────────┘
File Locations:
• PostgreSQL: localhost:5432/lnsp
• Neo4j: localhost:7687 (bolt), localhost:7474 (web)
• FAISS Index: artifacts/fw10k_ivf_flat_ip.index (when built)
• JSONL: artifacts/cpesh_active.jsonl
• NPZ: artifacts/fw10k_vectors_768.npz
• Parquet: artifacts/cpesh_segments/*.parquet
⏺ This table shows the complete data distribution across your LNSP Phase-4 system. Key observations:
1. PostgreSQL is the primary source of truth with complete CPESH and vector data
2. Neo4j stores graph-friendly concept data for relationship queries
3. FAISS only stores the fused vectors for fast similarity search
4. NPZ files serve as intermediate storage for batch vector operations
5. JSONL/Parquet provide backup and streaming capabilities
The 784D fused vector (16D TMD + 768D GTR-T5) is the key search vector, stored in PostgreSQL, FAISS, and NPZ files for different purposes.