Kỹ thuật prompt

DSPy

stanfordnlp/dspy

A framework for programming and optimizing language-model pipelines instead of hand-tuning prompts.

★ 38,6KSố sao
⑂ 3,4KFork
361Vấn đề đang mở
PythonNgôn ngữ
MITGiấy phép
Q84Điểm biên tập

Tổng quan

DSPy represents LLM applications as modular programs with typed signatures and predictors, then provides optimizers that can tune prompts or parameters against examples and metrics. It can be used for extraction, classification, RAG, and agent workflows.

Tính năng chính

  • Composable LLM modules
  • Typed signatures and predictors
  • Prompt and parameter optimizers
  • Evaluation-driven iteration

Yêu cầu, cài đặt và bắt đầu nhanh

Install the Python package with `pip install dspy`; configure a supported language-model provider as described in the docs.

Cách sử dụng

Define task signatures and modules, supply a dataset and metric, then evaluate or optimize the pipeline for the target task.

Khả năng tương thích của mô hình và trường hợp sử dụng

Works with multiple providers and local model backends; consult current docs for the integration matrix.

Ghi chú về giấy phép và rủi ro

The repository declares the MIT License. Connected model providers and model weights are licensed separately.

Phát hành và bảo trì

See the official repository for current releases and changes.