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

Aperta
#351 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
30/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Tranquilla
Stack tecnologico
python

Direzione di ricerca

Inizia da docs/misc/RAG.qmd, docs/why-chatlas.qmd e dall’issue chiusa #44, quindi confronta le tre opzioni e le domande relative al provider e all’ambito elencate qui. Il lavoro è completato quando il progetto dispone di una decisione registrata sull’inclusione degli embeddings in chatlas, con l’ambito scelto e il confine del provider o del package resi espliciti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
179
Fork
32
Merge medio
1g 3h
PR unite (30g)
10

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di posit-dev/chatlas

Tutte le issue di posit-dev/chatlas

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.