Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[bot] Add Outlines integration for structured-generation execution instrumentation (648,297 weekly downloads)

Đang mở
#598 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
python
Lĩnh vực
ai, observability-sre

Hướng nghiên cứu

Bắt đầu với py/src/braintrust/integrations/instructor/ và kiểm tra các pattern tích hợp và wrapper xung quanh, sau đó xem xét py/src/braintrust/wrappers/, py/pyproject.toml và py/noxfile.py. Công việc hoàn tất khi việc thực thi lệnh gọi hoặc generate của Outlines, streaming được hỗ trợ, các kiểu đầu ra và danh tính backend/model được instrument, đồng thời integration được thể hiện trong ma trận và một nox session.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bot-automation new-integration

Summary

outlines (dottxt-ai) is a widely used structured-generation library: it wraps a model object and constrains decoding so the output matches a requested type (JSON schema, Pydantic model, regex, CFG, Literal, function signature, etc.) via model(prompt, output_type). It supports many backends (OpenAI, Ollama, vLLM, transformers, llama.cpp) and is actively released (latest 1.3.2, July 20, 2026; PyPI: https://pypi.org/project/outlines/). This repository has zero instrumentation for it — no integration directory, no wrapper, no nox session, no matrix entry.

This is a distinct execution surface from the instructor package this repo already instruments (py/src/braintrust/integrations/instructor/): Instructor layers structured output on top of a provider client (e.g. instructor.from_openai(...)), whereas Outlines is itself the model-calling layer and controls token-level decoding directly against local/self-hosted backends (transformers, vLLM, llama.cpp) in addition to hosted APIs — a meaningfully different, provider-agnostic generation call site that Instructor-style patching does not cover.

What needs to be instrumented

  • Model.__call__(prompt, output_type, **kwargs) (or generate(...) in the current API) — the core structured-generation execution entrypoint; should log the prompt, the requested output type/schema, and the returned (parsed) value.
  • Streaming variants (model.stream(...)) where supported by the backend.
  • The output_type used (JSON schema / Pydantic model / regex / CFG / Literal) is worth capturing in span metadata since it materially changes what "correct" output means for eval purposes.
  • Backend/model identification (which underlying model class — outlines.models.openai, outlines.models.transformers, outlines.models.vllm, etc. — is in use) so spans carry accurate provider/model metadata.

Braintrust docs status

not_found — https://www.braintrust.dev/docs/guides/tracing/integrations lists tracing integrations (OpenTelemetry, Temporal, Vercel AI SDK, OpenRouter SDK, LangChain, LangSmith, LlamaIndex, Agno, Apollo GraphQL, Cloudflare Workers AI, DSPy, Instructor, LiteLLM, Ruby LLM, Traceloop, TrueFoundry) and agent frameworks — Outlines is not present in either list.

Upstream sources

Local repo files inspected

  • py/src/braintrust/integrations/ — no outlines/ directory (only instructor/, a distinct package/surface)
  • py/src/braintrust/wrappers/ — no Outlines wrapper
  • py/pyproject.toml [tool.braintrust.matrix] — no outlines entry
  • py/noxfile.py — no test_outlines session
  • Repo-wide case-insensitive grep for outlines under py/ — zero matches
Ngôn ngữ chính
Python
Star
21
Fork
23
Merge trung bình
20 giờ 8 phút
Pull request đã merge (30 ngày)
94

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của braintrustdata/braintrust-sdk-python

Tất cả issue của braintrustdata/braintrust-sdk-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.