Examples
The examples directory has a series of notebooks and applications giving an overview of txtai. See the sections below.
Semantic Search
Build semantic/similarity/vector/neural search applications.
Notebook | Description | |
---|---|---|
Introducing txtai ▶️ | Overview of the functionality provided by txtai | |
Build an Embeddings index with Hugging Face Datasets | Index and search Hugging Face Datasets | |
Build an Embeddings index from a data source | Index and search a data source with word embeddings | |
Add semantic search to Elasticsearch | Add semantic search to existing search systems | |
Similarity search with images | Embed images and text into the same space for search | |
Distributed embeddings cluster | Distribute an embeddings index across multiple data nodes | |
What’s new in txtai 4.0 | Content storage, SQL, object storage, reindex and compressed indexes | |
Anatomy of a txtai index | Deep dive into the file formats behind a txtai embeddings index | |
Custom Embeddings SQL functions | Add user-defined functions to Embeddings SQL | |
Model explainability | Explainability for semantic search | |
Query translation | Domain-specific natural language queries with query translation | |
Build a QA database | Question matching with semantic search | |
Embeddings components | Composable search with vector, SQL and scoring components | |
Semantic Graphs | Explore topics, data connectivity and run network analysis | |
Topic Modeling with BM25 | Topic modeling backed by a BM25 index | |
Prompt-driven search with LLMs | Embeddings-guided and Prompt-driven search with Large Language Models (LLMs) | |
Embeddings in the Cloud | Load and use an embeddings index from the Hugging Face Hub |
Pipelines
Transform data with language model backed pipelines.
Notebook | Description | |
---|---|---|
Extractive QA with txtai | Introduction to extractive question-answering with txtai | |
Extractive QA with Elasticsearch | Run extractive question-answering queries with Elasticsearch | |
Extractive QA to build structured data | Build structured datasets using extractive question-answering | |
Apply labels with zero shot classification | Use zero shot learning for labeling, classification and topic modeling | |
Building abstractive text summaries | Run abstractive text summarization | |
Extract text from documents | Extract text from PDF, Office, HTML and more | |
Text to speech generation | Generate speech from text | |
Transcribe audio to text | Convert audio files to text | |
Translate text between languages | Streamline machine translation and language detection | |
Generate image captions and detect objects | Captions and object detection for images | |
Near duplicate image detection | Identify duplicate and near-duplicate images | |
API Gallery | Using txtai in JavaScript, Java, Rust and Go |
Workflows
Efficiently process data at scale.
Notebook | Description | |
---|---|---|
Run pipeline workflows ▶️ | Simple yet powerful constructs to efficiently process data | |
Transform tabular data with composable workflows | Transform, index and search tabular data | |
Tensor workflows | Performant processing of large tensor arrays | |
Entity extraction workflows | Identify entity/label combinations | |
Workflow Scheduling | Schedule workflows with cron expressions | |
Push notifications with workflows | Generate and push notifications with workflows | |
Pictures are a worth a thousand words | Generate webpage summary images with DALL-E mini | |
Run txtai with native code | Execute workflows in native code with the Python C API | |
Prompt templates and task chains | Build model prompts and connect tasks together with workflows |
Model Training
Train NLP models.
Notebook | Description | |
---|---|---|
Train a text labeler | Build text sequence classification models | |
Train without labels | Use zero-shot classifiers to train new models | |
Train a QA model | Build and fine-tune question-answering models | |
Train a language model from scratch | Build new language models | |
Export and run models with ONNX | Export models with ONNX, run natively in JavaScript, Java and Rust | |
Export and run other machine learning models | Export and run models from scikit-learn, PyTorch and more |
Applications
Series of example applications with txtai. Links to hosted versions on Hugging Face Spaces also provided.
Application | Description | |
---|---|---|
Basic similarity search | Basic similarity search example. Data from the original txtai demo. | 🤗 |
Book search | Book similarity search application. Index book descriptions and query using natural language statements. | Local run only |
Image search | Image similarity search application. Index a directory of images and run searches to identify images similar to the input query. | 🤗 |
Summarize an article | Summarize an article. Workflow that extracts text from a webpage and builds a summary. | 🤗 |
Wiki search | Wikipedia search application. Queries Wikipedia API and summarizes the top result. | 🤗 |
Workflow builder | Build and execute txtai workflows. Connect summarization, text extraction, transcription, translation and similarity search pipelines together to run unified workflows. | 🤗 |