dspy icon indicating copy to clipboard operation
dspy copied to clipboard

DSPy: The framework for programming—not prompting—language models

Results 691 dspy issues
Sort by recently updated
recently updated
newest added

I'd like to inspect the prompt before calling the generating output. Is there a method to achieve this? Flow Example: ```python prompt = generate_prompt() output = generate_output(prompt) ```

If you have a signature like this: ```python class Text2Data(dspy.Signature): """ Act as an expert in extracting key information from text. Your task is to extract key information from an...

On the website, you [see this example](https://dspy.ai/#__tabbed_3_3): ```python import dspy dspy.configure(lm=dspy.LM('gpt-4o-mini-2024-07-18')) # Define the DSPy module for classification. It will use the hint at training time, if available. signature =...

I want to evaluate the **grammatical accuracy** of outputs. Directly requesting scores gave poor results, so I switched to calculating scores based on the **distance** after **grammar correction**. However, the...

I've tried the following methods without success ```python import dspy print(dspy.__version__) ``` and ```python import importlib.metadata importlib.metadata.version('dspy') ```

Adds support for all python `ast` types in string signatures, like `Signature("text -> label:Literal['a', 'b']")`. Fixes https://github.com/stanfordnlp/dspy/issues/1899

Currently, only Signature OutputField can have Pydantic Model as a type. Adding it to InputField does not reflect in the System prompt

This should address the #1902 . Also, I found there are some dependencies missing when running the test from a fresh virtual environment so add them in the pyproject.toml file....