๐Ÿง Stalecollected in 14h

Optimizing Hybrid Search with Tokenization and Accent Folding

Optimizing Hybrid Search with Tokenization and Accent Folding
PostLinkedIn
๐Ÿง Read original on Weaviate Blog

๐Ÿ’กLearn how to improve your RAG search accuracy using Weaviate's new tokenization and accent folding features.

โšก 30-Second TL;DR

What Changed

Introduced accent folding to normalize text for better search matching

Why It Matters

These improvements allow developers to build more accurate and language-agnostic search systems. By fine-tuning tokenization, practitioners can significantly reduce noise in retrieval-augmented generation (RAG) pipelines.

What To Do Next

Test your current search queries against the /v1/tokenize endpoint to verify if accent folding and custom stopwords improve your retrieval precision.

Who should care:Developers & AI Engineers

Key Points

  • โ€ขIntroduced accent folding to normalize text for better search matching
  • โ€ขAdded support for custom stopwords to refine search relevance
  • โ€ขExposed text analysis capabilities via the /v1/tokenize API endpoint
  • โ€ขEnhanced BM25 performance for multilingual search applications

๐Ÿง  Deep Insight

Web-grounded analysis with 8 cited sources.

๐Ÿ”‘ Enhanced Key Takeaways

  • โ€ขThe new text analysis features, including accent folding and custom stopwords, were released as part of Weaviate v1.37, which also introduced other significant capabilities like a Model Context Protocol (MCP) Server for AI agent integration, Diversity Search with MMR, and Query Profiling.
  • โ€ขThe /v1/tokenize endpoint allows developers to test different tokenizer and analyzer configurations on arbitrary text before committing them to a schema, providing transparency and aiding in the tuning of text analysis.
  • โ€ขCustom stopword presets can be defined per collection and assigned to individual text properties, enabling tailored multilingual configurations without requiring reindexing when stopword settings are changed, as stopwords are filtered at query time.
  • โ€ขWeaviate's hybrid search leverages the BM25F algorithm, an extension of BM25 that supports multiple weighted fields, allowing different property weights in ranking calculations for more accurate results.
๐Ÿ“Š Competitor Analysisโ–ธ Show
Feature / ProductWeaviateMilvuspgvectorElasticsearch/OpenSearch
Core FocusSemantic Search, Hybrid Search, AI-native Vector DatabaseHigh-performance, Large-scale Vector Similarity SearchPostgreSQL extension for vector searchFull-text search, Vector search (add-on), Hybrid Search
Indexing AlgorithmsPrimarily HNSW, but also supports BM25/BM25F for keyword searchHNSW, IVF, ANNOYLimited, leverages PostgreSQL indexingInverted index for keywords, dense_vector fields for vectors
Semantic UnderstandingExcels, built-in ML model integrations for automatic embeddingPrimarily vector similarity, less native semantic understandingBasic vector similarityRequires external models for semantic embeddings
ScalabilityDesigned for horizontal scaling, multi-tenancy support, handles billions of vectorsHigh performance and scalability for massive datasets (100B+)May struggle with very large datasets and high query loadsScalable, distributed architecture
Hybrid SearchNative, combines BM25/BM25F and vector search with fusion strategies (e.g., relativeScoreFusion, rankedFusion)Supports hybrid search (alpha parameter for tuning BM25 and vector search)Can be combined with traditional SQL search, but not natively hybridBM25 + dense_vector fields, RRF for hybrid scoring
Text Analysis FeaturesAccent folding, custom stopwords, configurable tokenization (word, lowercase, whitespace, field, trigram), /v1/tokenize endpointLess focus on advanced text analysis features within the vector database itselfRelies on PostgreSQL text processing capabilitiesExtensive keyword analysis, tokenization, stemming, stopwords
APIGraphQL and REST APIsREST API, Python/Java/Go SDKsSQL interfaceREST API
DeploymentSelf-hosted (Docker), Weaviate Cloud (managed, serverless)Self-hosted, Zilliz Cloud (fully managed Milvus)PostgreSQL extensionSelf-hosted, managed cloud services
MaturityRelatively newer, but rapidly evolving with strong communityWell-established, mature ecosystemLeverages PostgreSQL maturityHighly mature, widely adopted
Data ManagementStrong metadata management, namespaces, metadata filteringPartitioning, advanced metadata handling, fine-tuned control over index creationLeverages PostgreSQL data managementComprehensive data management, filtering, aggregation

๐Ÿ› ๏ธ Technical Deep Dive

  • Architecture: Weaviate employs a 3-layer architecture consisting of an API layer (handling REST and GraphQL), a Search layer (executing queries), and a Storage layer (storing objects and vectors).
  • Hybrid Search Mechanism: Weaviate's hybrid search executes both vector search (for semantic similarity using HNSW) and keyword search (using BM25/BM25F) in parallel. The results are then combined using fusion strategies like relativeScoreFusion (default from v1.24) or rankedFusion (default for v1.23 and lower) to produce a unified ranking.
  • BM25F Algorithm: Weaviate utilizes BM25F, an extension of BM25, which allows for different weights to be applied to multiple text fields (properties) during the ranking calculation. This enables property boosting, where certain fields (e.g., a product title) can be given more importance. Tunable parameters include k1 (controls term frequency saturation) and b (controls document length normalization).
  • Tokenization Options: Weaviate offers several tokenization methods configurable per property:
    • word (default): Splits text by non-alphanumeric characters and lowercases each token, recommended for general text.
    • lowercase: Splits text by whitespace only and lowercases each token, preserving symbols. Useful for technical data where symbols are meaningful.
    • whitespace: Splits text by whitespace only, preserving case and symbols.
    • field: Treats the entire property value as a single token, useful for exact matches of unique identifiers.
    • trigram: Provides fuzzy matching capabilities by breaking text into overlapping 3-character sequences, aiding in typo tolerance and partial matching (introduced in v1.32).
  • Accent Folding: This feature normalizes accented characters (e.g., 'Cafรฉ' becomes 'Cafe') to ensure that queries with or without accents can match the same underlying text, significantly improving search recall for multilingual datasets.
  • Custom Stopwords: Stopwords are configurable per collection and per property. They are filtered out at query time from the BM25 score calculation, meaning changes to stopword lists do not necessitate reindexing. Custom presets can extend or modify built-in stopword lists.
  • /v1/tokenize Endpoint: This new REST API endpoint allows developers to tokenize arbitrary text with any tokenizer and analyzer configuration, or to tokenize text using an existing property's exact configuration, facilitating experimentation and debugging of text analysis.

๐Ÿ”ฎ Future ImplicationsAI analysis grounded in cited sources

Enhanced multilingual search capabilities will drive broader adoption of Weaviate in global markets.
Accent folding and custom stopwords directly address challenges in multilingual text processing, making Weaviate more effective for diverse language datasets and improving relevance for international users.
The /v1/tokenize endpoint will accelerate developer iteration and improve the quality of text analysis configurations.
By providing a transparent way to test tokenization and analysis settings before deployment, developers can more quickly fine-tune search relevance and reduce errors.
Weaviate's continuous improvements in hybrid search and text analysis will solidify its position as a leading vector database for complex RAG and AI agent applications.
Optimizing BM25 and text processing directly enhances the retrieval component of RAG, leading to more accurate and contextually relevant responses from LLMs and better agentic workflows.

โณ Timeline

2015
Founder Bob van Luijt first encountered word embeddings (GloVe).
2016
The vision for Weaviate as an AI-first search engine crystallized for its founder.
2018
Weaviate entered a startup accelerator, leading to the founding of SeMI Technologies.
2022-12
Weaviate 1.17 released, introducing native hybrid search (BM25 + vector search).
2023-04
Weaviate launched its serverless offering, accelerating its growth.
2026-04
Weaviate v1.37 released, introducing Extensible Tokenizers with accent folding, custom stopword presets, and the `/v1/tokenize` endpoint.

๐Ÿ“Ž Sources (8)

Factual claims are grounded in the sources below. Forward-looking analysis is AI-generated interpretation.

  1. Google Search Source
  2. Google Search Source
  3. Google Search Source
  4. Google Search Source
  5. Google Search Source
  6. Google Search Source
  7. Google Search Source
  8. Google Search Source
๐Ÿ“ฐ

Weekly AI Recap

Read this week's curated digest of top AI events โ†’

๐Ÿ‘‰Related Updates

AI-curated news aggregator. All content rights belong to original publishers.
Original source: Weaviate Blog โ†—