Scope decision: thin embed() helper, or explicit non-goal?

オープン
#351 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
静か
技術スタック
python

調査の方向性

まず docs/misc/RAG.qmd、docs/why-chatlas.qmd、そしてクローズされた issue #44 を確認し、続いて3つの選択肢と、ここに列挙されている provider およびスコープに関する質問を比較します。完了とは、embeddings を chatlas に含めるかどうかについてプロジェクトとして決定が記録され、選択したスコープと provider または package の境界が明示されていることです。

索引モデルが issue の本文から書いたものです。

説明

ai-triage:needs-review question

Motivation

llm ships a full embeddings subsystem (stores, similarity search, CLI); LiteLLM exposes a unified /embeddings across providers. chatlas deliberately stays out of RAG infrastructure — docs/misc/RAG.qmd explicitly recommends reaching for llama-index (or similar) for vector stores/retrieval, and #44 ("[SPIKE] RAG support", closed) landed on the same conclusion, with @cpsievert noting "if we do work on it, it will come in the form of another Python package." That's the right call for retrieval infrastructure. But a thin embed(texts) -> list[list[float]] helper is arguably a different, smaller thing: a data-scientist primitive for turning text into feature vectors for clustering/classification in a pandas/polars workflow, with no store or retriever attached — closer to token_usage() in scope than to RAG.

Options

A. Thin embed() per supporting provider. A module-level function (or provider method) unifying the handful of embeddings-capable providers (OpenAI, Google, Mistral, Ollama, ...), returning plain list[list[float]], reusing each provider's existing HTTP client setup for auth/retries. No index, no similarity search, no persistence — just the API call.

B. Document the status quo. Keep docs/misc/RAG.qmd's current recommendation (use the provider SDK directly, e.g. openai.embeddings.create()) and simply make this a documented non-goal, cross-linking from docs/why-chatlas.qmd's "what chatlas doesn't do" section (see companion issue on that page).

C. Separate small package (e.g. chatlas-embed or similar), consistent with the #44 conclusion and giving embeddings their own release cadence independent of chatlas core.

Prior art (ellmer)

This exact question was raised in ellmer as tidyverse/ellmer#171 "Also support embedding APIs?" (closed, no PR landed). Hadley's initial take: "currently out of scope for ellmer, but we might end up implementing in a separate package." He later reconsidered because so much HTTP/auth/retry plumbing would be duplicated by a separate package, and left the door open to a contributed PR — but as of this writing ellmer still has no embed_* functions (confirmed: no matching files in tidyverse/ellmer's R/ directory). So there's no ellmer precedent to align with either way — this would be a genuinely new decision for the project family, not a port.

Recommendation (light)

Option A, scoped narrowly (no persistence/index/similarity helpers, just the raw call unified across providers), seems like the best fit for chatlas's "primitives, not infrastructure" philosophy — but given ellmer explicitly punted on this and chatlas's own RAG doc/spike reached a similar conclusion, this is presented as a decision point rather than a pre-approved plan.

Open questions

  • If A: which providers first (OpenAI + Google + Mistral cover most users)? Does this live in each _provider_*.py or as a standalone chatlas.embed()?
  • Does adding this reopen the "does chatlas do RAG" scope question that #44 tried to close?

Drafted from a competitive review of llm / Pydantic AI / LangChain / LiteLLM (July 2026); filed via Claude Code on behalf of @cpsievert.

主要言語
Python
スター
179
フォーク
32
平均マージ
1日 3時間
マージ済み PR(30日)
10

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

posit-dev/chatlas のほかの issue

posit-dev/chatlas の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。