{
 "schema_version": 1,
 "generated": "2026-11-09",
 "id": "neuml-txtai--build-semantic-search-in-a-few-lines-with-txtai",
 "repo": "neuml/txtai",
 "repo_url": "https://github.com/neuml/txtai",
 "repo_slug": "neuml-txtai",
 "title": "Build semantic search in a few lines",
 "page_title": "How to build semantic search in a few lines with Txtai",
 "summary": "Index text with Txtai Embeddings and search it by meaning.",
 "who": "A developer adding meaning-based search to a small app.",
 "problem": "Keyword search misses results that mean the same thing in different words.",
 "outcome": "A working embeddings index you can query in Python.",
 "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)`"
 ],
 "agent_prompt": "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.",
 "agents": [
  "claude-code",
  "codex",
  "cursor",
  "gemini-cli"
 ],
 "difficulty": "Beginner",
 "time": "15 minutes",
 "basis": "readme",
 "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.",
 "category": "Research",
 "tags": [
  "Research"
 ],
 "lang": "python",
 "requirements": [
  "Python 3.11 or newer and pip",
  "A virtual environment is recommended",
  "Optional uvicorn for the API"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/neuml-txtai/build-semantic-search-in-a-few-lines-with-txtai/",
 "md": "https://dedupedai.com/use-cases/neuml-txtai/build-semantic-search-in-a-few-lines-with-txtai/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/neuml-txtai--build-semantic-search-in-a-few-lines-with-txtai.json",
 "api_version": "v1"
}
