Changelog
All notable changes to Search Toolkit are documented here.
0.0.14
Breaking changes
Embedding model defaults and types
- The default
VectorDTypeonMistralEmbeddingModel,CustomEmbeddingModel, andMistralEmbeddingPresetswitched fromFLOAT32toFLOAT16, matching the storage-efficient default of thehalfvecconvention used by the Postgres plugin. Existing deployed Vespa apps that relied on the float32 default are pinned toFLOAT32to preserve their behavior; new apps, cookbooks, and plugin preset resolution adoptFLOAT16. MistralEmbeddingModelandCustomEmbeddingModeldimensions are now capped at4096, enforced at the model rather than by each consumer that interpolates the value into pgvector DDL. Values above4096raise at construction.- Added
EmbeddingModelType(MISTRAL/CUSTOM) as theStrEnumdiscriminator for theEmbeddingModelunion, so downstream consumers reference the union variant without a local duplicate.
Index protocols
- The three index base classes
StoreIndex,KeywordStoreIndex, andVectorStoreIndexare now@runtime_checkableProtocols, matching the style ofNavigableIndex,VersionedIndex, andPatchableIndex. Any structurally-conforming class is accepted, not just explicit subclasses.VectorStoreIndexgained anembedding_model: EmbeddingModelattribute as the structural marker that distinguishes vector stores from keyword stores underisinstancechecks; onVespaSearchIndexandPostgresStoreIndexthe read-only@propertybecame a writeable instance attribute sourced from the same place.
Improvements
PyMuPDFExtractorgained an opt-inextract_tables=Truethat renders detected tables as markdown, so a corpus with ruled financial tables keeps them without moving to OCR. Tables are appended to (not substituted into) the page text, and detection failures fall back to plain text for that page. Off by default.- Classified ingestion errors for retryability: deterministic input failures are now terminal instead of being retried, and provider 4xx no longer exhausts the batch retry budget. New terminal exceptions
UnsupportedContentError,MissingDependencyError, andHtmlConversionErrordeclareis_retryable = False;OcrProviderExceptionreadsstatus_codefrom its cause and treats 4xx as terminal (429 and 5xx remain retryable). BareValueErrorexceptions raised for unsupported content in the mimetype registry, email attachment, legacy office, and Mistral OCR paths now surface asUnsupportedContentError. Pipeline.runacceptsSequenceandIteratorinputs (lists, tuples, generators), not only lists.RoutedPipelineexposes a read-onlypipelinesproperty returning aMappingProxyTypeover its protocol-to-pipeline dict, so callers can inspect routed pipelines without reaching into private state.- Vespa: the ANN candidate count is configurable.
max_candidatesforwards to the VespatargetHitson the document-per-chunk query builder; unset preserves the existing1000default, and explicit values pass through unclamped. See Manage ranking. - Vespa:
VespaSearchIndexexposes a public asyncacloseso callers can close the index without touching the private client. MistralEmbedderskips tokenizer instantiation on the query path and caches the tokenizer process-wide vialru_cache, reducing query latency and per-instance cold-start cost. The ingestion (queued) path is unchanged.- The Postgres plugin is installable as an extra:
mistralai-search-toolkit[postgres], and included in theallextra. See the Postgres page. FilesystemStorage.list_objects(prefix=...)lists under a prefix without scanning the whole store, turning a previously quadratic per-container listing into a flat-cost operation.- A typed
EmbeddingSizeMismatchError(IndexingError)carriesexpected/actualwidths and the offendingchunk_id. Both Vespa indexes validate each chunk's embedding width against the schema'sembedding_dimensionsbefore any write, so a misconfigured feed fails fast—on the per-chunk index, before the destructive delete-then-insert.
Bugfixes
EmailWithAttachmentsExtractorfilters oversized EML and MSG attachments out of the extracted list before recursive dispatch, bounding retained memory for the returned list, recursive extraction, and rendering.- The
register-indexpath now sendsembedding_dimensionsinstead of storingNULL, so the dimensions badge shows correctly. Existing indexes are repaired on their next registration; the Vespa plugin now requiresmistralai>=2.10.0,<3.
0.0.13
Breaking changes
Embedding model on the schema
create_schema()andcreate_default_schema()now takeembedding_model(anEmbeddingModelorMistralEmbeddingPreset) instead ofembedding_dimensions: int.embedding_dimensionsis deprecated (emits aDeprecationWarningand builds aCustomEmbeddingModel(name="unknown")under the hood); passing both raisesValueError.VespaSchemaDefinition.embedding_dimensionsis replaced byembedding_model: EmbeddingModel, threading the full model config (name, dimensions, dtype, distance metric) through the schema layer.VespaSearchIndexnow exposes anembedding_modelproperty.
Improvements
- Added a Postgres search backend (
mistralai-search-toolkit-plugins-postgres) as a second index alongside Vespa.PostgresStoreIndeximplementsVectorStoreIndex(dense and hybrid search),NavigableIndex(navigate/read/grep/get_chunk), andPatchableIndex(partial updates). AVectorSearchQuerythat carries bothqueryandembeddingruns BM25 (pg_textsearch) and HNSW (pgvector) retrieval fused by weighted reciprocal rank fusion; the newPostgresSearchQuerytunesvector_weight/text_weight/rrf_k. ThePostgresAppmirrors the Vespa app'sget_search_index(config, collection)shape, and collections are declared withPostgresCollectionSchema(collection_name, document_type, embedding_model). Requires thevectorandpg_textsearchextensions provisioned in the target database. - Added an
EmbeddingModelabstraction (embedding/models.py) as the single source of truth for vector config:MistralEmbeddingModelandCustomEmbeddingModel(discriminated union viaEmbeddingModel), theMistralEmbeddingPresetenum (MISTRAL_EMBED_DIM_1024/MISTRAL_EMBED_DIM_256/MISTRAL_EMBED_DIM_128) withbuild_embedding_model(), plusVectorDType(FLOAT32/FLOAT16),DistanceMetric(COSINE/INNER_PRODUCT/L2), and aVectorConfigprotocol. SmartPDFExtractorandLegacyOfficeExtractornow accept anyDocumentExtractoras an OCR delegate instead of requiringMistralOCRExtractor, so a deployment with no reachable Mistral API can supply its own engine.- Added opt-in text-first PDF extraction via
pdf_min_chars_per_page(PdfTextFirstExtractor); off by default. PDFs dispatched to the heuristic leave.docx/.pptx/.odt/.epuband image attachments on the OCR route untouched. - Threaded
exclude_idsthrough the retrieval layer:QueryEngine.search(..., exclude_ids=...) forwards to retrievers and onto the search query.CachedQueryEngine.search forwards it and bypasses the cache when exclusions are set.
Bugfixes
- Updated
markdownifyfrom>=0.14,<1to>=1.0.0,<2and adapted the custom converter to the 1.x API.
0.0.12
Breaking changes
Checkpoint serialization
- A new
document/serialization.pymodule introduces aDocumentTypeRegistryand stable type ids so that document classes can be round-tripped through an external service safely.
Improvements
- Added
MistralClientConfigandbuild_mistral_client()to centralize Mistral SDK client creation for whole pipelines. - Added
SmartPDFExtractor, which chooses between PyMuPDF and Mistral OCR automatically for PDFs that already have a text layer. - Added
EmailWithAttachmentsExtractor, which adds attachment text to the parent email's Markdown under an## Attachmentssection. - Improved error reporting for ingestion problems.
Bugfixes
- Deterministic ingestion failures now fail faster.
Chores
- Bumped
mistralaito>=2.9.1,<2.10. - Bumped
dynaconffrom>=3.2.11to>=3.3.4. - Renamed the
mistralai.search.toolkit.embeddersmodule tomistralai.search.toolkit.embedding. A backward-compatibleembeddersshim re-exports public symbols and emits aDeprecationWarning. See the Embedders page.
0.0.11
Improvements
- For ingestion, made extraction checkpoints (saving snapshots between stages, for faster retrying) a backend-agnostic capability.
Pipeline(checkpoint_store=...)accepts anyObjectStoragebackend and saves checkpoints between the ingestion stages;run_file(..., checkpoint_key=...)loads and saves the extraction result so retries and re-ingestion skip re-extraction. - Introduced a
DocumentProcessorprotocol for ingestion, unifyingTextSplitter,Embedder, andChunkEnricher. - Added map-reduce summarization for long documents:
SummarizeRequestConfigwithoverflow_strategy: OverflowStrategy.MAP_REDUCEcan split a document, summarize the different parts, and merge them into a final summary. See the Summary Enricher. - Added OCR v4 features: inline markdown table embedding in page chunks, per-chunk confidence scores, and basic bounding-box support.
- Added a
PatchableIndexcapability withpatch_chunkandpatch_documentfor partial updates onDOCUMENT_PER_CHUNKindices, avoiding a full re-index when only metadata changes. - Added
get_chunk(chunk_id)to theNavigableIndexprotocol. - Vespa: added
set_default_ranking_weights()to bake default ranking-feature weights into a schema and its default query profile. See Manage ranking. - Vespa: added a phase-1 vector
closenessranking function for embedding fields, putting vector relevance into candidate selection. See Ranking profiles. - Vespa:
BoolFieldgained afast_searchoption.
Bugfixes
- Sanitize illegal Unicode code points (lone surrogates) from extracted content.
Chores
- Updated
mistralaibound from<2.7to<2.9. - Bumped
pypdffrom 6.13.3 to 6.14.2. - Bumped
azure-storage-blobto 12.30.0.
0.0.10
Improvements
- Added embeddings batch API support for ingestion:
MistralEmbedder.run_batch_embedding_job()can be used to lower embedding costs for large ingestion jobs. - Added header-aware token-budgeted chunking for ingestion: new
ParagraphTokenTextSplitterandMarkdownTokenTextSplittersplitters. See the Text splitters page. - Added a
NavigableIndexprotocol withnavigate,read, andgrepmethods for positional chunk navigation onDOCUMENT_PER_CHUNKindices. - Vespa: added YQL search on
DocumentPerChunkSearchIndexviaVespaSearchQuery, with ranking tuning and chunk-id exclusion (exclude_ids). See Manage ranking.
Bugfixes
- Fixed
TokenTextSplitterreporting wrong offsets for repeated content.
Chores
- Relaxed the toolkit
mistralaiconstraint to>=2.5.0,<2.7.
0.0.9
Breaking changes
Document model
Search Toolkit now uses a unified document model built around Document and DocumentChunk, with a deterministic identity derived from a source_id and a locator. See the Document model page for full details.
- Extractors now produce
DocumentChunkobjects directly; the separate page representation has been removed. Document.idandDocumentChunk.idare now computed deterministically fromsource_id(pluslocatorfor chunks), making indexing idempotent. The explicitidfield onFileanddocument_idonDocumentChunkhave been removed.- Added
source_id,locator,parent_ref, andchunk_typeas first-class fields, along with typed, extensible metadata models. The same identity contract is mirrored onSearchResultChunk.
Vespa indexing model
Vespa now indexes one chunk per document via the new DOCUMENT_PER_CHUNK indexing mode, which becomes the recommended model. The previous single-document model is deprecated.
- Added the
DOCUMENT_PER_CHUNKindexing mode, including default fields, ranking profiles, and the full write, delete, and search paths. See Anatomy of a Vespa application. - Added an
IndexingModeto the schema definition with deprecation hooks for migrating existing schemas. - The index API is split into a base
VespaSearchIndexand a dedicatedSingleDocumentSearchIndex; the single-document model is deprecated in favor ofDOCUMENT_PER_CHUNK. - The schema
id_fieldis deprecated and is no longer allowed forDOCUMENT_PER_CHUNKindexes.
Other
- Renamed the
indicesmodule tosearch. Update imports accordingly.
Improvements
- Added blob-storage
FileLoaderimplementations for S3, Azure, and GCS, plus astorage-s3extra. See the File loaders page. - Added OCR model literals and constants.
- Vespa: extracted a dedicated
VespaClientwith improved error handling. - Vespa: added a backend-agnostic services definition, topology v2, and a translator, with automatic v2 topology generation for single-node Docker deployments.
- Vespa: added Vespa-to-Vespa copy and index-to-streaming migration workflows.
- Vespa: emit a metrics consumer in
services.xml. - Vespa: warn when rank2 features are configured without rank1, and when ranking weights default to 0.
Security
- Updated
langchain-coreto~=1.4.
Bugfixes
- Vespa: rank by cosine similarity instead of euclidean distance.
- Vespa: fix retrieval of the document count.
- Vespa: thread
distribute_across_groupsintoload_topology_file. - Vespa CLI: lazy-import index registration SDK models.
- Treat truncated LLM responses as retryable and enrich
LLMException/SummaryGenerationErrorfor structured logging. - OCR extractor: use mimetype metadata for filetype detection.
- Added
text/x-fileandtext/x-script.pythonMIME types to the registry.
0.0.8
Initial release of Search Toolkit as a tech preview.