Skip to main content
Back to Prompt Library
implementation

Implement RAG & DSPy Optimization

Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.

Linked challenge: MCP-Enabled IP Patent Analysis System

Format
Text-first
Lines
1
Sections
1
Linked challenge
MCP-Enabled IP Patent Analysis System

Prompt source

Original prompt text with formatting preserved for inspection.

1 lines
1 sections
No variables
0 checklist items
Implement the RAG pipeline using LlamaIndex for a sample patent corpus (provided or create a small synthetic one). Integrate DSPy to optimize the prompts for your 'Patent Researcher' agent when performing prior art searches and for the 'Infringement Analyst' when comparing claims. Show how you've tuned the LLM calls for improved accuracy and reduced hallucination with Claude Opus 4.1.

Adaptation plan

Keep the source stable, then change the prompt in a predictable order so the next run is easier to evaluate.

Keep stable

Hold the task contract and output shape stable so generated implementations remain comparable.

Tune next

Update libraries, interfaces, and environment assumptions to match the stack you actually run.

Verify after

Test failure handling, edge cases, and any code paths that depend on hidden context or secrets.