dspy
dspy copied to clipboard
DSPy: The framework for programming—not prompting—language models
The code throws `google.api_core.exceptions.InvalidArgument: 400 Unable to submit request because candidateCount must be 1 but the entered value was 2. Update the candidateCount value and try again.` error in my...
I tried to run the DSpy module inside the thread it's not working... I have used `dspy.Module` there I used a custom retriever module. `elastic_rm(dspy.Retrieve)` Can anyone give me a...
Hi, so I am using COPRO to optimize signatures and instructions, however whenever I use Llama-3-70b via groq I get this n must be at most 1 error. Please see...
Hi, How can I customize the prompt structure in DSPy and use teleprompter to optimize only a specific part of it? For example, my custom prompt is: ``` ## Task...
When running a DSPy module with a given signature, I am interested in getting the token count of the "prompt template" that it currently passes to the LM, by which...
Hi, I tried the following but just got an empty json: ``` knn_fewshot = KNNFewShot(KNN, k=8, trainset=train) compiled_knn_fewshot = knn_fewshot.compile(Hotpot, trainset=train) compiled_knn_fewshot.save(f"Hotpot-knn-demos.json") ``` This would help in not having to...
I am trying to structure very simple medical information (python lists of strings, on average not longer than 5 items) using TypedChainOfThought. Frequently run into: ValueError: ('Too many retries trying...
i found that , dspy's result always be english ,how to set dspy,to make the result to chinese or other languages
``` Answer questions with short factoid answers. --- Follow the following format. Question: ${question} Question's Answer: often between 1 and 5 words --- Question: ``` This is an extremely opinionated...
I'm using this class class ClassifyEmergencyCall (dspy.Signature): """Classifies emergency calls into multiple categories from a predefined list.""" llamada = dspy.InputField(desc="The transcription of the emergency call") ubicacion = dspy.InputField(desc="The location mentioned...