You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/api/optimizers/GEPA.md
+2-9Lines changed: 2 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -131,7 +131,7 @@ Consider implementing a custom instruction proposer when you need:
131
131
132
132
**Built-in Options:**
133
133
-**Default Proposer**: The standard GEPA instruction proposer (used when `instruction_proposer=None`). The default instruction proposer IS an instruction proposer as well! It is the most general one, that was used for the diverse experiments reported in the GEPA paper and tutorials.
134
-
-**MultiModalInstructionProposer**: Handles `dspy.Image` inputs and structured multimodal content. This proposer has been specifically optimized for tasks that include one or more `dspy.Image` inputs.
134
+
-**MultiModalInstructionProposer**: Handles `dspy.Image` inputs and structured multimodal content.
135
135
136
136
```python
137
137
from dspy.teleprompt.gepa.instruction_proposal import MultiModalInstructionProposer
@@ -272,16 +272,14 @@ class RAGInstructionImprover(dspy.Module):
272
272
examples_with_feedback=component_examples
273
273
)
274
274
275
-
# Retrieve relevant documentation using multiple queries
276
275
results =self.retrieve.query(
277
276
query_texts=query_result.retrieval_queries,
278
277
n_results=3
279
278
)
280
279
281
-
# Format retrieved documentation by query
282
280
relevant_docs_parts = []
283
281
for i, (query, query_docs) inenumerate(zip(query_result.retrieval_queries, results['documents'])):
284
-
if query_docs:# Only include queries that found results
282
+
if query_docs:
285
283
docs_formatted ="\n".join([f" - {doc}"for doc in query_docs])
286
284
relevant_docs_parts.append(
287
285
f"**Search Query #{i+1}**: {query}\n"
@@ -320,7 +318,6 @@ class DocumentationEnhancedProposer(ProposalFn):
0 commit comments