Prompt "profiles": serializable bundles of system prompt + tools + schema
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Tranquilo
- Stack tecnológico
- python
- Área
- backend-api-design
Línea de trabajo
Empieza leyendo chatlas/_interpolate.py y chatlas/_chat.py, especialmente interpolate(), chat_structured(), set_model_params() y los métodos de herramientas. Resuelve las preguntas abiertas sobre el alcance de la serialización y el punto de entrada de creación; después, verifica que un Profile pueda conservar su system_prompt, data_model y params mediante un round-trip y crear un Chat con interpolación. La agrupación de herramientas queda fuera de los criterios iniciales para darlo por terminado.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 179
- Forks
- 32
- Merge medio
- 1 d 3 h
- PR fusionados (30 d)
- 10
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de posit-dev/chatlas
-
A streaming text delta that repeats everything streamed so far is missing from the recorded turnPosiblemente ocupada @cpsievert la tomó hace 81 días. Abiertoai-triage:done Priority: Medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
ai-triage:needs-review documentation
Dificultad 2/5 1-2 días Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 1-2 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
ai-triage:done Priority: Low
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
Los mantenedores suelen responder en 1 día
Todos los issues de posit-dev/chatlas
Issues similares
-
bot-triaged module: decompositions module: edge cases module: int overflow module: primTorch oncall: pt2 triage review
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
[TV SHOW]: Dynasty (1981)Abiertocountry:US rating:6 request-theme type:TV SHOW
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
LizardByte/ThemerrDB#10501 · 1 comentario ·
-
triage/confirmed
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
agentscope-ai/agentscope#4563 ·
Los mantenedores suelen responder en 2 días
-
comp/desktop desktop/chat P3 type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
NousResearch/hermes-agent#164451 ·
Los mantenedores suelen responder en 1 día
-
external integration integration-submission
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
langchain-ai/docs#8426 ·
Los mantenedores suelen responder en 1 día