txtai
💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows
Txtai is a Python library for building search systems that find content by meaning rather than keywords, and for chaining AI tasks like summarizing, translating, and answering questions on your own data without sending it to the cloud.
Txtai is a Python library for building search systems and AI-powered workflows. Its core feature is an embeddings database, which indexes content so you can search by meaning rather than by keywords. Traditional search finds documents that contain the exact words you typed; semantic search finds content that means the same thing, even if the wording is different. Txtai handles this by converting text, images, audio, or video into numerical representations (called vectors or embeddings) that capture meaning and can be compared mathematically.
On top of that search foundation, txtai provides building blocks for connecting language models to your data. Retrieval augmented generation (RAG) is a pattern where a system retrieves relevant information from your own content and feeds it to a language model to produce a response grounded in that data rather than general training knowledge. Txtai supports this pattern, along with multi-step pipelines for tasks like summarizing documents, translating text, transcribing audio, labeling content, and answering questions.
The library also supports autonomous agents: systems that decide on their own which tools or data sources to consult in order to answer a question or complete a task. Agents in txtai can chain together search, language models, and other tools to handle more complex problems without manual step-by-step instructions.
Txtai can run entirely on a local machine without sending data to outside services, which matters for private or sensitive content. It exposes a web API so that applications written in JavaScript, Java, Rust, or Go can connect to a txtai instance running in Python. Over 70 example notebooks cover the range of functionality.
The library requires Python 3.10 or later and is open source under an Apache 2.0 license. The company behind it, NeuML, also offers consulting services and a hosted cloud version.
Where it fits
- Build a search system over your own documents that finds relevant results even when the exact words don't match.
- Set up a retrieval-augmented generation pipeline that answers questions using your private data fed to a language model.
- Create an autonomous agent that decides which data sources and tools to query to answer complex multi-step questions.
- Transcribe audio, summarize text, and translate content in a single local pipeline without external API calls.