trieve

devflowincMIT更新放缓

一个用 Rust 写的 API 平台,把搜索、推荐、RAG 和数据分析打包在一起,底层接 PostgreSQL 和 Qdrant 向量库,省去自己拼装检索链路的麻烦。

All-in-one platform for search, recommendations, RAG, and analytics offered via API

trieve-helm-0.2.2发布于 2025-03-07 21:55 UTC2,723star254fork同步于 2026-11-07 07:29 UTC

怎么上手

由 README 提炼,执行前请确认
cp .env.analytics ./frontends/analytics/.env
cp .env.chat ./frontends/chat/.env
cp .env.search ./frontends/search/.env
cp .env.example ./server/.env
cp .env.dashboard ./frontends/dashboard/.env
./convenience.sh -l
docker compose -f docker-compose-cpu-embeddings.yml up -d
硬件要求按 README 说明

README 未给出具体显存或 GPU 型号要求;嵌入服务提供 CPU 与 GPU 两套 docker compose,MacOS 需用 CPU 覆盖配置。

有 Docker 镜像
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

一站式搜索、推荐与 RAG 平台,通过 API 提供混合检索、重排和 LLM 问答能力

一个用 Rust 写的 API 平台,把搜索、推荐、RAG 和数据分析打包在一起,底层接 PostgreSQL 和 Qdrant 向量库,省去自己拼装检索链路的麻烦。

核心能力

  • 用 Qdrant 做稠密向量语义检索,可接 OpenAI 或 Jina 嵌入
  • 用 SPLADE 稀疏向量实现容错全文与神经检索
  • 混合检索配合 cross-encoder 重排提升结果质量
  • 提供推荐 API 查找相似 chunk 或文件
  • 内置 RAG 路由,经 OpenRouter 接入任意 LLM

容易踩的坑

需先在 server/.env 填入 LLM_API_KEY 和 OPENAI_API_KEY 才能跑起来;本地开发要手动创建 server/tmp 目录和 frontends/analytics 目录;嵌入服务需单独用 docker compose 启动,换 GPU 设备还要改 SPARSE_SERVER_* 和 EMBEDDING_SERVER_ORIGIN 环境变量。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本trieve-helm-0.2.2
  1. trieve-helm-0.2.2最新正式版2025-03-07 · 2025-03-07 21:55 UTC

    Helm chart expressing Trieve deployment without any dependencies

  2. v0.13.02024-12-06 · 2024-12-06 20:23 UTC
    查看更新说明

    0.13.0 (2024-12-06)

    Trieve

    Batch create dataset route #2735 Save Chunk boost values into Postgres #2751 Add fallback response #2828 Add MMR support #2861 #2884 Add Recency bias #2860 Refactor API keys to be scoped to orgs #2845 #2833 #2899 BATCH_CHUNK_LIMIT as an env flag #2830 FLAG to disable postgres on ingest #2837 add match_all to search playground #2869 Filter by group_id and group_tracking_id #2886 Boolean filter support #2893 Support cohehre rerankers #2898 remove postgresql trigger function #2901

    PDF2MD

    New Product pdf2md! View it at https://pdf2md.trieve.ai/

    image

    #2853 #2831 #2829 #2827 #2809 #2807 #2806 #2803 #2802 #2800 #2799 #2781 #2780 #2763 #2759 #2757 #2755 #2752

    Public Page

    New feature, Public Page! We bundle our search component with Trieve's dashboard for you to quickly prototype and demo Trieve's search and share it to the world. Try it now on the dashboard.

    image

    Relevant PR's: #2655 #2663 #2672 #2677 #2691 #2700 #2742 #2743 #2744 #2747 #2750 #2812 #2846 #2854 #2863 #2872 #2885

    Search Component

    Mostly bugfixes

    Relevant PR's: #2815 #2748 #2734 #2730 #2964 #2691 #2682 #2679 #2664 #2662 #2657 #2723

    Self Hosting Guides (kube)

    New guides for self hosting with kuberentes, we also majorly refactored the helm chart for more stable releases and to update more consistently.

    https://docs.trieve.ai/self-hosting/local-kube

  3. v0.12.12024-10-25 · 2024-10-25 19:13 UTC
    查看更新说明

    0.12.1 (2024-10-25)

    Features

    • /dataset/visiblity route to the server to set visibility with (ed2c4c0)
    • add /topic/clone to the ts-sdk (8b6fe7e)
    • add debounce for getCounts, search and suggestedQueries (992d8cc)
    • add glasskube argocd app (afc7497)
    • add group products checkmark to crawl settings (a4e23c7)
    • add group variants flag (070a6a5)
    • add ImageConfig for sending images to the llm (1f12579)
    • add kustomization (9480d6d)
    • add noResultsLink + styling: cleanup dark for active tab and search toggle (93a83f2)
    • add noResultsLink + styling: cleanup dark for active tab and search toggle (84479c6)
    • add open and onOpenChange as params for search component (cde5fa2)
    • add packages kustomization (92ce2b0)
    • add prices and images to ecomm chat (9097194)
    • add search component example code (9b9d818)
    • add shopify option to frontend (745d4ea)
    • add shopify scraping (d3a6609)
    • add site path to search results (60ad84a)
    • add the ability to remove strings from titles and content during crawl (8517c98)
    • add trieve hackernews application (9b5620e)
    • add web component (4ca266c)
    • added route to the backend for group_variants (6b2c7d5)
    • added useImages to the frontend as a parameter (c2db61c)
    • allow custom pre and post tags for highlights (c2f3777)
    • allow for specifying allow_external_links and allow_backward_links (aeb9495)
    • allow rag to use group search w/ a size of 1 (95debf6)
    • allow user to specify that chunks' links should be included in generated output (baa9d39)
    • authorization for webhook (e0c060c)
    • auto focus
  4. v0.12.02024-10-07 · 2024-10-07 17:58 UTC
    查看更新说明

    0.12.0 (2024-10-07)

    We put a lot of effort in this release to showcase all of the API features of Trieve in its many different forms. The high level features are:

    • Better Analytics, as a first-class member in the dashboard 📈
    • New Scraping support 🤖
    • Search and Rag components ⚙

    Analytics 📈

    API Additions

    • All llm based routes now return TR-QueryID that allows you to enrich your own custom events.
    • Custom events are now first class and able to be queried with our events API
    • Track events are now enabled for users, to track the full browser section end-to-end

    Dashboard Additions

    • Now displaying both RAG analytics and recommendations in the data explorer
    • Now display Click Through Analytics first class in the Dashboard.
    • CSV export
    • button to register a custom search event in the dashboard.

    commits:

    • add ctr data to analytics page (2bc5a30)
    • add CSV export support for all analytics (8c0b1bb)
    • add llm response to rag analytics (aba46a1)
    • Add routes to rate a RAG / Search Query (64657e9) (54fa779)
    • add TR-QueryID to ALL llm response routes (62d9317)
    • add track events for users (ee715fd)
    • add top_score to recommendations-explorer (8170839)
    • rag data explorer (791d687)
    • recommendations explorer (f0a6fa1)
    • get custom events with a metadata filter and move get CTR data under /events/ (9020e51)

    Search Component ⚙

    We created a search component that is fully integrated with all of the good features that Trieve has to offer. We feature both a chat widget and a search widget that can be easily plugged into your website

    • add openapi crawl options (6bde73a)
    • add suggested queries to search component (e7c4f80)
    • add tags to search component (73640ee)
    • add tanstack router to have new route for e commerce (c4acaff)
    • allow stop generate when its loading (da56f5d)
    • allow user to choose the key combination that opens the modal (3d268f2)
    • allow user to pass suggested queries (fdb22d1)
    • style openapi req verbs (19e5a2e)

    New Scraping 🤖

    We integrated with firecrawl to support scraping out of the box. This allows you to scrape your ecommerce store, personal blog, or openapi spec and instantly have an index for searching.

    • Scrape
  5. v0.11.92024-09-20 · 2024-09-20 09:29 UTC
    查看更新说明

    0.11.9 (2024-09-20)

    High level features

    • Firecrawl doc searcher

    Features

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Quick Links

    Features

    • 🔒 Self-Hosting in your VPC or on-prem: We have full self-hosting guides for AWS, GCP, Kubernetes generally, and docker compose available on our documentation page here.
    • 🧠 Semantic Dense Vector Search: Integrates with OpenAI or Jina embedding models and Qdrant to provide semantic vector search.
    • 🔍 Typo Tolerant Full-Text/Neural Search: Every uploaded chunk is vector'ized with naver/efficient-splade-VI-BT-large-query for typo tolerant, quality neural sparse-vector search.
    • 🖊️ Sub-Sentence Highlighting: Highlight the matching words or sentences within a chunk and bold them on search to enhance UX for your users. Shout out to the simsearch crate!
    • 🌟 Recommendations: Find similar chunks (or files if using grouping) with the recommendation API. Very helpful if you have a platform where users' favorite, bookmark, or upvote content.
    • 🤖 Convenient RAG API Routes: We integrate with OpenRouter to provide you with access to any LLM you would like for RAG. Try our routes for fully-managed RAG with topic-based memory management or select your own context RAG.
    • 💼 Bring Your Own Models: If you'd like, you can bring your own text-embedding, SPLADE, cross-encoder re-ranking, and/or large-language model (LLM) and plug it into our infrastructure.
    • 🔄 Hybrid Search with cross-encoder re-ranking: For the best results, use hybrid search with BAAI/bge-reranker-large re-rank optimization.
    • 📆 Recency Biasing: Easily bias search results for what was most recent to prevent staleness
    • 🛠️ Tunable Merchandizing: Adjust relevance using signals like clicks, add-to-carts, or citations
    • 🕳️ Filtering: Date-range, substring match, tag, numeric, and other filter types are supported.
    • 👥 Grouping: Mark multiple chunks as being part of the same file and search on the file-level such that the same top-level result never appears twice

    Are we missing a feature that your use case would need? - call us at 628-222-4090, make a Github issue, or join the Matrix community and tell us! We are a small company who is still very hands-on and eager to build what you need; professional services are available.

    Local Development

    Installing via Smithery

    To install Trieve for Claude Desktop automatically via Smithery:

    npx -y @smithery/cli install trieve-mcp-server --client claude
    

    System Dependencies

    Linux (Debian/Ubuntu)
    sudo apt install curl \
    gcc \
    g++ \
    make \
    pkg-config \
    python3 \
    python3-pip \
    libpq-dev \
    libssl-dev \
    openssl
    
    Linux (Arch)
    sudo pacman -S base-devel postgresql-libs
    
    MacOS
    # Install Xcode command line tools
    xcode-select --install
    
    # Install Homebrew if not already installed
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    
    # Install required packages
    brew install pkg-config openssl
    

    Install NodeJS and Yarn

    You can install NVM using its install script.

    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
    

    You should restart the terminal to update bash profile with NVM. Then, you can install NodeJS LTS release and Yarn.

    nvm install --lts
    npm install -g yarn
    

    Make server tmp dir

    mkdir server/tmp
    

    Install rust

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    

    Install cargo-watch

    cargo install cargo-watch
    

    Setup env's

    You might need to create the analytics directory in ./frontends

    cp .env.analytics ./frontends/analytics/.env
    cp .env.chat ./frontends/chat/.env
    cp .env.search ./frontends/search/.env
    cp .env.example ./server/.env
    cp .env.dashboard ./frontends/dashboard/.env
    

    Add your LLM_API_KEY to ./server/.env

    Here is a guide for acquiring that.

    Steps once you have the key
    1. Open the ./server/.env file
    2. Replace the value for LLM_API_KEY to be your own OpenAI API key.
    3. Replace the value for OPENAI_API_KEY to be your own OpenAI API key.

    Override the following keys in your terminal for local dev

    The PAGEFIND_CDN_BASE_URL and S3_SECRET_KEY_CSVJSONL can be set to a random list of strings.

    export OPENAI_API_KEY="your_OpenAI_api_key" \
    LLM_API_KEY="your_OpenAI_api_key" \
    PAGEFIND_CDN_BASE_URL="lZP8X4h0Q5Sj2ZmV,aAmu1W92T6DbFUkJ,DZ5pMvz8P1kKNH0r,QAqwvKh8rI5sPmuW,YMwgsBz7jLfN0oX8" \
    S3_SECRET_KEY_CSVJSONL="Gq6wzS3mjC5kL7i4KwexnL3gP8Z1a5Xv,V2c4ZnL0uHqBzFvR2NcN8Pb1g6CjmX9J,TfA1h8LgI5zYkH9A9p7NvWlL0sZzF9p8N,pKr81pLq5n6MkNzT1X09R7Qb0Vn5cFr0d,DzYwz82FQiW6T3u9A4z9h7HLOlJb7L2V1" \
    GROQ_API_KEY="GROQ_API_KEY_if_applicable"
    
    

    Start docker container services needed for local dev

    cat .env.chat .env.search .env.server .env.docker-compose > .env
    
    ./convenience.sh -l
    

    Start embedding servers

    We offer 2 docker-compose files for embedding servers. One for GPU and one for CPU.

    docker compose -f docker-compose-cpu-embeddings.yml up -d
    

    or

    docker compose -f docker-compose-gpu-embeddings.yml up -d
    
    • Note on embedding servers. If you want to use a separate GPU enabled device for embedding servers you will need to update the following parameters
    SPARSE_SERVER_QUERY_ORIGIN
    SPARSE_SERVER_DOC_ORIGIN
    EMBEDDING_SERVER_ORIGIN
    SPARSE_SERVER_QUERY_ORIGIN
    
    Using CPU embeddings on MacOS
    cp docker-compose-cpu-embeddings.override.mac docker-compose-cpu-embeddings.override.yml
    docker-compose -f docker-compose-cpu-embeddings.yml -f docker-compose-cpu-embeddings.override.yml docker up -d
    

    Install front-end packages for local dev

    cd frontends
    yarn
    

    cd ..

    cd clients/ts-sdk
    yarn build
    

    cd ../..

    Start services for local dev

    It is recommend to manage services through tmuxp, see the guide here or terminal tabs.

    cd frontends
    yarn
    yarn dev
    
    cd server
    cargo watch -x run
    
    cd server
    cargo run --bin ingestion-worker
    
    cd server
    cargo run --bin file-worker
    
    cd server
    cargo run --bin delete-worker
    
    cd search
    yarn
    yarn dev
    

    Verify Working Setup

    After the cargo build has finished (after the tmuxp load trieve):

    Additional Instructions for testing cross encoder reranking models

    To test the Cross Encoder rerankers in local dev,

    • click on the dataset, go to the Dataset Settings -> Dataset Options -> Additional Options and uncheck the Fulltext Enabled option.
    • in the Embedding Settings, select your reranker model and enter the respective key in the adjacent textbox, and hit save.
    • in the search playground, set Type -> Semantic and select Rerank By -> Cross Encoder
    • if AIMon Reranker is selected in the Embedding Settings, you can enter an optional Task Definition in the search playground to specify the domain of context documents to the AIMon reranker.

    Debugging issues with local dev

    Reach out to us on discord for assistance. We are available and more than happy to assist.

    Debug diesel by getting the exact generated SQL

    diesel::debug_query(&query).to_string();

    Running evals

    The evals package loads an mcp client that then runs the index.ts file, so there is no need to rebuild between tests. You can load environment variables by prefixing the npx command. Full documentation can be found here.

    OPENAI_API_KEY=your-key  npx mcp-eval evals.ts clients/mcp-server/src/index.ts
    

    Local Setup for Testing Stripe Features

    Install Stripe CLI.

    1. stripe login
    2. stripe listen --forward-to localhost:8090/api/stripe/webhook
    3. set the STRIPE_WEBHOOK_SECRET in the server/.env to the resulting webhook signing secret
    4. stripe products create --name trieve --default-price-data.unit-amount 1200 --default-price-data.currency usd
    5. stripe plans create --amount=1200 --currency=usd --interval=month --product={id from response of step 3}

    Contributors