graphdoc.data.dspy_data.quality_data_helper module
- class graphdoc.data.dspy_data.quality_data_helper.QualityDataHelper[source]
Bases:
DspyDataHelper
A helper class for creating data objects related to our Documentation Quality dspy.Signature.
The example signature is defined as:
database_schema: str = dspy.InputField() category: Literal["perfect", "almost perfect", "poor but correct", "incorrect"] = ( dspy.OutputField() ) rating: Literal[4, 3, 2, 1] = dspy.OutputField()
- static example(inputs: dict[str, Any]) Example [source]
Given a dictionary of inputs, return a dspy.Example object.
- static example_example() Example [source]
Return an example dspy.Example object with the inputs set to the example values.
- Returns:
A dspy.Example object.
- Return type:
dspy.Example
- static model_signature() ModelSignature [source]
Return a mlflow.models.ModelSignature object. Based on the example object, removes the output fields and utilizes the remaining fields to infer the model signature.
- Returns:
A mlflow.models.ModelSignature object.
- Return type:
mlflow.models.ModelSignature
- static prediction(inputs: dict[str, Any]) Prediction [source]
Given a dictionary of inputs, return a dspy.Prediction object.
- static prediction_example() Prediction [source]
Return an example dspy.Prediction object with the inputs set to the example values.
- Returns:
A dspy.Prediction object.
- Return type:
dspy.Prediction