Embeddings: support Mistral for knowledge-base processing
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 30/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- ai
調査の方向性
Start in lib/ai/platform-models.ts, where KB_EMBEDDING_DIMENSIONS (1536) and embeddingDimensionsSupported live, then check how lib/ai/embed.ts re-exports them. Mistral's mistral-embed returns 1024 dimensions, so the model choice (codestral-embed, a newer model, or another storage approach) must be settled first, and the work depends on the unmerged registry in #458. Done means Mistral can be picked for Embeddings, Test connection passes, uploads and search work, and re-embedding via lib/kb/embedding-migration.ts succeeds, with unit tests.
索引モデルが issue の本文から書いたものです。
説明
Copied from DeadantCo/answerLoops#73 · originally opened by sethr07 on 2026-11-20
Copied from https://github.com/answerLoops/answerLoops/issues/380 — originally opened by
@NathanTarberton 2026-10-14
Right now OpenAI is the only named provider answerLoops can use for knowledge-base processing. That's the embeddings step, which turns articles and uploaded files into something the bot can search. A workspace can already pick Mistral for answers, but the knowledge-base side still needs an OpenAI key (or the included AI usage on a hosted plan).
Mistral has its own embeddings API, so it would be great to support it directly. Once it lands, a single Mistral key could cover both answers and knowledge-base search, the same way an OpenAI key does today.
The interesting part: vector size
The knowledge base stores vectors in a fixed-size column of 1536 dimensions. That's KB_EMBEDDING_DIMENSIONS in lib/ai/platform-models.ts (re-exported from lib/ai/embed.ts), so every embedding model has to produce exactly that size.
mistral-embed returns 1024-dimension vectors, so it can't fill that column as it is. Mistral's codestral-embed lets the caller choose its output size through output_dimension, and its default is 1536. It is tuned for code, though, so it's worth checking how well it handles ordinary support articles. Working out which model to use is part of this issue. That could be codestral-embed, a newer Mistral model, or a different approach to storage, and proposals are very welcome. In the same file, embeddingDimensionsSupported is where a model gets marked as able to fill the column.
Each workspace's stored vectors are tied to the model that produced them. When a workspace changes embedding model, a background job in lib/kb/embedding-migration.ts re-embeds its articles onto the new one. That job builds its model through ownEmbeddingModel in lib/ai/models.ts, so it will work with Mistral as long as that function does.
Where to start
Shared work is in #458; this issue adds only the Mistral entry, its dimension handling, tests and docs page.
- The registry entry for
mistral: model construction, default model and key fallback from a Mistral chat key, as defined by #458. It's worth checking whether the AI SDK's Mistral provider can pass an output size through. - Dimension handling: see
embeddingDimensionsSupportedinlib/ai/platform-models.ts. content/docs/integrations/mistral.mdxandcontent/docs/product/ai-config.mdxshould be updated to say Mistral covers both once this ships.
Depends on
Depends on #458 (data-driven embedding provider registry). Shared work is in #458; this issue adds only the Mistral entry, its dimension handling, tests and docs page. Sibling: #379 (Gemini). Please coordinate there so the two don't collide.
What done looks like
A workspace can choose Mistral under Embeddings in Settings → AI Model, and Test connection checks it with a live call. Uploads and search work end to end. Switching to or from Mistral re-embeds existing articles. The new provider path has unit tests.
If you'd like to take this on, leave a comment and we'll assign it to you. Questions are welcome here too.
Start here: new to the project? Read CONTRIBUTING.md first. It covers the ground rules, running answerLoops locally, and how to open a pull request.
- 主要言語
- TypeScript
- スター
- 0
- フォーク
- 0
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
DeadantCo/answerLoopsdev のほかの issue
-
Widget: match the chat bubble color to the rest of the widget対応中かも @sethr07 が今日担当しました。 オープンenhancement frontend help wanted
難易度 2/5 半日 初心者へのやさしさ 75/100
DeadantCo/answerLoopsdev#68 · コメント 3 件 ·
-
Widget: make the chat window fit on small phones対応中かも @sethr07 が今日担当しました。 オープンenhancement frontend good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
DeadantCo/answerLoopsdev#67 · コメント 9 件 ·
-
Add 'select all' option to Slack channel picker in Settings対応中かも @sethr07 が今日担当しました。 オープンfrontend good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
DeadantCo/answerLoopsdev#22 · コメント 5 件 ·
-
enhancement frontend help wanted
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
DeadantCo/answerLoopsdev#141 ·
-
backend enhancement frontend help wanted
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
DeadantCo/answerLoopsdev#140 ·
DeadantCo/answerLoopsdev の issue をすべて見る
似ている issue
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
lingdojo/kana-dojo#34545 · コメント 1 件 · リアクション 5 件 ·
メンテナーはふだん 1 日以内に返信
-
blocklist addition
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
MetaMask/eth-phishing-detect#315455 ·
メンテナーはふだん 1 日以内に返信
-
area: telegram bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
griffinwork40/agent-afk#5275 ·
メンテナーはふだん 1 日以内に返信
-
macOS: the Save Diagnostics panel goes behind the editor after an app switch and can't be reachedオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
getopenscreen/openscreen#1667 ·
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
erkamyaman/rust-anything#371 ·
メンテナーはふだん 1 日以内に返信