今日已更新 84 条资讯 | 累计 37333 条内容
关于我们

标签:#embeddings

找到 5 篇相关文章

AI 资讯

Why I Chose PDF RAG Chunking and Metadata for Catalog Semantic Search

Short answer: for semantic search over messy B2B catalog PDFs, I would spend the latency budget during ingestion, preserve page-level evidence, and keep the query path to one embedding plus one vector search; if a catalog must become searchable immediately after every upload, I would choose simpler deterministic chunks and defer enrichment. The decisive constraint is not the PDF parser or the language of the upload service. It is the quality-versus-latency boundary: descriptions often separate a product name, dimensions, compatibility notes, and exclusions across headings or pages, while a buyer expects one coherent result. A fast pipeline that loses those relationships produces plausible but unauditable answers. A sophisticated pipeline that blocks publication for too long fails a different operational requirement. For a Node.js RAG service, I treat the upload worker, embedding adapter, and Postgres repository as replaceable components. The durable contract is the evidence record. Each record needs a stable document version, a stable chunk identity, normalized text, page bounds, catalog identifiers, and the embedding configuration that produced its vector. That is the smallest design I trust for retries, reconciliation, and citations. How should Node.js RAG handle PDF upload chunking metadata and citations? The Node.js boundary should accept an upload, hash the original bytes, write an immutable document version, and enqueue ingestion under an idempotency key derived from the tenant, catalog, and file hash. Parsing and embedding can happen asynchronously. Search should read only a version whose ingestion status was committed as complete; otherwise a retry can expose half a catalog, which is especially awkward when two chunks describe the same SKU differently. Chunking comes after extraction, not during transport. Keep page boundaries from the parser, normalize repeated headers and whitespace without rewriting the source, then group adjacent blocks around product st

2026-08-13 原文 →
AI 资讯

Ask-Docs Architecture: Semantic Embeddings or Keyword Search for a SaaS Help Center?

Short answer: for an ask-your-docs feature in a multi-tenant SaaS help center, start with embeddings over document chunks, retain keyword search for exact identifiers, and add reranking only when retrieval evaluation shows that the first-stage ordering is weak. The architecture is simple: ingest tenant-scoped chunks, embed them, store the vectors in a managed index, retrieve a small candidate set, and give only those matches to the answer model. The important marketplace constraint is less glamorous: every retrieval and model call must carry a tenant identifier into metering, or the team will know the total bill while remaining unable to explain which storefront created it. Don't begin with a vendor. Begin with the miss you can tolerate. How should a SaaS help center combine semantic search, embeddings, and keyword search? Semantic retrieval handles the normal language mismatch between a customer's question and the documentation. A user may ask how to “change the shop owner,” while the source chunk says “transfer account administration.” Keyword matching sees different tokens; embeddings map both query and chunks into vectors and can retrieve text with related meaning. That is the decisive reason to use embeddings for support questions, not fashion and not an assumption that vectors make every search problem better. Keyword search still earns a narrow, valuable lane. Error codes, plan names, API fields, invoice identifiers, and product-specific phrases often need literal matching. PAYMENT_1042 is not a semantic concept that should be softened into something approximately related. For a beginner implementation, run vector retrieval as the default and merge an exact-match result when the query contains one of those identifiers; don't build a many-stage ranking system before the corpus supplies evidence that you need one. Chunk boundaries matter because retrieval returns chunks, not abstract documents. Split by meaningful document structure, retain the page title and s

2026-08-12 原文 →
AI 资讯

What Are Vector Embeddings? (And Why Your Spotify Wrapped Knows You Too Well)

What Are Vector Embeddings? (And Why Your Spotify Wrapped Knows You Too Well) Imagine a postal worker who never learned to read. Not a single word. Can't tell an A from a Z, wouldn't recognize their own name on a birthday card. And yet, this worker has memorized the precise physical location of every house in an infinite city. They navigate by pure spatial memory, knowing exactly which homes sit in the same cul-de-sac, which ones are clear across town, and which are practically next-door neighbors. They've never read a street name or house number in their life, but ask them which residences are similar and they'll tell you instantly based on coordinates alone. This is how vector embeddings work. An embedding is a representation of data (a word, a song, an image, anything) as a list of numbers that captures its relationships to other data. Your Spotify playlist, that photo of your dog, the word "pizza," they all get converted into coordinates in a vast mathematical space. The system doesn't "understand" content the way you do. It just knows where everything sits and can measure distances between points. Close together means similar, far apart means different. How the Worker Learned the Territory The worker didn't start with this comprehensive mental map. They built it gradually by walking millions of routes and noticing what appeared together. Which houses had mail delivered on Tuesdays. Which residents waved to each other. Which blocks had similar holiday decorations. Over time, patterns emerged, and the worker positioned each house based on these observed relationships. The AI does the same. It processes massive amounts of examples and notices what appears in similar contexts. Words that show up near the same other words get placed close together in the coordinate system. "King" and "queen" both appear frequently alongside "royalty," "throne," "crown," and "castle" in text, so their coordinates land in the same neighborhood. "Dog" and "puppy" show up in similar sen

2026-07-30 原文 →
AI 资讯

How Vector Search Actually Works: IVF and HNSW

Every system that does "semantic" anything — RAG pipelines, recommendation engines, image search, dedup — boils down to one operation: given this vector, find the closest ones out of millions. The vectors are embeddings, a few hundred to a couple thousand numbers each, and "closest" means closest in meaning. You'd assume the database either scans all of them (slow but correct) or uses some clever tree to jump straight to the answer. It does neither. Instead it deliberately settles for the approximately closest vectors — and that compromise is the entire reason vector search is fast enough to exist. Two algorithms do almost all the heavy lifting in practice, in pgvector, Qdrant, FAISS, and the rest: IVF and HNSW . Here's what they're actually doing under the hood, and how to choose between them. Why "exact" is off the table The natural objection is: why approximate? Just find the real nearest neighbor. In two or three dimensions you could — a k-d tree or similar structure prunes away big regions of space and finds the true closest point quickly. The trouble is that embeddings live in hundreds of dimensions, and high-dimensional space is deeply weird. It's called the curse of dimensionality . As dimensions grow, the distance to your nearest point and the distance to your farthest point drift toward being almost the same. Formally, the contrast (d_max − d_min) / d_min shrinks toward zero. When everything is roughly equidistant from everything else, a tree can't confidently say "skip this whole branch, it's too far" — the bounding regions all overlap, every branch looks plausible, and the search degrades into checking nearly everything. Exact indexes quietly collapse back into brute force. So we change the question. Instead of "prove you found the nearest," we ask "quickly find something very probably among the nearest." That's approximate nearest neighbor (ANN) search, and it swaps a guarantee for speed. The quality knob becomes recall : of the true top-k neighbors, wh

2026-07-10 原文 →
AI 资讯

Paper Reading Notes: [JEPA]

[Paper Notes] JEPA: Self-Supervised Learning from Images with a Joint-Embedding Predictive Architecture 🔗 TL;DR: JEPA learns a a generalized semantic representation with less data pairs by predicting missing information in the embedding space , which helps it disregard unnecessary noisy from input(pixel)-level details and learns at a higher abstraction level with good semantic generalization. 1. Innovation & Significance The Bottleneck: Image-text data pair labels are hard to find Pixel level pre-training paired & data augmentation are strongly biased towards trained data distribution, hard to determine proper generalization and level of abstraction. JEA's (Joint Embedding Architecture) collapse probelm: encoder & decoder attempts to cheat by always landing on trivial constant when predicting itself (reconstruction) and gets away with an easy Error=0. The Solution: > Chain-of-thought ⭕ Mask pre-training to reduce data & generalize↓❌ Bad/lower semantic representation without semantic target, could be learning noisy local pixel correlation↓⭕ Learn at the embedding level to omit pixel input and generalize⭕ Adds context encoder & positional encoding to inject context and force model to pick up image inherent structure from reconstructing multiple masked patches with one target.↓❌ JEAs wants to cheat: if I always map all pixels to a constant for both the predictor and end target encoder then the reconstruction error is always collapsed to zero! Hehe~ ↓ ⭕ EMA (Exponential moving avg.): Update target encoder parameters from the EMA of context encoders. This 'delays' the target encoder to prevent collapsing (a trick from the BYOL paper[2020], proven essential to training JEAs with ViT). 2. Model & High-Level Intuitions 2.1 Model Architecture Input: randomly samples block masks from original image within certain aspect ratio changes, and apply mask for context image 2.1.2 Context Context Encoder: ViT encodes context image to embedding SxS_x S x ​ Mask Token : an [1,D] random

2026-06-01 原文 →