v0.5.3
View SourceFixes
Torus.Embeddings.OpenAInow correctly parses updated response structure from OpenAI API.exlanx backend is now correctly supported inTorus.Embeddings.LocalNxServing.
v0.5.2
New 🔥
- New demo page where you can explore different search types and their options. It also includes semantic search, so if you're hesitant - go check it out!
- Other documentation improvements
Fixes
- Correctly handles
order: :noneinTorus.semantic/5search. - Updates
Torus.Embeddings.HuggingFaceto point to the updated feature extraction endpoint. - Suppresses warnings for missing
ecto_sqldependency by adding it to the required dependencies. Most of us already had it, but now it'll be explicit. - Correctly parses an array of integers in
Torus.QueryInspector.substituted_sql/3andTorus.QueryInspector.tap_substituted_sql/3. Now we should be able to handle all possible query variations.
v0.5.1
- Adds
Torus.Embeddings.Geminito support Gemini embeddings. - Extends semantic search docs on how to stack embedders
- Adds
:distance_keyoption toTorus.semantic/5to allow selecting distance key to the result map. Later on we'll rely on this to support hybrid search. - Correctly swaps
>and<operators for pre-filtering when changing order inTorus.semantic/5search.
v0.5.0
- Similarity search type now defaults to
:word_similarityinstead ofsimilarity. - Possible
Torus.similarity/5search types are updated to be prefixed withsimilarityto replicate 1-1 these inpg_trgmextension. - Extended optimization section in the docs
v0.4.1
Minor doc updates
v0.4.0
Breaking changes:
Torus.full_text/5- now returns all results when search term contains a stop word or is empty instead of returning none.
Improvements:
Torus.full_text/5- now supports:empty_returnoption that controls if the query should return all results when search term contains a stop word or is empty.Torus.QueryInspector.tap_explain_analyze/3- now correctly returns the query plan.- Docs were grouped together by the search type.
New 🔥
Semantic search is finally here! Read more about it in the Semantic search with Torus guide. Shortly - it allows you to generate embeddings using a configurable adapters and use them to compare against the ones stored in your database.
Supported adapters (for now):
Torus.Embeddings.OpenAI- uses OpenAI's API to generate embeddings.Torus.Embeddings.HuggingFace- uses HuggingFace's API to generate embeddings.Torus.Embeddings.LocalNxServing- generate embeddings on your local machine using a variety of models available on Hugging FaceTorus.Embeddings.PostgresML- uses PostgreSQL PostgresML extension to generate embeddingsTorus.Embeddings.Batcher- a long‑running GenServer that collects individual embedding calls, groups them into a single batch, and forwards the batch to the configuredembedding_module(any from the above or your custom one).Torus.Embeddings.NebulexCache- a wrapper around Nebulex cache, allowing you to cache the embedding calls in memory, so you save the resources/cost of calling the embedding module multiple times for the same input.
And you can easily create your own adapter by implementing the Torus.Embedding behaviour.
v0.3.0
Breaking changes:
full_text_dynamic/5is renamed tofull_text/5and now supports stored columns.similarity/5-limitoption is removed, use Ecto'slimit/2instead.full_text/5-:concatoption is renamed to:coalesce.
Improvements:
full_text/5now supports storedtsvectorcolumns.Torus.QueryInspector.substituted_sql/3now correctly handles arrays substitutions.- Docs are extended to guide through the performance and relevance.
And other minor performance/clearance improvements.
v0.2.2
full_text_dynamic/5: Replaced:nullable_columnswith:concatoptionsimilarity/5: Fixed a bug where you weren't able to pass variable as a termTorus.QueryInspector: now is not tied withTorus.Testingand serves as a separate standalone module.
And other minor performance/clearance improvements.
v0.2.1
similarity/5 search is now fully tested and customizable. full_text_dynamic/5 is up next.
Changelog for Torus v0.2.0
Torus now supports full text search, ilike, and similarity search.