Read more: https://medium.com/neuml/neuspo-d42a6e33031
neuspo is powered by txtai (https://github.com/neuml/txtai)
49 karma · joined September 11, 2021
Read more: https://medium.com/neuml/neuspo-d42a6e33031
neuspo is powered by txtai (https://github.com/neuml/txtai)
Medium article - https://medium.com/neuml/neuspo-d42a6e33031
Much of the logic in neuspo builds on txtai - https://github.com/neuml/txtai
It can run as a service in couple lines of code.
The above workflows can be built with this application - https://github.com/neuml/txtai/blob/master/examples/workflow...
The application can create/save/load workflows and generates the workflow configuration, no-code required.
Seems like a lot of tooling is being created in other languages besides Python, may just take some time to get there.
All the source is Apache 2.0 - https://github.com/neuml/txtai
There are a number of models that are now available via APIs and can be used from any language.
Here is a link to a live example: https://huggingface.co/spaces/NeuML/txtai?default=search+hac...
And configuration for the live example, which is no-code: https://huggingface.co/spaces/NeuML/txtai/blob/main/workflow...
Here is a link to a live example: https://huggingface.co/spaces/NeuML/txtai?default=search+hac...
The example above builds a semantic index for current Hacker News front page titles.
There is also an example notebook: https://colab.research.google.com/github/neuml/txtai/blob/ma...
At a high level, txtai uses a similar clause embedded in SQL statements. For example, "SELECT id, text, score FROM txtai WHERE similar('feel good story') AND text LIKE '%good%'". This statement is parsed and the similar clause runs against the approximate nearest neighbor index. The result ids are then loaded into a temporary table and the SQL statement is dynamically rewritten to change the similar clause into "id IN <temporary table>".
txtai uses transformers to transform data (text, images, audio) into embeddings. Those embeddings are then loaded into an approximate nearest neighbor index for search. On top of that, content is loaded into a relational database to support SQL based filtering. It's trying to get the best of both vector/similarity search alongside standard structured search using a SQL syntax.
This can be run in-process or via an API - https://neuml.github.io/txtai/api/
Components can be split up, for example there could be a server that vectorizes text into embeddings and another server that hosts the indexes.
There is also a pipeline and workflow framework (https://neuml.github.io/txtai/workflow/). This component has modules that assists with splitting data, transforming, summarizing, translating, parsing tabular content. Workflows can be used purely for transformations or as a driver to load data.
I've primarily focused on single query times, which have averaged around 5ms - 25ms depending on the size of the index. Queries can be batched so query times wouldn't increase linearly. You could batch quite a few and still get subsecond response times.
All three libraries are approximate nearest neighbors but I know at least for Faiss, it can be configured to effectively be a precise query.