惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Hackread – Cybersecurity News, Data Breaches, AI and More
U
Unit 42
Vercel News
Vercel News
Martin Fowler
Martin Fowler
云风的 BLOG
云风的 BLOG
爱范儿
爱范儿
MongoDB | Blog
MongoDB | Blog
J
Java Code Geeks
F
Fortinet All Blogs
MyScale Blog
MyScale Blog
C
Check Point Blog
N
Netflix TechBlog - Medium
Microsoft Azure Blog
Microsoft Azure Blog
aimingoo的专栏
aimingoo的专栏
博客园_首页
WordPress大学
WordPress大学
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
IT之家
IT之家
Last Week in AI
Last Week in AI
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
Jina AI
Jina AI
V
Visual Studio Blog
小众软件
小众软件

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
RAG - Hybrid search and RAG pipeline using FAISS DB
Ramya Perumal · 2026-06-01 · via DEV Community

Ramya Perumal

Hybrid Search

Hybrid search is a combination of dense embeddings and sparse embeddings.

Dense embeddings focus on semantic meaning, while sparse embeddings focus on exact keyword matching. By combining both approaches, hybrid search improves retrieval accuracy and relevance.

OpenSearch is commonly used as a search engine for:

  • Log analysis
  • Observability and monitoring

One of the key features of OpenSearch is hybrid search, which combines:

  • Vector search (dense retrieval)
  • BM25-based search (sparse retrieval)

BM25 internally uses concepts such as:

  • TF (Term Frequency)
  • IDF (Inverse Document Frequency)

This allows OpenSearch to retrieve documents based on both semantic meaning and exact keyword matches.

RAG Cycle

A Retrieval-Augmented Generation (RAG) system consists of the following stages:

1. Document Ingestion

Documents are split into chunks using a chunking strategy.

2. Embedding Generation

Each chunk is converted into an embedding vector using an embedding model.

3. Storage

The generated vectors are stored in a vector database.

4. Retrieval

When a user submits a query:

  • The query is converted into an embedding vector
  • Similar documents are retrieved from the vector database

5. Augmentation

The Augmentor combines:

  • User query
  • Retrieved documents/chunks
  • Prompt instructions

This combined context is then sent to the LLM.

  1. Generation

The LLM processes the augmented context and generates a human-readable response.

RAG Flow

Documents

Chunking

Embeddings

Vector Database

User Query

Retrieval

Augmentation
(Query + Retrieved Documents + Instructions)

LLM

Human Readable Response

FAISS

FAISS (Facebook AI Similarity Search) is an open-source library used for efficient vector similarity search.

FAISS is commonly used to:

  • Store vector indexes locally
  • Perform similarity search efficiently
  • Build small to medium-scale RAG applications

Advantages

  • Fast similarity search
  • Open source
  • Easy to set up
  • Works well for local development and prototyping

Limitations

FAISS primarily stores indexes in memory or local files. Because of this:

  • It is not a full-fledged vector database
  • Managing very large datasets becomes challenging
  • Continuous streaming and real-time updates are more difficult compared to dedicated vector databases

When to Use FAISS

FAISS is a good choice when:

  • Building proof-of-concept projects
  • Developing small to medium-sized RAG applications
  • Running local experiments

When to Consider a Vector Database

For large-scale applications that require:

  • Billions of vectors
  • Real-time updates
  • Continuous data ingestion