DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to build semantic search in a few lines with Txtai

Index text with Txtai Embeddings and search it by meaning.

Short answer: Install with pip install txtai; then import it with import txtai; create embeddings = txtai.Embeddings(). All steps.

  • Top pick
  • Research
  • Beginner
  • 15 minutes
  • From the README
  • Claude Code
  • Codex
  • Cursor
  • Gemini CLI

Who it is forA developer adding meaning-based search to a small app.

The problemKeyword search misses results that mean the same thing in different words.

The outcomeA working embeddings index you can query in Python.

What you need first

  • Python 3.11 or newer and pip
  • A virtual environment is recommended
  • Optional uvicorn for the API

Steps

  1. Install with pip install txtai
  2. Import it with import txtai
  3. Create embeddings = txtai.Embeddings()
  4. Index your texts with embeddings.index(["Correct", "Not what we hoped"]), swapping in your own list
  5. Query with embeddings.search("positive", 1)

Prompt for your agent

Using neuml/txtai, install it with `pip install txtai`, index a list of <my documents> with `embeddings.index` and run `embeddings.search` for a few queries.

Caveat. This card is written from the neuml/txtai README, not from a test run by Deduped. Before you start, make sure you have Python 3.11 or newer and pip. Check the repo for newer instructions before you rely on these steps.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for neuml/txtai and "Build semantic search in a few lines"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer