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
- Install with
pip install txtai - Import it with
import txtai - Create
embeddings = txtai.Embeddings() - Index your texts with
embeddings.index(["Correct", "Not what we hoped"]), swapping in your own list - 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
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer