{
 "schema_version": 1,
 "generated": "2026-10-26",
 "id": "mattn-tensai--serve-local-embeddings-for-search",
 "repo": "mattn/tensai",
 "repo_url": "https://github.com/mattn/tensai",
 "repo_slug": "mattn-tensai",
 "title": "Serve local text embeddings for search or RAG",
 "page_title": "How to serve local text embeddings for search or RAG with Tensai",
 "summary": "Turn texts into vectors with Tensai embed and answer OpenAI-style /v1/embeddings requests.",
 "who": "A developer building semantic search or retrieval for a private document set who does not want to send text to a hosted API.",
 "problem": "Retrieval pipelines need embedding vectors, and calling a cloud service exposes the documents.",
 "outcome": "A local server that accepts OpenAI-compatible embedding requests, backed by a ModernBERT encoder.",
 "steps": [
  "Clone the repository and build or install the Tensai command from its root. (inferred, check the README)",
  "Run `tensai embed` on a few sample texts to confirm vectors are produced.",
  "Run `tensai serve` to start the OpenAI-compatible endpoint.",
  "Send a POST request to the server's /v1/embeddings path with a sample input and check the returned vector length. (inferred, check the README)"
 ],
 "agent_prompt": "Use the mattn/tensai repository to run tensai embed on three sample sentences, then start tensai serve. Report the vector dimension returned by the /v1/embeddings endpoint. Verify that all three vectors have the same length.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "60 minutes",
 "basis": "readme",
 "caveat": "The README does not say where the default model is downloaded from or how large it is, so plan for the first-run setup time.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "go",
 "requirements": [
  "Go toolchain (Go 1.26 or 1.27 is needed only for the GOEXPERIMENT=simd build)",
  "git to clone the repository",
  "Disk space for model checkpoints when using the image, audio, or embedding commands"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/mattn-tensai/serve-local-embeddings-for-search/",
 "md": "https://dedupedai.com/use-cases/mattn-tensai/serve-local-embeddings-for-search/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/mattn-tensai--serve-local-embeddings-for-search.json",
 "api_version": "v1"
}
