Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

From JSON to Vector Search: What I Learned Storing Structured User Data for AI

说明与用途

文章说明了 SpendWise 如何将结构化用户数据集成到向量数据库中进行语义搜索,同时保留 SQL 进行精确查询。

问题

How to make structured user data retrievable and useful for an AI system during user interactions.

结果

By separating structured storage from semantic search, SpendWise can retrieve relevant user context efficiently, improving AI answer relevance while keeping deterministic queries in SQL.

工作流

  • Collect structured user data during onboarding
  • Store raw JSON in PostgreSQL as source of truth
  • Convert relevant fields into natural‑language summaries
  • Generate embeddings with an embedding model
  • Index embeddings in a vector database with metadata
  • When a user asks a question, determine if it requires semantic similarity or exact match
  • If semantic, query vector database for relevant context
  • If exact or range, query PostgreSQL via SQL
  • Feed retrieved context to the LLM for response

证据

"The AI might need context such as: ..."

来源

"A vector database doesn’t magically understand JSON."

来源

"If I need an exact value: What is my monthly income? A structured database is perfect."

来源

  • 记录日期: 2026-10-06T19:55:51.778Z