dspy-embedding-retrieval
Installation
SKILL.md
DSPy Embedding Retrieval
Goal
Build semantic retrieval over an application-owned text corpus with dspy.Embedder and dspy.Embeddings.
Basic Hosted Embedder
import dspy
corpus = [
"DSPy programs are composed from modules.",
"MIPROv2 optimizes instructions and demonstrations.",
"RLM explores large contexts with a sandboxed REPL.",
]
embedder = dspy.Embedder("openai/text-embedding-3-small")
search = dspy.Embeddings(corpus=corpus, embedder=embedder, k=2)