Install
Works with Drupal: ^10.4 || ^11Using Composer to manage Drupal site dependencies
Alternative installation files
Download tar.gz
250.54 KB
MD5: 9238c30fe387982a30a9dd69788a8615
SHA-1: fc7de3db0e48cb270531d5f01554f0e51c47530e
SHA-256: 35f5dc769c0106af390d7129353c9d8b3ded2f4096affb61d36a5ce03797e3c2
Download zip
301.05 KB
MD5: fb472053c35bd1b339f3ff495338eb2b
SHA-1: 36aa21935139a75b4110e4ff593e32c37a137719
SHA-256: 712cce1c80b8f392b76b0452f236b8b91880d4dcf6b8996258b93f6839372cae
Release notes
Commits
- https://git.drupalcode.org/project/ai_search/-/work_items/3584056 BoostByAiSearchBase::applyParentConditions() flattens nested condition groups, losing their AND/OR structure
- https://git.drupalcode.org/project/ai_search/-/work_items/3584057 Embedding strategies should be able to declare additional meta data/output fields
- https://git.drupalcode.org/project/ai_search/-/work_items/3584042 Defer default search item access checking to the Search API datasource plugin
- https://git.drupalcode.org/project/ai_search/-/work_items/3584031 RagTool::execute() should expose structured per-result data and check entity access
- https://git.drupalcode.org/project/ai_search/-/work_items/3584038 Stop converting entity titles to UPPERCASE, it causes token inflation and embedding drift
- https://git.drupalcode.org/project/ai_search/-/work_items/3584039 Refactor `EmbeddingBase::prepareChunks()` to avoid multiplicative chunk generation and invalid overlap-to-chunk-size allocations
- https://git.drupalcode.org/project/ai_search/-/work_items/3584035 Clearing/resetting an index in 1x doesn't reset chunk-slicing progress so items silently re-index with zero embeddings
- https://git.drupalcode.org/project/ai_search/-/work_items/3584034 Error when searching with negated terms
- https://git.drupalcode.org/project/ai_search/-/work_items/3584048 Rerun 10006 update hook that may have run for other reasons due to AI core submodule collision
- https://git.drupalcode.org/project/ai_search/-/work_items/3584054 Should use EntityTypeManagerInterface instead of EntityTypeManager for embedding strategy plugin base
- https://git.drupalcode.org/project/ai_search/-/work_items/3584050 Allow requesting (or not) of raw vectors per query
- https://git.drupalcode.org/project/ai_search/-/work_items/3584033 Preview reports first batch as total chunks
- https://git.drupalcode.org/project/ai_search/-/work_items/3584049 Fix tiktoken concurrency flakey tests
- https://git.drupalcode.org/project/ai_search/-/work_items/3584032 Progressive indexing can drop tail chunks
- https://git.drupalcode.org/project/ai_search/-/work_items/3584036 Tests fails on MariaDB 11.8 due to `vector` became a reserved word
- https://git.drupalcode.org/project/ai_search/-/work_items/3584024 Batch embeddings for improved indexing performance
Considerations for those extending the module
- SearchApiAiSearchBackend: the $entityTypeManager property and its injection are gone. Subclasses that use $this->entityTypeManager must inject it themselves.
- Access checks: private checkEntityAccess() is now checkItemAccess(). It uses the datasource's getItemAccessResult() rather than $entity->access('view'). Non-entity datasources work now, and custom datasource access logic is respected.
- EmbeddingStrategyPluginBase: the constructor now takes EntityTypeManagerInterface instead of EntityTypeManager. Update subclass constructor signatures to match.
- Chunk output from EmbeddingBase::prepareChunks(): with both contextual and main content, it now returns M chunks (one contextual prefix per main chunk) instead of M×C. Contextual content that doesn't fit the first contextual chunk is dropped. It throws \LogicException if the title leaves no room for main content.
- Titles: prepareChunkText() no longer uppercases them. Embeddings change, but little impact, not necessary to reindex.
- BoostByAiSearchBase: parent conditions are copied with their nested AND/OR groups intact instead of being flattened. The AI query now gets an added condition group rather than top-level conditions.
- RagTool: $this->results now holds structured data (entity_type, entity_id, langcode, score, content), also available through the structured output. There's also a new parseDrupalEntityId() helper.
- earchKeysHelper::flatten($keys, $include_negated): flattens nested Search API keys. Negated terms are now left out of the embedding prompt.
- Tracker: chunk counting now uses the backend's configured chat_model tokenizer instead of the hardcoded gpt-3.5.