Prompt "profiles": serializable bundles of system prompt + tools + schema
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
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Tranquilla
- Stack tecnologico
- python
- Ambito
- backend-api-design
Direzione di ricerca
Inizia leggendo chatlas/_interpolate.py e chatlas/_chat.py, in particolare interpolate(), chat_structured(), set_model_params() e i metodi degli strumenti. Risolvi le questioni aperte relative all'ambito della serializzazione e al punto di ingresso per la creazione, quindi verifica che un Profile possa mantenere il proprio system_prompt, data_model e params tramite un round-trip e creare un Chat con interpolazione. Il raggruppamento degli strumenti è al di fuori dei criteri iniziali di completamento.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Motivation
Simon Willison's llm has templates: YAML bundles of system prompt, prompt fragments, model options, tools, and schemas, invoked via llm -t name. This lets users package up a reusable "agent config" and share it as a file. chatlas has the pieces (interpolate()/interpolate_file() in chatlas/_interpolate.py, register_tool()/set_tools() and chat_structured(data_model=...) in chatlas/_chat.py, set_model_params()), but nothing that bundles them into one serializable, shareable unit. Pydantic AI has a related but narrower idea in reusable Agent instances, though those aren't declaratively serializable either.
Proposed approach
Introduce a Profile object — a thin, serializable bundle of the inputs to a Chat, not a new execution engine:
from chatlas import Profile, ChatOpenAI
profile = Profile(
system_prompt="You are a terse SQL assistant.\n{{ extra_instructions }}", # interpolate() template
data_model="myapp.schemas.SqlAnswer", # optional, import-path string
params={"temperature": 0.2},
)
chat = profile.create_chat(ChatOpenAI, variables={"extra_instructions": "Always cite the table."})
Profile.from_yaml(path)/Profile.to_yaml(path)(or TOML) for round-tripping.system_promptis rendered throughinterpolate()atcreate_chat()time, so the same template mechanics/variable-inference already in_interpolate.pyapply.data_modelandparamsmap directly ontochat_structured(data_model=...)andset_model_params().- Tools are the hard part. Functions aren't YAML-serializable. Two honest options: (a) store an import path string (
"myapp.tools:lookup_price") resolved viaimportlibat load time — simple, but ties the profile to code being importable in the same environment; (b) require a small in-app registry mapping names to callables that the profile references by name only. Given this complexity, the proposal is to ship the non-tool subset first (system prompt + data_model + params, dumpable/loadable), and treat tool bundling as a stretch goal / separate follow-up once the serialization approach is validated with users.
Alternatives / prior art
- ellmer has
interpolate()(string-only) and no bundling concept beyond that — this would be new territory for both projects, so getting the design right in chatlas first and porting later (as usual) seems reasonable. - Do nothing: users keep hand-rolling a
dict/module of prompt+schema+params, which works but isn't shareable as a file the wayllm's templates are. - A pure-YAML "recipe" that only ever produces kwargs for
ChatAuto(**kwargs)(no new class) is a lighter-weight alternative worth considering.
Open questions
- Is
create_chat()the right entry point, or should this be aChat*(profile=...)constructor kwarg instead (per the original ask)? - YAML vs TOML vs both?
- Should
Profilealso carry the provider/model string (à laChatAuto's"provider/model"), or stay provider-agnostic and let the caller pick theChat*class?
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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di posit-dev/chatlas
-
A streaming text delta that repeats everything streamed so far is missing from the recorded turnForse già presa @cpsievert l’ha presa 81 giorni fa. Apertaai-triage:done Priority: Medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
ai-triage:needs-review documentation
Difficoltà 2/5 1-2 giorni Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 1-2 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
ai-triage:done Priority: Low
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di posit-dev/chatlas
Issue simili
-
jira: an unquoted JQL number of more than 4300 digits is a plain-text 500, where real answers 200Apertafidelity
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
A JSON chat answer blocks the backend event loop for the whole RAG runForse già presa @NopeCharon l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
The-OpenROAD-Project/ORAssistant#656 ·
I maintainer di solito rispondono entro 1 giorno
-
bug(operator): VolterraOperator built inside jax.jit with a concrete decay raises TracerBoolConversionErrorForse già presa @jejjohnson l’ha presa oggi. Apertatype:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
jejjohnson/integrix#144 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
finos/ai-governance-framework#459 ·
-
slurm: a case outcome nested too deep crashes status/collect instead of reading as no outcomeAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
autowarefoundation/autoware_carla_scenario#2963 ·
I maintainer di solito rispondono entro 1 giorno