Dynamic Few-Shot with dspy.KNN and dspy.KNNFewShot
Guide the user through using DSPy's KNN-based retrieval to dynamically select the most relevant few-shot demonstrations for each input at inference time, rather than using the same static examples for every query.
What KNN and KNNFewShot are
dspy.KNN is an in-memory nearest-neighbor retriever. Given a training set and an embedding function, it converts every training example into a vector. At query time, it embeds the new input, comput
[Description truncada. Veja o README completo no GitHub.]