[Hands-on] Build Semantic Search Inside Your Database Without an Embedding Pipeline
MongoDB Atlas 推出了由 Voyage AI 提供支援的 auto-embedding 功能,讓使用者無需建構外部 embedding pipelines 即可實現 semantic search。此整合省去了獨立 embedding 服務與同步層的需求,進而簡化了 AI stack。當文件更新時,系統會自動重新產生 embedding(re-embeds),確保 vector search 結果保持一致且最新。使用者可以直接在 Atlas UI 中透過設定啟用 automated embedding 的 vector search index 來進行配置。LLM precision formats 透過以數值細節換取較低的儲存空間需求,讓大型模型能夠在記憶體有限的硬體上運作。格式範圍從 training 時使用的高精度 FP32,到用於 inference 和 fine-tuning 的高度壓縮 4-bit 格式(如 NF4 和 INT4)。每種格式以不同方式平衡 exponent 和 mantissa bits,以在 overflow 風險與 rounding errors 之間取得取捨平衡。本文概述了 agentic systems 的 memory optimization 技術,強調 memory 是一項系統設計挑戰,而非底層模型的固有特性。文中介紹了五種特定的 memory 類型——Short-Term、Long-Term、Entity、Contextual 和 User——讓 agents 能夠在互動過程中維持狀態與 context。此內容為 AI Agents 速成課程的一部分,示範了使用 LangGraph 和 CrewAI 的實際實作。
閱讀原文 ↗目錄
在資料庫內建構 semantic search,無需 embedding pipeline
MongoDB Atlas 推出了由 Voyage AI 提供支援的 auto-embedding 功能,讓使用者無需建構外部 embedding pipelines 即可實現 semantic search。此整合省去了獨立 embedding 服務與同步層的需求,進而簡化了 AI stack。當文件更新時,系統會自動重新產生 embedding,確保 vector search 結果保持一致且最新。使用者可以直接在 Atlas UI 中透過設定啟用 automated embedding 的 vector search index 來進行配置。
- MongoDB Atlas 現在直接在其 vector search index 設定中支援 auto-embedding。
- Voyage AI 提供了在 MongoDB Atlas 平台內用於產生 embeddings 的模型。
- Auto-embedding 消除了資料庫與外部 embedding 服務之間手動同步的需求。
- 每當來源文件變更時,系統會自動更新 vector embeddings,以防止搜尋品質下降。
- 設定 semantic search 時,需要在 Atlas 建立 vector search index 的過程中選取「Automated Embedding」。
- MongoDB University 提供 AI Skill Badges 與 Credly 認證,用於掌握 vector search、RAG 與 agentic memory。
8 種 LLM precision formats
LLM precision formats 透過犧牲數值細節來降低記憶體需求,讓大型模型能夠在有限記憶體的硬體上運作。格式涵蓋從訓練時使用的高精度 FP32,到 inference 與 fine-tuning 使用的高度壓縮 4-bit 格式(如 NF4 和 INT4)。每種格式對 exponent 與 mantissa bits 的配置各有不同,以權衡 overflow 風險與 rounding errors。
- FP32 是標準的高精度格式,但每個 parameter 需要 4 bytes,這使得它對於消費級 GPUs 來說體積過大。
- TF32 是 Ampere 硬體上的內部 tensor core 格式,可在不減少記憶體用量的情況下加速運算。
- BF16 已成為 pre-training 的預設格式,因為其 exponent 範圍與 FP32 相符,能防止在 downcasting 過程中發生 overflow。
- FP16 提供比 BF16 更高的精度,但數值範圍有限,需要使用 loss scaling 來避免 gradients 變成無窮大 (infinity)。
- INT4 和 NF4 格式透過每個 weight 僅使用 4 bits,讓大型模型能夠在消費級硬體上運作,且通常品質損失極小。
- GPTQ 與 AWQ 是使用 calibration data 來最小化 4-bit quantization 過程中引入誤差的特定方法。
- NF4 是專為 QLoRA 設計的特化 4-bit 格式,其假設 weights 符合 normal distribution。
6 種適用於 Agentic systems 的 memory optimization 技術
本文概述了 agentic systems 的 memory optimization 技術,強調 memory 是一項系統設計挑戰,而非底層模型本身的特性。文中介紹了五種特定的 memory 類型——Short-Term、Long-Term、Entity、Contextual 與 User,讓 agents 能夠在跨互動中保持 state 與 context。此內容屬於 AI Agents 速成課程的一部分,示範如何使用 LangGraph 與 CrewAI 進行實際實作。
- Memory 是一個系統設計問題,需要對 context 進行明確的管理,包含 retrieval 與 storage。
- 沒有 memory 的 Agentic systems 是 stateless 的,無法召回來自先前 iterations 的資訊。
- 確立了五種不同的 memory 類型:Short-Term、Long-Term、Entity、Contextual 與 User Memory。
- LangGraph 被用來在 agentic workflows 中實作 production-grade 的 memory optimization 技術。
- CrewAI 被作為實作、自訂與重設 agent memory 設定的工具。
- Memory 讓 agents 具備 context-aware 能力,並能在 production 環境中實際落地應用。